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

Side by Side Diff: src/ia32/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/assembler-ia32.h ('k') | src/ia32/code-stubs-ia32.cc » ('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 (c) 1994-2006 Sun Microsystems Inc. 1 // Copyright (c) 1994-2006 Sun Microsystems Inc.
2 // All Rights Reserved. 2 // All Rights Reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions 5 // modification, are permitted provided that the following conditions
6 // are met: 6 // are met:
7 // 7 //
8 // - Redistributions of source code must retain the above copyright notice, 8 // - Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer. 9 // this list of conditions and the following disclaimer.
10 // 10 //
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 uint64_t probed_features = 0; 91 uint64_t probed_features = 0;
92 CPU cpu; 92 CPU cpu;
93 if (cpu.has_sse41()) { 93 if (cpu.has_sse41()) {
94 probed_features |= static_cast<uint64_t>(1) << SSE4_1; 94 probed_features |= static_cast<uint64_t>(1) << SSE4_1;
95 } 95 }
96 if (cpu.has_sse3()) { 96 if (cpu.has_sse3()) {
97 probed_features |= static_cast<uint64_t>(1) << SSE3; 97 probed_features |= static_cast<uint64_t>(1) << SSE3;
98 } 98 }
99 99
100 CHECK(cpu.has_sse2()); // SSE2 support is mandatory. 100 CHECK(cpu.has_sse2()); // SSE2 support is mandatory.
101 101 CHECK(cpu.has_cmov()); // CMOV support is mandatory.
102 if (cpu.has_cmov()) {
103 probed_features |= static_cast<uint64_t>(1) << CMOV;
104 }
105 102
106 // SAHF must be available in compat/legacy mode. 103 // SAHF must be available in compat/legacy mode.
107 ASSERT(cpu.has_sahf()); 104 ASSERT(cpu.has_sahf());
108 probed_features |= static_cast<uint64_t>(1) << SAHF; 105 probed_features |= static_cast<uint64_t>(1) << SAHF;
109 106
110 uint64_t platform_features = OS::CpuFeaturesImpliedByPlatform(); 107 uint64_t platform_features = OS::CpuFeaturesImpliedByPlatform();
111 supported_ = probed_features | platform_features; 108 supported_ = probed_features | platform_features;
112 found_by_runtime_probing_only_ = probed_features & ~platform_features; 109 found_by_runtime_probing_only_ = probed_features & ~platform_features;
113 } 110 }
114 111
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after
629 626
630 void Assembler::movzx_w(Register dst, const Operand& src) { 627 void Assembler::movzx_w(Register dst, const Operand& src) {
631 EnsureSpace ensure_space(this); 628 EnsureSpace ensure_space(this);
632 EMIT(0x0F); 629 EMIT(0x0F);
633 EMIT(0xB7); 630 EMIT(0xB7);
634 emit_operand(dst, src); 631 emit_operand(dst, src);
635 } 632 }
636 633
637 634
638 void Assembler::cmov(Condition cc, Register dst, const Operand& src) { 635 void Assembler::cmov(Condition cc, Register dst, const Operand& src) {
639 ASSERT(IsEnabled(CMOV));
640 EnsureSpace ensure_space(this); 636 EnsureSpace ensure_space(this);
641 // Opcode: 0f 40 + cc /r. 637 // Opcode: 0f 40 + cc /r.
642 EMIT(0x0F); 638 EMIT(0x0F);
643 EMIT(0x40 + cc); 639 EMIT(0x40 + cc);
644 emit_operand(dst, src); 640 emit_operand(dst, src);
645 } 641 }
646 642
647 643
648 void Assembler::cld() { 644 void Assembler::cld() {
649 EnsureSpace ensure_space(this); 645 EnsureSpace ensure_space(this);
(...skipping 2027 matching lines...) Expand 10 before | Expand all | Expand 10 after
2677 fprintf(coverage_log, "%s\n", file_line); 2673 fprintf(coverage_log, "%s\n", file_line);
2678 fflush(coverage_log); 2674 fflush(coverage_log);
2679 } 2675 }
2680 } 2676 }
2681 2677
2682 #endif 2678 #endif
2683 2679
2684 } } // namespace v8::internal 2680 } } // namespace v8::internal
2685 2681
2686 #endif // V8_TARGET_ARCH_IA32 2682 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/assembler-ia32.h ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698