Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: src/ia32/macro-assembler-ia32.cc

Issue 275253004: Require CMOV support for the ia32 port. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: restore uses of cmov Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/ia32/code-stubs-ia32.cc ('k') | src/platform.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/ia32/code-stubs-ia32.cc ('k') | src/platform.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698