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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 if (!FLAG_fast_math) return &exp; | 66 if (!FLAG_fast_math) return &exp; |
67 size_t actual_size; | 67 size_t actual_size; |
68 byte* buffer = static_cast<byte*>(OS::Allocate(1 * KB, &actual_size, true)); | 68 byte* buffer = static_cast<byte*>(OS::Allocate(1 * KB, &actual_size, true)); |
69 if (buffer == NULL) return &exp; | 69 if (buffer == NULL) return &exp; |
70 ExternalReference::InitializeMathExpData(); | 70 ExternalReference::InitializeMathExpData(); |
71 | 71 |
72 MacroAssembler masm(NULL, buffer, static_cast<int>(actual_size)); | 72 MacroAssembler masm(NULL, buffer, static_cast<int>(actual_size)); |
73 | 73 |
74 { | 74 { |
75 CpuFeatures::Scope use_vfp(VFP2); | 75 CpuFeatures::Scope use_vfp(VFP2); |
76 DwVfpRegister input = d0; | 76 DoubleRegister input = d0; |
77 DwVfpRegister result = d1; | 77 DoubleRegister result = d1; |
78 DwVfpRegister double_scratch1 = d2; | 78 DoubleRegister double_scratch1 = d2; |
79 DwVfpRegister double_scratch2 = d3; | 79 DoubleRegister double_scratch2 = d3; |
80 Register temp1 = r4; | 80 Register temp1 = r4; |
81 Register temp2 = r5; | 81 Register temp2 = r5; |
82 Register temp3 = r6; | 82 Register temp3 = r6; |
83 | 83 |
84 if (masm.use_eabi_hardfloat()) { | 84 if (masm.use_eabi_hardfloat()) { |
85 // Input value is in d0 anyway, nothing to do. | 85 // Input value is in d0 anyway, nothing to do. |
86 } else { | 86 } else { |
87 __ vmov(input, r0, r1); | 87 __ vmov(input, r0, r1); |
88 } | 88 } |
89 __ Push(temp3, temp2, temp1); | 89 __ Push(temp3, temp2, temp1); |
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
564 } | 564 } |
565 } | 565 } |
566 | 566 |
567 | 567 |
568 static MemOperand ExpConstant(int index, Register base) { | 568 static MemOperand ExpConstant(int index, Register base) { |
569 return MemOperand(base, index * kDoubleSize); | 569 return MemOperand(base, index * kDoubleSize); |
570 } | 570 } |
571 | 571 |
572 | 572 |
573 void MathExpGenerator::EmitMathExp(MacroAssembler* masm, | 573 void MathExpGenerator::EmitMathExp(MacroAssembler* masm, |
574 DwVfpRegister input, | 574 DoubleRegister input, |
575 DwVfpRegister result, | 575 DoubleRegister result, |
576 DwVfpRegister double_scratch1, | 576 DoubleRegister double_scratch1, |
577 DwVfpRegister double_scratch2, | 577 DoubleRegister double_scratch2, |
578 Register temp1, | 578 Register temp1, |
579 Register temp2, | 579 Register temp2, |
580 Register temp3) { | 580 Register temp3) { |
581 ASSERT(!input.is(result)); | 581 ASSERT(!input.is(result)); |
582 ASSERT(!input.is(double_scratch1)); | 582 ASSERT(!input.is(double_scratch1)); |
583 ASSERT(!input.is(double_scratch2)); | 583 ASSERT(!input.is(double_scratch2)); |
584 ASSERT(!result.is(double_scratch1)); | 584 ASSERT(!result.is(double_scratch1)); |
585 ASSERT(!result.is(double_scratch2)); | 585 ASSERT(!result.is(double_scratch2)); |
586 ASSERT(!double_scratch1.is(double_scratch2)); | 586 ASSERT(!double_scratch1.is(double_scratch2)); |
587 ASSERT(!temp1.is(temp2)); | 587 ASSERT(!temp1.is(temp2)); |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
698 patcher.masm()->add(r0, pc, Operand(-8)); | 698 patcher.masm()->add(r0, pc, Operand(-8)); |
699 patcher.masm()->ldr(pc, MemOperand(pc, -4)); | 699 patcher.masm()->ldr(pc, MemOperand(pc, -4)); |
700 patcher.masm()->dd(reinterpret_cast<uint32_t>(stub->instruction_start())); | 700 patcher.masm()->dd(reinterpret_cast<uint32_t>(stub->instruction_start())); |
701 } | 701 } |
702 } | 702 } |
703 | 703 |
704 | 704 |
705 } } // namespace v8::internal | 705 } } // namespace v8::internal |
706 | 706 |
707 #endif // V8_TARGET_ARCH_ARM | 707 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |