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 28 matching lines...) Expand all Loading... |
39 namespace v8 { | 39 namespace v8 { |
40 namespace internal { | 40 namespace internal { |
41 | 41 |
42 | 42 |
43 // ----------------------------------------------------------------------------- | 43 // ----------------------------------------------------------------------------- |
44 // CpuFeatures implementation. | 44 // CpuFeatures implementation. |
45 | 45 |
46 void CpuFeatures::ProbeImpl(bool cross_compile) { | 46 void CpuFeatures::ProbeImpl(bool cross_compile) { |
47 // AArch64 has no configuration options, no further probing is required. | 47 // AArch64 has no configuration options, no further probing is required. |
48 supported_ = 0; | 48 supported_ = 0; |
| 49 |
| 50 // Only use statically determined features for cross compile (snapshot). |
| 51 if (cross_compile) return; |
| 52 |
| 53 // Probe for runtime features |
| 54 base::CPU cpu; |
| 55 if (cpu.implementer() == base::CPU::NVIDIA && |
| 56 cpu.variant() == base::CPU::NVIDIA_DENVER) { |
| 57 supported_ |= 1u << COHERENT_CACHE; |
| 58 } |
49 } | 59 } |
50 | 60 |
51 | 61 |
52 void CpuFeatures::PrintTarget() { } | 62 void CpuFeatures::PrintTarget() { } |
53 void CpuFeatures::PrintFeatures() { } | 63 |
| 64 |
| 65 void CpuFeatures::PrintFeatures() { |
| 66 printf("COHERENT_CACHE=%d\n", CpuFeatures::IsSupported(COHERENT_CACHE)); |
| 67 } |
54 | 68 |
55 | 69 |
56 // ----------------------------------------------------------------------------- | 70 // ----------------------------------------------------------------------------- |
57 // CPURegList utilities. | 71 // CPURegList utilities. |
58 | 72 |
59 CPURegister CPURegList::PopLowestIndex() { | 73 CPURegister CPURegList::PopLowestIndex() { |
60 DCHECK(IsValid()); | 74 DCHECK(IsValid()); |
61 if (IsEmpty()) { | 75 if (IsEmpty()) { |
62 return NoCPUReg; | 76 return NoCPUReg; |
63 } | 77 } |
(...skipping 3065 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3129 movz(scratch, (target_offset >> 16) & 0xFFFF, 16); | 3143 movz(scratch, (target_offset >> 16) & 0xFFFF, 16); |
3130 movk(scratch, (target_offset >> 32) & 0xFFFF, 32); | 3144 movk(scratch, (target_offset >> 32) & 0xFFFF, 32); |
3131 DCHECK((target_offset >> 48) == 0); | 3145 DCHECK((target_offset >> 48) == 0); |
3132 add(rd, rd, scratch); | 3146 add(rd, rd, scratch); |
3133 } | 3147 } |
3134 | 3148 |
3135 | 3149 |
3136 } } // namespace v8::internal | 3150 } } // namespace v8::internal |
3137 | 3151 |
3138 #endif // V8_TARGET_ARCH_ARM64 | 3152 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |