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 "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_X87 | 7 #if V8_TARGET_ARCH_X87 |
8 | 8 |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/base/division-by-constant.h" | 10 #include "src/base/division-by-constant.h" |
(...skipping 726 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
737 sub(esp, Immediate(kPointerSize)); | 737 sub(esp, Immediate(kPointerSize)); |
738 fnstcw(MemOperand(esp, 0)); | 738 fnstcw(MemOperand(esp, 0)); |
739 and_(MemOperand(esp, 0), Immediate(0xF3FF)); | 739 and_(MemOperand(esp, 0), Immediate(0xF3FF)); |
740 or_(MemOperand(esp, 0), Immediate(rc)); | 740 or_(MemOperand(esp, 0), Immediate(rc)); |
741 fldcw(MemOperand(esp, 0)); | 741 fldcw(MemOperand(esp, 0)); |
742 add(esp, Immediate(kPointerSize)); | 742 add(esp, Immediate(kPointerSize)); |
743 } | 743 } |
744 | 744 |
745 | 745 |
746 void MacroAssembler::X87SetFPUCW(int cw) { | 746 void MacroAssembler::X87SetFPUCW(int cw) { |
| 747 RecordComment("-- X87SetFPUCW start --"); |
747 push(Immediate(cw)); | 748 push(Immediate(cw)); |
748 fldcw(MemOperand(esp, 0)); | 749 fldcw(MemOperand(esp, 0)); |
749 add(esp, Immediate(kPointerSize)); | 750 add(esp, Immediate(kPointerSize)); |
| 751 RecordComment("-- X87SetFPUCW end--"); |
750 } | 752 } |
751 | 753 |
752 | 754 |
753 void MacroAssembler::AssertNumber(Register object) { | 755 void MacroAssembler::AssertNumber(Register object) { |
754 if (emit_debug_code()) { | 756 if (emit_debug_code()) { |
755 Label ok; | 757 Label ok; |
756 JumpIfSmi(object, &ok); | 758 JumpIfSmi(object, &ok); |
757 cmp(FieldOperand(object, HeapObject::kMapOffset), | 759 cmp(FieldOperand(object, HeapObject::kMapOffset), |
758 isolate()->factory()->heap_number_map()); | 760 isolate()->factory()->heap_number_map()); |
759 Check(equal, kOperandNotANumber); | 761 Check(equal, kOperandNotANumber); |
(...skipping 2339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3099 mov(eax, dividend); | 3101 mov(eax, dividend); |
3100 shr(eax, 31); | 3102 shr(eax, 31); |
3101 add(edx, eax); | 3103 add(edx, eax); |
3102 } | 3104 } |
3103 | 3105 |
3104 | 3106 |
3105 } // namespace internal | 3107 } // namespace internal |
3106 } // namespace v8 | 3108 } // namespace v8 |
3107 | 3109 |
3108 #endif // V8_TARGET_ARCH_X87 | 3110 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |