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

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

Issue 11498006: Revert 13157, 13145 and 13140: Crankshaft code stubs. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years 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/builtins-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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 // ----------------------------------------------------------------------------- 48 // -----------------------------------------------------------------------------
49 // Implementation of CpuFeatures 49 // Implementation of CpuFeatures
50 50
51 #ifdef DEBUG 51 #ifdef DEBUG
52 bool CpuFeatures::initialized_ = false; 52 bool CpuFeatures::initialized_ = false;
53 #endif 53 #endif
54 uint64_t CpuFeatures::supported_ = 0; 54 uint64_t CpuFeatures::supported_ = 0;
55 uint64_t CpuFeatures::found_by_runtime_probing_ = 0; 55 uint64_t CpuFeatures::found_by_runtime_probing_ = 0;
56 56
57 57
58 int IntelDoubleRegister::NumAllocatableRegisters() {
59 if (CpuFeatures::IsSupported(SSE2)) {
60 return XMMRegister::kNumAllocatableRegisters;
61 } else {
62 return X87TopOfStackRegister::kNumAllocatableRegisters;
63 }
64 }
65
66
67 int IntelDoubleRegister::NumRegisters() {
68 if (CpuFeatures::IsSupported(SSE2)) {
69 return XMMRegister::kNumRegisters;
70 } else {
71 return X87TopOfStackRegister::kNumRegisters;
72 }
73 }
74
75
76 const char* IntelDoubleRegister::AllocationIndexToString(int index) {
77 if (CpuFeatures::IsSupported(SSE2)) {
78 return XMMRegister::AllocationIndexToString(index);
79 } else {
80 return X87TopOfStackRegister::AllocationIndexToString(index);
81 }
82 }
83
84
85 // The Probe method needs executable memory, so it uses Heap::CreateCode. 58 // The Probe method needs executable memory, so it uses Heap::CreateCode.
86 // Allocation failure is silent and leads to safe default. 59 // Allocation failure is silent and leads to safe default.
87 void CpuFeatures::Probe() { 60 void CpuFeatures::Probe() {
88 ASSERT(!initialized_); 61 ASSERT(!initialized_);
89 ASSERT(supported_ == 0); 62 ASSERT(supported_ == 0);
90 #ifdef DEBUG 63 #ifdef DEBUG
91 initialized_ = true; 64 initialized_ = true;
92 #endif 65 #endif
93 if (Serializer::enabled()) { 66 if (Serializer::enabled()) {
94 supported_ |= OS::CpuFeaturesImpliedByPlatform(); 67 supported_ |= OS::CpuFeaturesImpliedByPlatform();
(...skipping 2124 matching lines...) Expand 10 before | Expand all | Expand 10 after
2219 EMIT(0xE7); 2192 EMIT(0xE7);
2220 emit_sse_operand(src, dst); 2193 emit_sse_operand(src, dst);
2221 } 2194 }
2222 2195
2223 2196
2224 void Assembler::prefetch(const Operand& src, int level) { 2197 void Assembler::prefetch(const Operand& src, int level) {
2225 ASSERT(is_uint2(level)); 2198 ASSERT(is_uint2(level));
2226 EnsureSpace ensure_space(this); 2199 EnsureSpace ensure_space(this);
2227 EMIT(0x0F); 2200 EMIT(0x0F);
2228 EMIT(0x18); 2201 EMIT(0x18);
2229 // Emit hint number in Reg position of RegR/M. 2202 XMMRegister code = { level }; // Emit hint number in Reg position of RegR/M.
2230 XMMRegister code = XMMRegister::from_code(level);
2231 emit_sse_operand(code, src); 2203 emit_sse_operand(code, src);
2232 } 2204 }
2233 2205
2234 2206
2235 void Assembler::movdbl(XMMRegister dst, const Operand& src) { 2207 void Assembler::movdbl(XMMRegister dst, const Operand& src) {
2236 EnsureSpace ensure_space(this); 2208 EnsureSpace ensure_space(this);
2237 movsd(dst, src); 2209 movsd(dst, src);
2238 } 2210 }
2239 2211
2240 2212
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
2672 fprintf(coverage_log, "%s\n", file_line); 2644 fprintf(coverage_log, "%s\n", file_line);
2673 fflush(coverage_log); 2645 fflush(coverage_log);
2674 } 2646 }
2675 } 2647 }
2676 2648
2677 #endif 2649 #endif
2678 2650
2679 } } // namespace v8::internal 2651 } } // namespace v8::internal
2680 2652
2681 #endif // V8_TARGET_ARCH_IA32 2653 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/assembler-ia32.h ('k') | src/ia32/builtins-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698