| 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 749 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 760 void MacroAssembler::X87SetRC(int rc) { | 760 void MacroAssembler::X87SetRC(int rc) { |
| 761 sub(esp, Immediate(kPointerSize)); | 761 sub(esp, Immediate(kPointerSize)); |
| 762 fnstcw(MemOperand(esp, 0)); | 762 fnstcw(MemOperand(esp, 0)); |
| 763 and_(MemOperand(esp, 0), Immediate(0xF3FF)); | 763 and_(MemOperand(esp, 0), Immediate(0xF3FF)); |
| 764 or_(MemOperand(esp, 0), Immediate(rc)); | 764 or_(MemOperand(esp, 0), Immediate(rc)); |
| 765 fldcw(MemOperand(esp, 0)); | 765 fldcw(MemOperand(esp, 0)); |
| 766 add(esp, Immediate(kPointerSize)); | 766 add(esp, Immediate(kPointerSize)); |
| 767 } | 767 } |
| 768 | 768 |
| 769 | 769 |
| 770 void MacroAssembler::X87SetFPUCW(int cw) { |
| 771 push(Immediate(cw)); |
| 772 fldcw(MemOperand(esp, 0)); |
| 773 add(esp, Immediate(kPointerSize)); |
| 774 } |
| 775 |
| 776 |
| 770 void MacroAssembler::AssertNumber(Register object) { | 777 void MacroAssembler::AssertNumber(Register object) { |
| 771 if (emit_debug_code()) { | 778 if (emit_debug_code()) { |
| 772 Label ok; | 779 Label ok; |
| 773 JumpIfSmi(object, &ok); | 780 JumpIfSmi(object, &ok); |
| 774 cmp(FieldOperand(object, HeapObject::kMapOffset), | 781 cmp(FieldOperand(object, HeapObject::kMapOffset), |
| 775 isolate()->factory()->heap_number_map()); | 782 isolate()->factory()->heap_number_map()); |
| 776 Check(equal, kOperandNotANumber); | 783 Check(equal, kOperandNotANumber); |
| 777 bind(&ok); | 784 bind(&ok); |
| 778 } | 785 } |
| 779 } | 786 } |
| (...skipping 2575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3355 if (mag.shift > 0) sar(edx, mag.shift); | 3362 if (mag.shift > 0) sar(edx, mag.shift); |
| 3356 mov(eax, dividend); | 3363 mov(eax, dividend); |
| 3357 shr(eax, 31); | 3364 shr(eax, 31); |
| 3358 add(edx, eax); | 3365 add(edx, eax); |
| 3359 } | 3366 } |
| 3360 | 3367 |
| 3361 | 3368 |
| 3362 } } // namespace v8::internal | 3369 } } // namespace v8::internal |
| 3363 | 3370 |
| 3364 #endif // V8_TARGET_ARCH_X87 | 3371 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |