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

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

Issue 1287383003: Re-reland: Remove register index/code indirection (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix MIPS tests again Created 5 years, 2 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/arm64/assembler-arm64.h ('k') | src/arm64/constants-arm64.h » ('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 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 17 matching lines...) Expand all
28 28
29 #if V8_TARGET_ARCH_ARM64 29 #if V8_TARGET_ARCH_ARM64
30 30
31 #define ARM64_DEFINE_REG_STATICS 31 #define ARM64_DEFINE_REG_STATICS
32 #include "src/arm64/assembler-arm64.h" 32 #include "src/arm64/assembler-arm64.h"
33 33
34 #include "src/arm64/assembler-arm64-inl.h" 34 #include "src/arm64/assembler-arm64-inl.h"
35 #include "src/arm64/frames-arm64.h" 35 #include "src/arm64/frames-arm64.h"
36 #include "src/base/bits.h" 36 #include "src/base/bits.h"
37 #include "src/base/cpu.h" 37 #include "src/base/cpu.h"
38 #include "src/register-configuration.h"
38 39
39 namespace v8 { 40 namespace v8 {
40 namespace internal { 41 namespace internal {
41 42
42 43
43 // ----------------------------------------------------------------------------- 44 // -----------------------------------------------------------------------------
44 // CpuFeatures implementation. 45 // CpuFeatures implementation.
45 46
46 void CpuFeatures::ProbeImpl(bool cross_compile) { 47 void CpuFeatures::ProbeImpl(bool cross_compile) {
47 // AArch64 has no configuration options, no further probing is required. 48 // AArch64 has no configuration options, no further probing is required.
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 186
186 bool RelocInfo::IsInConstantPool() { 187 bool RelocInfo::IsInConstantPool() {
187 Instruction* instr = reinterpret_cast<Instruction*>(pc_); 188 Instruction* instr = reinterpret_cast<Instruction*>(pc_);
188 return instr->IsLdrLiteralX(); 189 return instr->IsLdrLiteralX();
189 } 190 }
190 191
191 192
192 Register GetAllocatableRegisterThatIsNotOneOf(Register reg1, Register reg2, 193 Register GetAllocatableRegisterThatIsNotOneOf(Register reg1, Register reg2,
193 Register reg3, Register reg4) { 194 Register reg3, Register reg4) {
194 CPURegList regs(reg1, reg2, reg3, reg4); 195 CPURegList regs(reg1, reg2, reg3, reg4);
195 for (int i = 0; i < Register::NumAllocatableRegisters(); i++) { 196 const RegisterConfiguration* config = RegisterConfiguration::ArchDefault();
196 Register candidate = Register::FromAllocationIndex(i); 197 for (int i = 0; i < config->num_allocatable_double_registers(); ++i) {
198 int code = config->GetAllocatableDoubleCode(i);
199 Register candidate = Register::from_code(code);
197 if (regs.IncludesAliasOf(candidate)) continue; 200 if (regs.IncludesAliasOf(candidate)) continue;
198 return candidate; 201 return candidate;
199 } 202 }
200 UNREACHABLE(); 203 UNREACHABLE();
201 return NoReg; 204 return NoReg;
202 } 205 }
203 206
204 207
205 bool AreAliased(const CPURegister& reg1, const CPURegister& reg2, 208 bool AreAliased(const CPURegister& reg1, const CPURegister& reg2,
206 const CPURegister& reg3, const CPURegister& reg4, 209 const CPURegister& reg3, const CPURegister& reg4,
(...skipping 2932 matching lines...) Expand 10 before | Expand all | Expand 10 after
3139 movk(scratch, (target_offset >> 32) & 0xFFFF, 32); 3142 movk(scratch, (target_offset >> 32) & 0xFFFF, 32);
3140 DCHECK((target_offset >> 48) == 0); 3143 DCHECK((target_offset >> 48) == 0);
3141 add(rd, rd, scratch); 3144 add(rd, rd, scratch);
3142 } 3145 }
3143 3146
3144 3147
3145 } // namespace internal 3148 } // namespace internal
3146 } // namespace v8 3149 } // namespace v8
3147 3150
3148 #endif // V8_TARGET_ARCH_ARM64 3151 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/arm64/assembler-arm64.h ('k') | src/arm64/constants-arm64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698