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

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

Issue 277963002: Require CMOV support for the ia32 port. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
102 if (cpu.has_cmov()) { 102 CHECK(cpu.has_cmov()); // CMOV support is mandatory.
103 probed_features |= static_cast<uint64_t>(1) << CMOV;
104 }
105 103
106 // SAHF must be available in compat/legacy mode. 104 // SAHF must be available in compat/legacy mode.
107 ASSERT(cpu.has_sahf()); 105 ASSERT(cpu.has_sahf());
108 probed_features |= static_cast<uint64_t>(1) << SAHF; 106 probed_features |= static_cast<uint64_t>(1) << SAHF;
109 107
110 uint64_t platform_features = OS::CpuFeaturesImpliedByPlatform(); 108 uint64_t platform_features = OS::CpuFeaturesImpliedByPlatform();
111 supported_ = probed_features | platform_features; 109 supported_ = probed_features | platform_features;
112 found_by_runtime_probing_only_ = probed_features & ~platform_features; 110 found_by_runtime_probing_only_ = probed_features & ~platform_features;
113 } 111 }
114 112
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after
629 627
630 void Assembler::movzx_w(Register dst, const Operand& src) { 628 void Assembler::movzx_w(Register dst, const Operand& src) {
631 EnsureSpace ensure_space(this); 629 EnsureSpace ensure_space(this);
632 EMIT(0x0F); 630 EMIT(0x0F);
633 EMIT(0xB7); 631 EMIT(0xB7);
634 emit_operand(dst, src); 632 emit_operand(dst, src);
635 } 633 }
636 634
637 635
638 void Assembler::cmov(Condition cc, Register dst, const Operand& src) { 636 void Assembler::cmov(Condition cc, Register dst, const Operand& src) {
639 ASSERT(IsEnabled(CMOV));
640 EnsureSpace ensure_space(this); 637 EnsureSpace ensure_space(this);
641 // Opcode: 0f 40 + cc /r. 638 // Opcode: 0f 40 + cc /r.
642 EMIT(0x0F); 639 EMIT(0x0F);
643 EMIT(0x40 + cc); 640 EMIT(0x40 + cc);
644 emit_operand(dst, src); 641 emit_operand(dst, src);
645 } 642 }
646 643
647 644
648 void Assembler::cld() { 645 void Assembler::cld() {
649 EnsureSpace ensure_space(this); 646 EnsureSpace ensure_space(this);
(...skipping 2027 matching lines...) Expand 10 before | Expand all | Expand 10 after
2677 fprintf(coverage_log, "%s\n", file_line); 2674 fprintf(coverage_log, "%s\n", file_line);
2678 fflush(coverage_log); 2675 fflush(coverage_log);
2679 } 2676 }
2680 } 2677 }
2681 2678
2682 #endif 2679 #endif
2683 2680
2684 } } // namespace v8::internal 2681 } } // namespace v8::internal
2685 2682
2686 #endif // V8_TARGET_ARCH_IA32 2683 #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