OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef V8_ARM64_MACRO_ASSEMBLER_ARM64_INL_H_ | 5 #ifndef V8_ARM64_MACRO_ASSEMBLER_ARM64_INL_H_ |
6 #define V8_ARM64_MACRO_ASSEMBLER_ARM64_INL_H_ | 6 #define V8_ARM64_MACRO_ASSEMBLER_ARM64_INL_H_ |
7 | 7 |
8 #include <ctype.h> | 8 #include <ctype.h> |
9 | 9 |
10 #include "src/globals.h" | 10 #include "src/globals.h" |
(...skipping 1226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1237 void MacroAssembler::Uxtw(const Register& rd, const Register& rn) { | 1237 void MacroAssembler::Uxtw(const Register& rd, const Register& rn) { |
1238 DCHECK(allow_macro_instructions_); | 1238 DCHECK(allow_macro_instructions_); |
1239 DCHECK(!rd.IsZero()); | 1239 DCHECK(!rd.IsZero()); |
1240 uxtw(rd, rn); | 1240 uxtw(rd, rn); |
1241 } | 1241 } |
1242 | 1242 |
1243 | 1243 |
1244 void MacroAssembler::BumpSystemStackPointer(const Operand& space) { | 1244 void MacroAssembler::BumpSystemStackPointer(const Operand& space) { |
1245 DCHECK(!csp.Is(sp_)); | 1245 DCHECK(!csp.Is(sp_)); |
1246 if (!TmpList()->IsEmpty()) { | 1246 if (!TmpList()->IsEmpty()) { |
1247 if (CpuFeatures::IsSupported(ALWAYS_ALIGN_CSP)) { | 1247 Sub(csp, StackPointer(), space); |
1248 UseScratchRegisterScope temps(this); | |
1249 Register temp = temps.AcquireX(); | |
1250 Sub(temp, StackPointer(), space); | |
1251 Bic(csp, temp, 0xf); | |
1252 } else { | |
1253 Sub(csp, StackPointer(), space); | |
1254 } | |
1255 } else { | 1248 } else { |
1256 // TODO(jbramley): Several callers rely on this not using scratch | 1249 // TODO(jbramley): Several callers rely on this not using scratch |
1257 // registers, so we use the assembler directly here. However, this means | 1250 // registers, so we use the assembler directly here. However, this means |
1258 // that large immediate values of 'space' cannot be handled cleanly. (Only | 1251 // that large immediate values of 'space' cannot be handled cleanly. (Only |
1259 // 24-bits immediates or values of 'space' that can be encoded in one | 1252 // 24-bits immediates or values of 'space' that can be encoded in one |
1260 // instruction are accepted.) Once we implement our flexible scratch | 1253 // instruction are accepted.) Once we implement our flexible scratch |
1261 // register idea, we could greatly simplify this function. | 1254 // register idea, we could greatly simplify this function. |
1262 InstructionAccurateScope scope(this); | 1255 InstructionAccurateScope scope(this); |
1263 DCHECK(space.IsImmediate()); | 1256 DCHECK(space.IsImmediate()); |
1264 // Align to 16 bytes. | 1257 // Align to 16 bytes. |
(...skipping 16 matching lines...) Expand all Loading... |
1281 } | 1274 } |
1282 } | 1275 } |
1283 AssertStackConsistency(); | 1276 AssertStackConsistency(); |
1284 } | 1277 } |
1285 | 1278 |
1286 | 1279 |
1287 void MacroAssembler::SyncSystemStackPointer() { | 1280 void MacroAssembler::SyncSystemStackPointer() { |
1288 DCHECK(emit_debug_code()); | 1281 DCHECK(emit_debug_code()); |
1289 DCHECK(!csp.Is(sp_)); | 1282 DCHECK(!csp.Is(sp_)); |
1290 { InstructionAccurateScope scope(this); | 1283 { InstructionAccurateScope scope(this); |
1291 if (CpuFeatures::IsSupported(ALWAYS_ALIGN_CSP)) { | 1284 mov(csp, StackPointer()); |
1292 bic(csp, StackPointer(), 0xf); | |
1293 } else { | |
1294 mov(csp, StackPointer()); | |
1295 } | |
1296 } | 1285 } |
1297 AssertStackConsistency(); | 1286 AssertStackConsistency(); |
1298 } | 1287 } |
1299 | 1288 |
1300 | 1289 |
1301 void MacroAssembler::InitializeRootRegister() { | 1290 void MacroAssembler::InitializeRootRegister() { |
1302 ExternalReference roots_array_start = | 1291 ExternalReference roots_array_start = |
1303 ExternalReference::roots_array_start(isolate()); | 1292 ExternalReference::roots_array_start(isolate()); |
1304 Mov(root, Operand(roots_array_start)); | 1293 Mov(root, Operand(roots_array_start)); |
1305 } | 1294 } |
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1707 // characters are reserved for controlling features of the instrumentation. | 1696 // characters are reserved for controlling features of the instrumentation. |
1708 DCHECK(isprint(marker_name[0]) && isprint(marker_name[1])); | 1697 DCHECK(isprint(marker_name[0]) && isprint(marker_name[1])); |
1709 | 1698 |
1710 InstructionAccurateScope scope(this, 1); | 1699 InstructionAccurateScope scope(this, 1); |
1711 movn(xzr, (marker_name[1] << 8) | marker_name[0]); | 1700 movn(xzr, (marker_name[1] << 8) | marker_name[0]); |
1712 } | 1701 } |
1713 | 1702 |
1714 } } // namespace v8::internal | 1703 } } // namespace v8::internal |
1715 | 1704 |
1716 #endif // V8_ARM64_MACRO_ASSEMBLER_ARM64_INL_H_ | 1705 #endif // V8_ARM64_MACRO_ASSEMBLER_ARM64_INL_H_ |
OLD | NEW |