OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // | 2 // |
3 // Redistribution and use in source and binary forms, with or without | 3 // Redistribution and use in source and binary forms, with or without |
4 // modification, are permitted provided that the following conditions are | 4 // modification, are permitted provided that the following conditions are |
5 // met: | 5 // met: |
6 // | 6 // |
7 // * Redistributions of source code must retain the above copyright | 7 // * Redistributions of source code must retain the above copyright |
8 // notice, this list of conditions and the following disclaimer. | 8 // notice, this list of conditions and the following disclaimer. |
9 // * Redistributions in binary form must reproduce the above | 9 // * Redistributions in binary form must reproduce the above |
10 // copyright notice, this list of conditions and the following | 10 // copyright notice, this list of conditions and the following |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 // ----------------------------------------------------------------------------- | 44 // ----------------------------------------------------------------------------- |
45 // CpuFeatures implementation. | 45 // CpuFeatures implementation. |
46 | 46 |
47 void CpuFeatures::ProbeImpl(bool cross_compile) { | 47 void CpuFeatures::ProbeImpl(bool cross_compile) { |
48 // AArch64 has no configuration options, no further probing is required. | 48 // AArch64 has no configuration options, no further probing is required. |
49 supported_ = 0; | 49 supported_ = 0; |
50 | 50 |
51 // Only use statically determined features for cross compile (snapshot). | 51 // Only use statically determined features for cross compile (snapshot). |
52 if (cross_compile) return; | 52 if (cross_compile) return; |
53 | 53 |
54 // Probe for runtime features | 54 // We used to probe for coherent cache support, but on older CPUs it |
55 base::CPU cpu; | 55 // causes crashes (crbug.com/524337), and newer CPUs don't even have |
56 if (cpu.implementer() == base::CPU::NVIDIA && | 56 // the feature any more. |
57 cpu.variant() == base::CPU::NVIDIA_DENVER && | |
58 cpu.part() <= base::CPU::NVIDIA_DENVER_V10) { | |
59 // TODO(jkummerow): This is turned off as an experiment to see if it | |
60 // affects crash rates. Keep an eye on crash reports and either remove | |
61 // coherent cache support permanently, or re-enable it! | |
62 // supported_ |= 1u << COHERENT_CACHE; | |
63 } | |
64 } | 57 } |
65 | 58 |
66 | |
67 void CpuFeatures::PrintTarget() { } | 59 void CpuFeatures::PrintTarget() { } |
68 | 60 void CpuFeatures::PrintFeatures() {} |
69 | |
70 void CpuFeatures::PrintFeatures() { | |
71 printf("COHERENT_CACHE=%d\n", CpuFeatures::IsSupported(COHERENT_CACHE)); | |
72 } | |
73 | |
74 | 61 |
75 // ----------------------------------------------------------------------------- | 62 // ----------------------------------------------------------------------------- |
76 // CPURegList utilities. | 63 // CPURegList utilities. |
77 | 64 |
78 CPURegister CPURegList::PopLowestIndex() { | 65 CPURegister CPURegList::PopLowestIndex() { |
79 DCHECK(IsValid()); | 66 DCHECK(IsValid()); |
80 if (IsEmpty()) { | 67 if (IsEmpty()) { |
81 return NoCPUReg; | 68 return NoCPUReg; |
82 } | 69 } |
83 int index = CountTrailingZeros(list_, kRegListSizeInBits); | 70 int index = CountTrailingZeros(list_, kRegListSizeInBits); |
(...skipping 3091 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3175 movk(scratch, (target_offset >> 32) & 0xFFFF, 32); | 3162 movk(scratch, (target_offset >> 32) & 0xFFFF, 32); |
3176 DCHECK((target_offset >> 48) == 0); | 3163 DCHECK((target_offset >> 48) == 0); |
3177 add(rd, rd, scratch); | 3164 add(rd, rd, scratch); |
3178 } | 3165 } |
3179 | 3166 |
3180 | 3167 |
3181 } // namespace internal | 3168 } // namespace internal |
3182 } // namespace v8 | 3169 } // namespace v8 |
3183 | 3170 |
3184 #endif // V8_TARGET_ARCH_ARM64 | 3171 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |