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

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

Issue 1643363002: Detect cache line size on Linux for PPC hosts. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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 | « no previous file | src/arm/codegen-arm.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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 if ((answer & (1u << ARMv7)) && FLAG_enable_unaligned_accesses) { 75 if ((answer & (1u << ARMv7)) && FLAG_enable_unaligned_accesses) {
76 answer |= 1u << UNALIGNED_ACCESSES; 76 answer |= 1u << UNALIGNED_ACCESSES;
77 } 77 }
78 78
79 return answer; 79 return answer;
80 } 80 }
81 81
82 82
83 void CpuFeatures::ProbeImpl(bool cross_compile) { 83 void CpuFeatures::ProbeImpl(bool cross_compile) {
84 supported_ |= CpuFeaturesImpliedByCompiler(); 84 supported_ |= CpuFeaturesImpliedByCompiler();
85 cache_line_size_ = 64; 85 dcache_line_size_ = 64;
86 86
87 // Only use statically determined features for cross compile (snapshot). 87 // Only use statically determined features for cross compile (snapshot).
88 if (cross_compile) return; 88 if (cross_compile) return;
89 89
90 #ifndef __arm__ 90 #ifndef __arm__
91 // For the simulator build, use whatever the flags specify. 91 // For the simulator build, use whatever the flags specify.
92 if (FLAG_enable_armv8) { 92 if (FLAG_enable_armv8) {
93 supported_ |= 1u << ARMv8; 93 supported_ |= 1u << ARMv8;
94 // ARMv8 always features VFP and NEON. 94 // ARMv8 always features VFP and NEON.
95 supported_ |= 1u << ARMv7 | 1u << VFP3 | 1u << NEON | 1u << VFP32DREGS; 95 supported_ |= 1u << ARMv7 | 1u << VFP3 | 1u << NEON | 1u << VFP32DREGS;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 // Use movw/movt for QUALCOMM ARMv7 cores. 130 // Use movw/movt for QUALCOMM ARMv7 cores.
131 if (FLAG_enable_movw_movt && cpu.implementer() == base::CPU::QUALCOMM) { 131 if (FLAG_enable_movw_movt && cpu.implementer() == base::CPU::QUALCOMM) {
132 supported_ |= 1u << MOVW_MOVT_IMMEDIATE_LOADS; 132 supported_ |= 1u << MOVW_MOVT_IMMEDIATE_LOADS;
133 } 133 }
134 } 134 }
135 135
136 // ARM Cortex-A9 and Cortex-A5 have 32 byte cachelines. 136 // ARM Cortex-A9 and Cortex-A5 have 32 byte cachelines.
137 if (cpu.implementer() == base::CPU::ARM && 137 if (cpu.implementer() == base::CPU::ARM &&
138 (cpu.part() == base::CPU::ARM_CORTEX_A5 || 138 (cpu.part() == base::CPU::ARM_CORTEX_A5 ||
139 cpu.part() == base::CPU::ARM_CORTEX_A9)) { 139 cpu.part() == base::CPU::ARM_CORTEX_A9)) {
140 cache_line_size_ = 32; 140 dcache_line_size_ = 32;
141 } 141 }
142 142
143 if (FLAG_enable_32dregs && cpu.has_vfp3_d32()) supported_ |= 1u << VFP32DREGS; 143 if (FLAG_enable_32dregs && cpu.has_vfp3_d32()) supported_ |= 1u << VFP32DREGS;
144 144
145 if (cpu.implementer() == base::CPU::NVIDIA && 145 if (cpu.implementer() == base::CPU::NVIDIA &&
146 cpu.variant() == base::CPU::NVIDIA_DENVER && 146 cpu.variant() == base::CPU::NVIDIA_DENVER &&
147 cpu.part() <= base::CPU::NVIDIA_DENVER_V10) { 147 cpu.part() <= base::CPU::NVIDIA_DENVER_V10) {
148 supported_ |= 1u << COHERENT_CACHE; 148 supported_ |= 1u << COHERENT_CACHE;
149 } 149 }
150 #endif 150 #endif
(...skipping 3960 matching lines...) Expand 10 before | Expand all | Expand 10 after
4111 DCHECK(is_uint12(offset)); 4111 DCHECK(is_uint12(offset));
4112 instr_at_put(pc, SetLdrRegisterImmediateOffset(instr, offset)); 4112 instr_at_put(pc, SetLdrRegisterImmediateOffset(instr, offset));
4113 } 4113 }
4114 } 4114 }
4115 4115
4116 4116
4117 } // namespace internal 4117 } // namespace internal
4118 } // namespace v8 4118 } // namespace v8
4119 4119
4120 #endif // V8_TARGET_ARCH_ARM 4120 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/arm/codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698