| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "v8.h" | 5 #include "v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_IA32 | 7 #if V8_TARGET_ARCH_IA32 |
| 8 | 8 |
| 9 #include "bootstrapper.h" | 9 #include "bootstrapper.h" |
| 10 #include "codegen.h" | 10 #include "codegen.h" |
| (...skipping 809 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 820 Label* fail) { | 820 Label* fail) { |
| 821 movzx_b(scratch, FieldOperand(map, Map::kInstanceTypeOffset)); | 821 movzx_b(scratch, FieldOperand(map, Map::kInstanceTypeOffset)); |
| 822 sub(scratch, Immediate(FIRST_NONCALLABLE_SPEC_OBJECT_TYPE)); | 822 sub(scratch, Immediate(FIRST_NONCALLABLE_SPEC_OBJECT_TYPE)); |
| 823 cmp(scratch, | 823 cmp(scratch, |
| 824 LAST_NONCALLABLE_SPEC_OBJECT_TYPE - FIRST_NONCALLABLE_SPEC_OBJECT_TYPE); | 824 LAST_NONCALLABLE_SPEC_OBJECT_TYPE - FIRST_NONCALLABLE_SPEC_OBJECT_TYPE); |
| 825 j(above, fail); | 825 j(above, fail); |
| 826 } | 826 } |
| 827 | 827 |
| 828 | 828 |
| 829 void MacroAssembler::FCmp() { | 829 void MacroAssembler::FCmp() { |
| 830 if (CpuFeatures::IsSupported(CMOV)) { | 830 fucomip(); |
| 831 fucomip(); | 831 fstp(0); |
| 832 fstp(0); | |
| 833 } else { | |
| 834 fucompp(); | |
| 835 push(eax); | |
| 836 fnstsw_ax(); | |
| 837 sahf(); | |
| 838 pop(eax); | |
| 839 } | |
| 840 } | 832 } |
| 841 | 833 |
| 842 | 834 |
| 843 void MacroAssembler::AssertNumber(Register object) { | 835 void MacroAssembler::AssertNumber(Register object) { |
| 844 if (emit_debug_code()) { | 836 if (emit_debug_code()) { |
| 845 Label ok; | 837 Label ok; |
| 846 JumpIfSmi(object, &ok); | 838 JumpIfSmi(object, &ok); |
| 847 cmp(FieldOperand(object, HeapObject::kMapOffset), | 839 cmp(FieldOperand(object, HeapObject::kMapOffset), |
| 848 isolate()->factory()->heap_number_map()); | 840 isolate()->factory()->heap_number_map()); |
| 849 Check(equal, kOperandNotANumber); | 841 Check(equal, kOperandNotANumber); |
| (...skipping 2615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3465 if (ms.shift() > 0) sar(edx, ms.shift()); | 3457 if (ms.shift() > 0) sar(edx, ms.shift()); |
| 3466 mov(eax, dividend); | 3458 mov(eax, dividend); |
| 3467 shr(eax, 31); | 3459 shr(eax, 31); |
| 3468 add(edx, eax); | 3460 add(edx, eax); |
| 3469 } | 3461 } |
| 3470 | 3462 |
| 3471 | 3463 |
| 3472 } } // namespace v8::internal | 3464 } } // namespace v8::internal |
| 3473 | 3465 |
| 3474 #endif // V8_TARGET_ARCH_IA32 | 3466 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |