OLD | NEW |
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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 CHECK(cpu.has_sse2()); // SSE2 support is mandatory. | 85 CHECK(cpu.has_sse2()); // SSE2 support is mandatory. |
86 CHECK(cpu.has_cmov()); // CMOV support is mandatory. | 86 CHECK(cpu.has_cmov()); // CMOV support is mandatory. |
87 | 87 |
88 // Only use statically determined features for cross compile (snapshot). | 88 // Only use statically determined features for cross compile (snapshot). |
89 if (cross_compile) return; | 89 if (cross_compile) return; |
90 | 90 |
91 if (cpu.has_sse41() && FLAG_enable_sse4_1) supported_ |= 1u << SSE4_1; | 91 if (cpu.has_sse41() && FLAG_enable_sse4_1) supported_ |= 1u << SSE4_1; |
92 if (cpu.has_sse3() && FLAG_enable_sse3) supported_ |= 1u << SSE3; | 92 if (cpu.has_sse3() && FLAG_enable_sse3) supported_ |= 1u << SSE3; |
93 if (cpu.has_avx() && EnableAVX()) supported_ |= 1u << AVX; | 93 if (cpu.has_avx() && EnableAVX()) supported_ |= 1u << AVX; |
94 if (cpu.has_fma3() && FLAG_enable_fma3) supported_ |= 1u << FMA3; | 94 if (cpu.has_fma3() && FLAG_enable_fma3) supported_ |= 1u << FMA3; |
| 95 if (strcmp(FLAG_mcpu, "auto") == 0) { |
| 96 if (cpu.is_atom()) supported_ |= 1u << ATOM; |
| 97 } else if (strcmp(FLAG_mcpu, "atom") == 0) { |
| 98 supported_ |= 1u << ATOM; |
| 99 } |
95 } | 100 } |
96 | 101 |
97 | 102 |
98 void CpuFeatures::PrintTarget() { } | 103 void CpuFeatures::PrintTarget() { } |
99 void CpuFeatures::PrintFeatures() { | 104 void CpuFeatures::PrintFeatures() { |
100 printf("SSE3=%d SSE4_1=%d AVX=%d FMA3=%d\n", CpuFeatures::IsSupported(SSE3), | 105 printf("SSE3=%d SSE4_1=%d AVX=%d FMA3=%d ATOM=%d\n", |
101 CpuFeatures::IsSupported(SSE4_1), CpuFeatures::IsSupported(AVX), | 106 CpuFeatures::IsSupported(SSE3), CpuFeatures::IsSupported(SSE4_1), |
102 CpuFeatures::IsSupported(FMA3)); | 107 CpuFeatures::IsSupported(AVX), CpuFeatures::IsSupported(FMA3), |
| 108 CpuFeatures::IsSupported(ATOM)); |
103 } | 109 } |
104 | 110 |
105 | 111 |
106 // ----------------------------------------------------------------------------- | 112 // ----------------------------------------------------------------------------- |
107 // Implementation of Displacement | 113 // Implementation of Displacement |
108 | 114 |
109 void Displacement::init(Label* L, Type type) { | 115 void Displacement::init(Label* L, Type type) { |
110 DCHECK(!L->is_bound()); | 116 DCHECK(!L->is_bound()); |
111 int next = 0; | 117 int next = 0; |
112 if (L->is_linked()) { | 118 if (L->is_linked()) { |
(...skipping 2662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2775 fprintf(coverage_log, "%s\n", file_line); | 2781 fprintf(coverage_log, "%s\n", file_line); |
2776 fflush(coverage_log); | 2782 fflush(coverage_log); |
2777 } | 2783 } |
2778 } | 2784 } |
2779 | 2785 |
2780 #endif | 2786 #endif |
2781 | 2787 |
2782 } } // namespace v8::internal | 2788 } } // namespace v8::internal |
2783 | 2789 |
2784 #endif // V8_TARGET_ARCH_IA32 | 2790 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |