| 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 912 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 923 | 923 |
| 924 // Tear down the exit frame, pop the arguments, and return. | 924 // Tear down the exit frame, pop the arguments, and return. |
| 925 mov(sp, Operand(fp)); | 925 mov(sp, Operand(fp)); |
| 926 ldm(ia_w, sp, fp.bit() | lr.bit()); | 926 ldm(ia_w, sp, fp.bit() | lr.bit()); |
| 927 if (argument_count.is_valid()) { | 927 if (argument_count.is_valid()) { |
| 928 add(sp, sp, Operand(argument_count, LSL, kPointerSizeLog2)); | 928 add(sp, sp, Operand(argument_count, LSL, kPointerSizeLog2)); |
| 929 } | 929 } |
| 930 } | 930 } |
| 931 | 931 |
| 932 void MacroAssembler::GetCFunctionDoubleResult(const DoubleRegister dst) { | 932 void MacroAssembler::GetCFunctionDoubleResult(const DoubleRegister dst) { |
| 933 if (use_eabi_hardfloat()) { | 933 if (use_eabi_hardfloat() && CpuFeatures::IsSupported(VFP3)) { |
| 934 Move(dst, d0); | 934 Move(dst, d0); |
| 935 } else { | 935 } else { |
| 936 vmov(dst, r0, r1); | 936 vmov(dst, r0, r1); |
| 937 } | 937 } |
| 938 } | 938 } |
| 939 | 939 |
| 940 | 940 |
| 941 void MacroAssembler::SetCallKind(Register dst, CallKind call_kind) { | 941 void MacroAssembler::SetCallKind(Register dst, CallKind call_kind) { |
| 942 // This macro takes the dst register to make the code more readable | 942 // This macro takes the dst register to make the code more readable |
| 943 // at the call sites. However, the dst register has to be r5 to | 943 // at the call sites. However, the dst register has to be r5 to |
| (...skipping 2381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3325 } | 3325 } |
| 3326 | 3326 |
| 3327 | 3327 |
| 3328 void MacroAssembler::PrepareCallCFunction(int num_reg_arguments, | 3328 void MacroAssembler::PrepareCallCFunction(int num_reg_arguments, |
| 3329 Register scratch) { | 3329 Register scratch) { |
| 3330 PrepareCallCFunction(num_reg_arguments, 0, scratch); | 3330 PrepareCallCFunction(num_reg_arguments, 0, scratch); |
| 3331 } | 3331 } |
| 3332 | 3332 |
| 3333 | 3333 |
| 3334 void MacroAssembler::SetCallCDoubleArguments(DoubleRegister dreg) { | 3334 void MacroAssembler::SetCallCDoubleArguments(DoubleRegister dreg) { |
| 3335 if (use_eabi_hardfloat()) { | 3335 if (use_eabi_hardfloat() && CpuFeatures::IsSupported(VFP3)) { |
| 3336 Move(d0, dreg); | 3336 Move(d0, dreg); |
| 3337 } else { | 3337 } else { |
| 3338 vmov(r0, r1, dreg); | 3338 vmov(r0, r1, dreg); |
| 3339 } | 3339 } |
| 3340 } | 3340 } |
| 3341 | 3341 |
| 3342 | 3342 |
| 3343 void MacroAssembler::SetCallCDoubleArguments(DoubleRegister dreg1, | 3343 void MacroAssembler::SetCallCDoubleArguments(DoubleRegister dreg1, |
| 3344 DoubleRegister dreg2) { | 3344 DoubleRegister dreg2) { |
| 3345 if (use_eabi_hardfloat()) { | 3345 if (use_eabi_hardfloat() && CpuFeatures::IsSupported(VFP3)) { |
| 3346 if (dreg2.is(d0)) { | 3346 if (dreg2.is(d0)) { |
| 3347 ASSERT(!dreg1.is(d1)); | 3347 ASSERT(!dreg1.is(d1)); |
| 3348 Move(d1, dreg2); | 3348 Move(d1, dreg2); |
| 3349 Move(d0, dreg1); | 3349 Move(d0, dreg1); |
| 3350 } else { | 3350 } else { |
| 3351 Move(d0, dreg1); | 3351 Move(d0, dreg1); |
| 3352 Move(d1, dreg2); | 3352 Move(d1, dreg2); |
| 3353 } | 3353 } |
| 3354 } else { | 3354 } else { |
| 3355 vmov(r0, r1, dreg1); | 3355 vmov(r0, r1, dreg1); |
| 3356 vmov(r2, r3, dreg2); | 3356 vmov(r2, r3, dreg2); |
| 3357 } | 3357 } |
| 3358 } | 3358 } |
| 3359 | 3359 |
| 3360 | 3360 |
| 3361 void MacroAssembler::SetCallCDoubleArguments(DoubleRegister dreg, | 3361 void MacroAssembler::SetCallCDoubleArguments(DoubleRegister dreg, |
| 3362 Register reg) { | 3362 Register reg) { |
| 3363 if (use_eabi_hardfloat()) { | 3363 if (use_eabi_hardfloat() && CpuFeatures::IsSupported(VFP3)) { |
| 3364 Move(d0, dreg); | 3364 Move(d0, dreg); |
| 3365 Move(r0, reg); | 3365 Move(r0, reg); |
| 3366 } else { | 3366 } else { |
| 3367 Move(r2, reg); | 3367 Move(r2, reg); |
| 3368 vmov(r0, r1, dreg); | 3368 vmov(r0, r1, dreg); |
| 3369 } | 3369 } |
| 3370 } | 3370 } |
| 3371 | 3371 |
| 3372 | 3372 |
| 3373 void MacroAssembler::CallCFunction(ExternalReference function, | 3373 void MacroAssembler::CallCFunction(ExternalReference function, |
| (...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3801 void CodePatcher::EmitCondition(Condition cond) { | 3801 void CodePatcher::EmitCondition(Condition cond) { |
| 3802 Instr instr = Assembler::instr_at(masm_.pc_); | 3802 Instr instr = Assembler::instr_at(masm_.pc_); |
| 3803 instr = (instr & ~kCondMask) | cond; | 3803 instr = (instr & ~kCondMask) | cond; |
| 3804 masm_.emit(instr); | 3804 masm_.emit(instr); |
| 3805 } | 3805 } |
| 3806 | 3806 |
| 3807 | 3807 |
| 3808 } } // namespace v8::internal | 3808 } } // namespace v8::internal |
| 3809 | 3809 |
| 3810 #endif // V8_TARGET_ARCH_ARM | 3810 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |