OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/x64/assembler-x64.h" | 5 #include "src/x64/assembler-x64.h" |
6 | 6 |
7 #include <cstring> | 7 #include <cstring> |
8 | 8 |
9 #if V8_TARGET_ARCH_X64 | 9 #if V8_TARGET_ARCH_X64 |
10 | 10 |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 // Indicate that code has changed. | 149 // Indicate that code has changed. |
150 CpuFeatures::FlushICache(pc_, instruction_count); | 150 CpuFeatures::FlushICache(pc_, instruction_count); |
151 } | 151 } |
152 | 152 |
153 | 153 |
154 // ----------------------------------------------------------------------------- | 154 // ----------------------------------------------------------------------------- |
155 // Register constants. | 155 // Register constants. |
156 | 156 |
157 const int | 157 const int |
158 Register::kRegisterCodeByAllocationIndex[kMaxNumAllocatableRegisters] = { | 158 Register::kRegisterCodeByAllocationIndex[kMaxNumAllocatableRegisters] = { |
159 // rax, rbx, rdx, rcx, rsi, rdi, r8, r9, r11, r14, r15 | 159 // rax, rbx, rdx, rcx, rsi, rdi, r8, r9, r11, r12, r14, r15 |
160 0, 3, 2, 1, 6, 7, 8, 9, 11, 14, 15 | 160 0, 3, 2, 1, 6, 7, 8, 9, 11, 12, 14, 15 |
161 }; | 161 }; |
162 | 162 |
163 const int Register::kAllocationIndexByRegisterCode[kNumRegisters] = { | 163 const int Register::kAllocationIndexByRegisterCode[kNumRegisters] = { |
164 0, 3, 2, 1, -1, -1, 4, 5, 6, 7, -1, 8, -1, -1, 9, 10 | 164 0, 3, 2, 1, -1, -1, 4, 5, 6, 7, -1, 8, 9, -1, 10, 11 |
165 }; | 165 }; |
166 | 166 |
167 | 167 |
168 // ----------------------------------------------------------------------------- | 168 // ----------------------------------------------------------------------------- |
169 // Implementation of Operand | 169 // Implementation of Operand |
170 | 170 |
171 Operand::Operand(Register base, int32_t disp) : rex_(0) { | 171 Operand::Operand(Register base, int32_t disp) : rex_(0) { |
172 len_ = 1; | 172 len_ = 1; |
173 if (base.is(rsp) || base.is(r12)) { | 173 if (base.is(rsp) || base.is(r12)) { |
174 // SIB byte is needed to encode (rsp + offset) or (r12 + offset). | 174 // SIB byte is needed to encode (rsp + offset) or (r12 + offset). |
(...skipping 3282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3457 | 3457 |
3458 | 3458 |
3459 bool RelocInfo::IsInConstantPool() { | 3459 bool RelocInfo::IsInConstantPool() { |
3460 return false; | 3460 return false; |
3461 } | 3461 } |
3462 | 3462 |
3463 | 3463 |
3464 } } // namespace v8::internal | 3464 } } // namespace v8::internal |
3465 | 3465 |
3466 #endif // V8_TARGET_ARCH_X64 | 3466 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |