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

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

Issue 853703002: [x86] Avoid memory form of PUSH/CALL for ATOM. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 5 years, 11 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
« no previous file with comments | « src/ia32/assembler-ia32.cc ('k') | src/x64/macro-assembler-x64.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 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/x64/assembler-x64.h" 5 #include "src/x64/assembler-x64.h"
6 6
7 #if V8_OS_MACOSX 7 #if V8_OS_MACOSX
8 #include <sys/sysctl.h> 8 #include <sys/sysctl.h>
9 #endif 9 #endif
10 10
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 53
54 // Only use statically determined features for cross compile (snapshot). 54 // Only use statically determined features for cross compile (snapshot).
55 if (cross_compile) return; 55 if (cross_compile) return;
56 56
57 if (cpu.has_sse41() && FLAG_enable_sse4_1) supported_ |= 1u << SSE4_1; 57 if (cpu.has_sse41() && FLAG_enable_sse4_1) supported_ |= 1u << SSE4_1;
58 if (cpu.has_sse3() && FLAG_enable_sse3) supported_ |= 1u << SSE3; 58 if (cpu.has_sse3() && FLAG_enable_sse3) supported_ |= 1u << SSE3;
59 // SAHF is not generally available in long mode. 59 // SAHF is not generally available in long mode.
60 if (cpu.has_sahf() && FLAG_enable_sahf) supported_ |= 1u << SAHF; 60 if (cpu.has_sahf() && FLAG_enable_sahf) supported_ |= 1u << SAHF;
61 if (cpu.has_avx() && EnableAVX()) supported_ |= 1u << AVX; 61 if (cpu.has_avx() && EnableAVX()) supported_ |= 1u << AVX;
62 if (cpu.has_fma3() && FLAG_enable_fma3) supported_ |= 1u << FMA3; 62 if (cpu.has_fma3() && FLAG_enable_fma3) supported_ |= 1u << FMA3;
63 if (strcmp(FLAG_mcpu, "auto") == 0) {
64 if (cpu.is_atom()) supported_ |= 1u << ATOM;
65 } else if (strcmp(FLAG_mcpu, "atom") == 0) {
66 supported_ |= 1u << ATOM;
67 }
63 } 68 }
64 69
65 70
66 void CpuFeatures::PrintTarget() { } 71 void CpuFeatures::PrintTarget() { }
67 void CpuFeatures::PrintFeatures() { 72 void CpuFeatures::PrintFeatures() {
68 printf("SSE3=%d SSE4_1=%d SAHF=%d AVX=%d FMA3=%d\n", 73 printf("SSE3=%d SSE4_1=%d SAHF=%d AVX=%d FMA3=%d ATOM=%d\n",
69 CpuFeatures::IsSupported(SSE3), CpuFeatures::IsSupported(SSE4_1), 74 CpuFeatures::IsSupported(SSE3), CpuFeatures::IsSupported(SSE4_1),
70 CpuFeatures::IsSupported(SAHF), CpuFeatures::IsSupported(AVX), 75 CpuFeatures::IsSupported(SAHF), CpuFeatures::IsSupported(AVX),
71 CpuFeatures::IsSupported(FMA3)); 76 CpuFeatures::IsSupported(FMA3), CpuFeatures::IsSupported(ATOM));
72 } 77 }
73 78
74 79
75 // ----------------------------------------------------------------------------- 80 // -----------------------------------------------------------------------------
76 // Implementation of RelocInfo 81 // Implementation of RelocInfo
77 82
78 // Patch the code at the current PC with a call to the target address. 83 // Patch the code at the current PC with a call to the target address.
79 // Additional guard int3 instructions can be added if required. 84 // Additional guard int3 instructions can be added if required.
80 void RelocInfo::PatchCodeWithCall(Address target, int guard_bytes) { 85 void RelocInfo::PatchCodeWithCall(Address target, int guard_bytes) {
81 int code_size = Assembler::kCallSequenceLength + guard_bytes; 86 int code_size = Assembler::kCallSequenceLength + guard_bytes;
(...skipping 3298 matching lines...) Expand 10 before | Expand all | Expand 10 after
3380 3385
3381 3386
3382 bool RelocInfo::IsInConstantPool() { 3387 bool RelocInfo::IsInConstantPool() {
3383 return false; 3388 return false;
3384 } 3389 }
3385 3390
3386 3391
3387 } } // namespace v8::internal 3392 } } // namespace v8::internal
3388 3393
3389 #endif // V8_TARGET_ARCH_X64 3394 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/ia32/assembler-ia32.cc ('k') | src/x64/macro-assembler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698