| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 Isolate* isolate, | 42 Isolate* isolate, |
| 43 CodeStubInterfaceDescriptor* descriptor) { | 43 CodeStubInterfaceDescriptor* descriptor) { |
| 44 static Register registers[] = { r1, r0 }; | 44 static Register registers[] = { r1, r0 }; |
| 45 descriptor->register_param_count_ = 2; | 45 descriptor->register_param_count_ = 2; |
| 46 descriptor->register_params_ = registers; | 46 descriptor->register_params_ = registers; |
| 47 descriptor->deoptimization_handler_ = | 47 descriptor->deoptimization_handler_ = |
| 48 FUNCTION_ADDR(KeyedLoadIC_MissFromStubFailure); | 48 FUNCTION_ADDR(KeyedLoadIC_MissFromStubFailure); |
| 49 } | 49 } |
| 50 | 50 |
| 51 | 51 |
| 52 void TransitionElementsKindStub::InitializeInterfaceDescriptor( |
| 53 Isolate* isolate, |
| 54 CodeStubInterfaceDescriptor* descriptor) { |
| 55 static Register registers[] = { r0, r1 }; |
| 56 descriptor->register_param_count_ = 2; |
| 57 descriptor->register_params_ = registers; |
| 58 Address entry = |
| 59 Runtime::FunctionForId(Runtime::kTransitionElementsKind)->entry; |
| 60 descriptor->deoptimization_handler_ = FUNCTION_ADDR(entry); |
| 61 } |
| 62 |
| 63 |
| 52 #define __ ACCESS_MASM(masm) | 64 #define __ ACCESS_MASM(masm) |
| 53 | 65 |
| 54 static void EmitIdenticalObjectComparison(MacroAssembler* masm, | 66 static void EmitIdenticalObjectComparison(MacroAssembler* masm, |
| 55 Label* slow, | 67 Label* slow, |
| 56 Condition cond); | 68 Condition cond); |
| 57 static void EmitSmiNonsmiComparison(MacroAssembler* masm, | 69 static void EmitSmiNonsmiComparison(MacroAssembler* masm, |
| 58 Register lhs, | 70 Register lhs, |
| 59 Register rhs, | 71 Register rhs, |
| 60 Label* lhs_not_nan, | 72 Label* lhs_not_nan, |
| 61 Label* slow, | 73 Label* slow, |
| (...skipping 2006 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2068 // restore them. | 2080 // restore them. |
| 2069 __ stm(db_w, sp, kCallerSaved | lr.bit()); | 2081 __ stm(db_w, sp, kCallerSaved | lr.bit()); |
| 2070 | 2082 |
| 2071 const Register scratch = r1; | 2083 const Register scratch = r1; |
| 2072 | 2084 |
| 2073 if (save_doubles_ == kSaveFPRegs) { | 2085 if (save_doubles_ == kSaveFPRegs) { |
| 2074 CpuFeatures::Scope scope(VFP2); | 2086 CpuFeatures::Scope scope(VFP2); |
| 2075 // Check CPU flags for number of registers, setting the Z condition flag. | 2087 // Check CPU flags for number of registers, setting the Z condition flag. |
| 2076 __ CheckFor32DRegs(scratch); | 2088 __ CheckFor32DRegs(scratch); |
| 2077 | 2089 |
| 2078 __ sub(sp, sp, Operand(kDoubleSize * DwVfpRegister::kNumRegisters)); | 2090 __ sub(sp, sp, Operand(kDoubleSize * DwVfpRegister::kMaxNumRegisters)); |
| 2079 for (int i = 0; i < DwVfpRegister::kNumRegisters; i++) { | 2091 for (int i = 0; i < DwVfpRegister::kMaxNumRegisters; i++) { |
| 2080 DwVfpRegister reg = DwVfpRegister::from_code(i); | 2092 DwVfpRegister reg = DwVfpRegister::from_code(i); |
| 2081 __ vstr(reg, MemOperand(sp, i * kDoubleSize), i < 16 ? al : ne); | 2093 __ vstr(reg, MemOperand(sp, i * kDoubleSize), i < 16 ? al : ne); |
| 2082 } | 2094 } |
| 2083 } | 2095 } |
| 2084 const int argument_count = 1; | 2096 const int argument_count = 1; |
| 2085 const int fp_argument_count = 0; | 2097 const int fp_argument_count = 0; |
| 2086 | 2098 |
| 2087 AllowExternalCallThatCantCauseGC scope(masm); | 2099 AllowExternalCallThatCantCauseGC scope(masm); |
| 2088 __ PrepareCallCFunction(argument_count, fp_argument_count, scratch); | 2100 __ PrepareCallCFunction(argument_count, fp_argument_count, scratch); |
| 2089 __ mov(r0, Operand(ExternalReference::isolate_address())); | 2101 __ mov(r0, Operand(ExternalReference::isolate_address())); |
| 2090 __ CallCFunction( | 2102 __ CallCFunction( |
| 2091 ExternalReference::store_buffer_overflow_function(masm->isolate()), | 2103 ExternalReference::store_buffer_overflow_function(masm->isolate()), |
| 2092 argument_count); | 2104 argument_count); |
| 2093 if (save_doubles_ == kSaveFPRegs) { | 2105 if (save_doubles_ == kSaveFPRegs) { |
| 2094 CpuFeatures::Scope scope(VFP2); | 2106 CpuFeatures::Scope scope(VFP2); |
| 2095 | 2107 |
| 2096 // Check CPU flags for number of registers, setting the Z condition flag. | 2108 // Check CPU flags for number of registers, setting the Z condition flag. |
| 2097 __ CheckFor32DRegs(scratch); | 2109 __ CheckFor32DRegs(scratch); |
| 2098 | 2110 |
| 2099 for (int i = 0; i < DwVfpRegister::kNumRegisters; i++) { | 2111 for (int i = 0; i < DwVfpRegister::kMaxNumRegisters; i++) { |
| 2100 DwVfpRegister reg = DwVfpRegister::from_code(i); | 2112 DwVfpRegister reg = DwVfpRegister::from_code(i); |
| 2101 __ vldr(reg, MemOperand(sp, i * kDoubleSize), i < 16 ? al : ne); | 2113 __ vldr(reg, MemOperand(sp, i * kDoubleSize), i < 16 ? al : ne); |
| 2102 } | 2114 } |
| 2103 __ add(sp, sp, Operand(kDoubleSize * DwVfpRegister::kNumRegisters)); | 2115 __ add(sp, sp, Operand(kDoubleSize * DwVfpRegister::kMaxNumRegisters)); |
| 2104 } | 2116 } |
| 2105 __ ldm(ia_w, sp, kCallerSaved | pc.bit()); // Also pop pc to get Ret(0). | 2117 __ ldm(ia_w, sp, kCallerSaved | pc.bit()); // Also pop pc to get Ret(0). |
| 2106 } | 2118 } |
| 2107 | 2119 |
| 2108 | 2120 |
| 2109 void UnaryOpStub::PrintName(StringStream* stream) { | 2121 void UnaryOpStub::PrintName(StringStream* stream) { |
| 2110 const char* op_name = Token::Name(op_); | 2122 const char* op_name = Token::Name(op_); |
| 2111 const char* overwrite_name = NULL; // Make g++ happy. | 2123 const char* overwrite_name = NULL; // Make g++ happy. |
| 2112 switch (mode_) { | 2124 switch (mode_) { |
| 2113 case UNARY_NO_OVERWRITE: overwrite_name = "Alloc"; break; | 2125 case UNARY_NO_OVERWRITE: overwrite_name = "Alloc"; break; |
| (...skipping 5815 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7929 | 7941 |
| 7930 __ Pop(lr, r5, r1); | 7942 __ Pop(lr, r5, r1); |
| 7931 __ Ret(); | 7943 __ Ret(); |
| 7932 } | 7944 } |
| 7933 | 7945 |
| 7934 #undef __ | 7946 #undef __ |
| 7935 | 7947 |
| 7936 } } // namespace v8::internal | 7948 } } // namespace v8::internal |
| 7937 | 7949 |
| 7938 #endif // V8_TARGET_ARCH_ARM | 7950 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |