11cb0ef41Sopenharmony_ci// Copyright 2018 the V8 project authors. All rights reserved. 21cb0ef41Sopenharmony_ci// Use of this source code is governed by a BSD-style license that can be 31cb0ef41Sopenharmony_ci// found in the LICENSE file. 41cb0ef41Sopenharmony_ci 51cb0ef41Sopenharmony_ci#ifndef V8_CODEGEN_ARM_REGISTER_ARM_H_ 61cb0ef41Sopenharmony_ci#define V8_CODEGEN_ARM_REGISTER_ARM_H_ 71cb0ef41Sopenharmony_ci 81cb0ef41Sopenharmony_ci#include "src/codegen/register-base.h" 91cb0ef41Sopenharmony_ci 101cb0ef41Sopenharmony_cinamespace v8 { 111cb0ef41Sopenharmony_cinamespace internal { 121cb0ef41Sopenharmony_ci 131cb0ef41Sopenharmony_ci// clang-format off 141cb0ef41Sopenharmony_ci#define GENERAL_REGISTERS(V) \ 151cb0ef41Sopenharmony_ci V(r0) V(r1) V(r2) V(r3) V(r4) V(r5) V(r6) V(r7) \ 161cb0ef41Sopenharmony_ci V(r8) V(r9) V(r10) V(fp) V(ip) V(sp) V(lr) V(pc) 171cb0ef41Sopenharmony_ci 181cb0ef41Sopenharmony_ci#define ALLOCATABLE_GENERAL_REGISTERS(V) \ 191cb0ef41Sopenharmony_ci V(r0) V(r1) V(r2) V(r3) V(r4) V(r5) V(r6) V(r7) \ 201cb0ef41Sopenharmony_ci V(r8) V(r9) 211cb0ef41Sopenharmony_ci 221cb0ef41Sopenharmony_ci#define FLOAT_REGISTERS(V) \ 231cb0ef41Sopenharmony_ci V(s0) V(s1) V(s2) V(s3) V(s4) V(s5) V(s6) V(s7) \ 241cb0ef41Sopenharmony_ci V(s8) V(s9) V(s10) V(s11) V(s12) V(s13) V(s14) V(s15) \ 251cb0ef41Sopenharmony_ci V(s16) V(s17) V(s18) V(s19) V(s20) V(s21) V(s22) V(s23) \ 261cb0ef41Sopenharmony_ci V(s24) V(s25) V(s26) V(s27) V(s28) V(s29) V(s30) V(s31) 271cb0ef41Sopenharmony_ci 281cb0ef41Sopenharmony_ci#define LOW_DOUBLE_REGISTERS(V) \ 291cb0ef41Sopenharmony_ci V(d0) V(d1) V(d2) V(d3) V(d4) V(d5) V(d6) V(d7) \ 301cb0ef41Sopenharmony_ci V(d8) V(d9) V(d10) V(d11) V(d12) V(d13) V(d14) V(d15) 311cb0ef41Sopenharmony_ci 321cb0ef41Sopenharmony_ci#define NON_LOW_DOUBLE_REGISTERS(V) \ 331cb0ef41Sopenharmony_ci V(d16) V(d17) V(d18) V(d19) V(d20) V(d21) V(d22) V(d23) \ 341cb0ef41Sopenharmony_ci V(d24) V(d25) V(d26) V(d27) V(d28) V(d29) V(d30) V(d31) 351cb0ef41Sopenharmony_ci 361cb0ef41Sopenharmony_ci#define DOUBLE_REGISTERS(V) \ 371cb0ef41Sopenharmony_ci LOW_DOUBLE_REGISTERS(V) NON_LOW_DOUBLE_REGISTERS(V) 381cb0ef41Sopenharmony_ci 391cb0ef41Sopenharmony_ci#define SIMD128_REGISTERS(V) \ 401cb0ef41Sopenharmony_ci V(q0) V(q1) V(q2) V(q3) V(q4) V(q5) V(q6) V(q7) \ 411cb0ef41Sopenharmony_ci V(q8) V(q9) V(q10) V(q11) V(q12) V(q13) V(q14) V(q15) 421cb0ef41Sopenharmony_ci 431cb0ef41Sopenharmony_ci#define ALLOCATABLE_DOUBLE_REGISTERS(V) \ 441cb0ef41Sopenharmony_ci V(d0) V(d1) V(d2) V(d3) V(d4) V(d5) V(d6) V(d7) \ 451cb0ef41Sopenharmony_ci V(d8) V(d9) V(d10) V(d11) V(d12) \ 461cb0ef41Sopenharmony_ci V(d16) V(d17) V(d18) V(d19) V(d20) V(d21) V(d22) V(d23) \ 471cb0ef41Sopenharmony_ci V(d24) V(d25) V(d26) V(d27) V(d28) V(d29) V(d30) V(d31) 481cb0ef41Sopenharmony_ci 491cb0ef41Sopenharmony_ci#define ALLOCATABLE_NO_VFP32_DOUBLE_REGISTERS(V) \ 501cb0ef41Sopenharmony_ci V(d0) V(d1) V(d2) V(d3) V(d4) V(d5) V(d6) V(d7) \ 511cb0ef41Sopenharmony_ci V(d8) V(d9) V(d10) V(d11) V(d12) V(d15) 521cb0ef41Sopenharmony_ci 531cb0ef41Sopenharmony_ci#define C_REGISTERS(V) \ 541cb0ef41Sopenharmony_ci V(cr0) V(cr1) V(cr2) V(cr3) V(cr4) V(cr5) V(cr6) V(cr7) \ 551cb0ef41Sopenharmony_ci V(cr8) V(cr9) V(cr10) V(cr11) V(cr12) V(cr15) 561cb0ef41Sopenharmony_ci// clang-format on 571cb0ef41Sopenharmony_ci 581cb0ef41Sopenharmony_ci// The ARM ABI does not specify the usage of register r9, which may be reserved 591cb0ef41Sopenharmony_ci// as the static base or thread register on some platforms, in which case we 601cb0ef41Sopenharmony_ci// leave it alone. Adjust the value of kR9Available accordingly: 611cb0ef41Sopenharmony_ciconst int kR9Available = 1; // 1 if available to us, 0 if reserved 621cb0ef41Sopenharmony_ci 631cb0ef41Sopenharmony_cienum RegisterCode { 641cb0ef41Sopenharmony_ci#define REGISTER_CODE(R) kRegCode_##R, 651cb0ef41Sopenharmony_ci GENERAL_REGISTERS(REGISTER_CODE) 661cb0ef41Sopenharmony_ci#undef REGISTER_CODE 671cb0ef41Sopenharmony_ci kRegAfterLast 681cb0ef41Sopenharmony_ci}; 691cb0ef41Sopenharmony_ci 701cb0ef41Sopenharmony_ciclass Register : public RegisterBase<Register, kRegAfterLast> { 711cb0ef41Sopenharmony_ci friend class RegisterBase; 721cb0ef41Sopenharmony_ci 731cb0ef41Sopenharmony_ci explicit constexpr Register(int code) : RegisterBase(code) {} 741cb0ef41Sopenharmony_ci}; 751cb0ef41Sopenharmony_ci 761cb0ef41Sopenharmony_ciASSERT_TRIVIALLY_COPYABLE(Register); 771cb0ef41Sopenharmony_cistatic_assert(sizeof(Register) <= sizeof(int), 781cb0ef41Sopenharmony_ci "Register can efficiently be passed by value"); 791cb0ef41Sopenharmony_ci 801cb0ef41Sopenharmony_ci// r7: context register 811cb0ef41Sopenharmony_ci#define DECLARE_REGISTER(R) \ 821cb0ef41Sopenharmony_ci constexpr Register R = Register::from_code(kRegCode_##R); 831cb0ef41Sopenharmony_ciGENERAL_REGISTERS(DECLARE_REGISTER) 841cb0ef41Sopenharmony_ci#undef DECLARE_REGISTER 851cb0ef41Sopenharmony_ciconstexpr Register no_reg = Register::no_reg(); 861cb0ef41Sopenharmony_ci 871cb0ef41Sopenharmony_ci// Returns the number of padding slots needed for stack pointer alignment. 881cb0ef41Sopenharmony_ciconstexpr int ArgumentPaddingSlots(int argument_count) { 891cb0ef41Sopenharmony_ci // No argument padding required. 901cb0ef41Sopenharmony_ci return 0; 911cb0ef41Sopenharmony_ci} 921cb0ef41Sopenharmony_ci 931cb0ef41Sopenharmony_ciconstexpr AliasingKind kFPAliasing = AliasingKind::kCombine; 941cb0ef41Sopenharmony_ciconstexpr bool kSimdMaskRegisters = false; 951cb0ef41Sopenharmony_ci 961cb0ef41Sopenharmony_cienum SwVfpRegisterCode { 971cb0ef41Sopenharmony_ci#define REGISTER_CODE(R) kSwVfpCode_##R, 981cb0ef41Sopenharmony_ci FLOAT_REGISTERS(REGISTER_CODE) 991cb0ef41Sopenharmony_ci#undef REGISTER_CODE 1001cb0ef41Sopenharmony_ci kSwVfpAfterLast 1011cb0ef41Sopenharmony_ci}; 1021cb0ef41Sopenharmony_ci 1031cb0ef41Sopenharmony_ci// Representation of a list of non-overlapping VFP registers. This list 1041cb0ef41Sopenharmony_ci// represents the data layout of VFP registers as a bitfield: 1051cb0ef41Sopenharmony_ci// S registers cover 1 bit 1061cb0ef41Sopenharmony_ci// D registers cover 2 bits 1071cb0ef41Sopenharmony_ci// Q registers cover 4 bits 1081cb0ef41Sopenharmony_ci// 1091cb0ef41Sopenharmony_ci// This way, we make sure no registers in the list ever overlap. However, a list 1101cb0ef41Sopenharmony_ci// may represent multiple different sets of registers, 1111cb0ef41Sopenharmony_ci// e.g. [d0 s2 s3] <=> [s0 s1 d1]. 1121cb0ef41Sopenharmony_ciusing VfpRegList = uint64_t; 1131cb0ef41Sopenharmony_ci 1141cb0ef41Sopenharmony_ci// Single word VFP register. 1151cb0ef41Sopenharmony_ciclass SwVfpRegister : public RegisterBase<SwVfpRegister, kSwVfpAfterLast> { 1161cb0ef41Sopenharmony_ci public: 1171cb0ef41Sopenharmony_ci static constexpr int kSizeInBytes = 4; 1181cb0ef41Sopenharmony_ci 1191cb0ef41Sopenharmony_ci static void split_code(int reg_code, int* vm, int* m) { 1201cb0ef41Sopenharmony_ci DCHECK(from_code(reg_code).is_valid()); 1211cb0ef41Sopenharmony_ci *m = reg_code & 0x1; 1221cb0ef41Sopenharmony_ci *vm = reg_code >> 1; 1231cb0ef41Sopenharmony_ci } 1241cb0ef41Sopenharmony_ci void split_code(int* vm, int* m) const { split_code(code(), vm, m); } 1251cb0ef41Sopenharmony_ci VfpRegList ToVfpRegList() const { 1261cb0ef41Sopenharmony_ci DCHECK(is_valid()); 1271cb0ef41Sopenharmony_ci // Each bit in the list corresponds to a S register. 1281cb0ef41Sopenharmony_ci return uint64_t{0x1} << code(); 1291cb0ef41Sopenharmony_ci } 1301cb0ef41Sopenharmony_ci 1311cb0ef41Sopenharmony_ci private: 1321cb0ef41Sopenharmony_ci friend class RegisterBase; 1331cb0ef41Sopenharmony_ci explicit constexpr SwVfpRegister(int code) : RegisterBase(code) {} 1341cb0ef41Sopenharmony_ci}; 1351cb0ef41Sopenharmony_ci 1361cb0ef41Sopenharmony_ciASSERT_TRIVIALLY_COPYABLE(SwVfpRegister); 1371cb0ef41Sopenharmony_cistatic_assert(sizeof(SwVfpRegister) <= sizeof(int), 1381cb0ef41Sopenharmony_ci "SwVfpRegister can efficiently be passed by value"); 1391cb0ef41Sopenharmony_ci 1401cb0ef41Sopenharmony_ciusing FloatRegister = SwVfpRegister; 1411cb0ef41Sopenharmony_ci 1421cb0ef41Sopenharmony_cienum DoubleRegisterCode { 1431cb0ef41Sopenharmony_ci#define REGISTER_CODE(R) kDoubleCode_##R, 1441cb0ef41Sopenharmony_ci DOUBLE_REGISTERS(REGISTER_CODE) 1451cb0ef41Sopenharmony_ci#undef REGISTER_CODE 1461cb0ef41Sopenharmony_ci kDoubleAfterLast 1471cb0ef41Sopenharmony_ci}; 1481cb0ef41Sopenharmony_ci 1491cb0ef41Sopenharmony_ci// Double word VFP register. 1501cb0ef41Sopenharmony_ciclass DwVfpRegister : public RegisterBase<DwVfpRegister, kDoubleAfterLast> { 1511cb0ef41Sopenharmony_ci public: 1521cb0ef41Sopenharmony_ci static constexpr int kSizeInBytes = 8; 1531cb0ef41Sopenharmony_ci 1541cb0ef41Sopenharmony_ci // This function differs from kNumRegisters by returning the number of double 1551cb0ef41Sopenharmony_ci // registers supported by the current CPU, while kNumRegisters always returns 1561cb0ef41Sopenharmony_ci // 32. 1571cb0ef41Sopenharmony_ci inline static int SupportedRegisterCount(); 1581cb0ef41Sopenharmony_ci 1591cb0ef41Sopenharmony_ci static void split_code(int reg_code, int* vm, int* m) { 1601cb0ef41Sopenharmony_ci DCHECK(from_code(reg_code).is_valid()); 1611cb0ef41Sopenharmony_ci *m = (reg_code & 0x10) >> 4; 1621cb0ef41Sopenharmony_ci *vm = reg_code & 0x0F; 1631cb0ef41Sopenharmony_ci } 1641cb0ef41Sopenharmony_ci void split_code(int* vm, int* m) const { split_code(code(), vm, m); } 1651cb0ef41Sopenharmony_ci VfpRegList ToVfpRegList() const { 1661cb0ef41Sopenharmony_ci DCHECK(is_valid()); 1671cb0ef41Sopenharmony_ci // A D register overlaps two S registers. 1681cb0ef41Sopenharmony_ci return uint64_t{0x3} << (code() * 2); 1691cb0ef41Sopenharmony_ci } 1701cb0ef41Sopenharmony_ci 1711cb0ef41Sopenharmony_ci private: 1721cb0ef41Sopenharmony_ci friend class RegisterBase; 1731cb0ef41Sopenharmony_ci friend class LowDwVfpRegister; 1741cb0ef41Sopenharmony_ci explicit constexpr DwVfpRegister(int code) : RegisterBase(code) {} 1751cb0ef41Sopenharmony_ci}; 1761cb0ef41Sopenharmony_ci 1771cb0ef41Sopenharmony_ciASSERT_TRIVIALLY_COPYABLE(DwVfpRegister); 1781cb0ef41Sopenharmony_cistatic_assert(sizeof(DwVfpRegister) <= sizeof(int), 1791cb0ef41Sopenharmony_ci "DwVfpRegister can efficiently be passed by value"); 1801cb0ef41Sopenharmony_ci 1811cb0ef41Sopenharmony_ciusing DoubleRegister = DwVfpRegister; 1821cb0ef41Sopenharmony_ci 1831cb0ef41Sopenharmony_ci// Double word VFP register d0-15. 1841cb0ef41Sopenharmony_ciclass LowDwVfpRegister 1851cb0ef41Sopenharmony_ci : public RegisterBase<LowDwVfpRegister, kDoubleCode_d16> { 1861cb0ef41Sopenharmony_ci public: 1871cb0ef41Sopenharmony_ci constexpr operator DwVfpRegister() const { return DwVfpRegister(code()); } 1881cb0ef41Sopenharmony_ci 1891cb0ef41Sopenharmony_ci SwVfpRegister low() const { return SwVfpRegister::from_code(code() * 2); } 1901cb0ef41Sopenharmony_ci SwVfpRegister high() const { 1911cb0ef41Sopenharmony_ci return SwVfpRegister::from_code(code() * 2 + 1); 1921cb0ef41Sopenharmony_ci } 1931cb0ef41Sopenharmony_ci VfpRegList ToVfpRegList() const { 1941cb0ef41Sopenharmony_ci DCHECK(is_valid()); 1951cb0ef41Sopenharmony_ci // A D register overlaps two S registers. 1961cb0ef41Sopenharmony_ci return uint64_t{0x3} << (code() * 2); 1971cb0ef41Sopenharmony_ci } 1981cb0ef41Sopenharmony_ci 1991cb0ef41Sopenharmony_ci private: 2001cb0ef41Sopenharmony_ci friend class RegisterBase; 2011cb0ef41Sopenharmony_ci explicit constexpr LowDwVfpRegister(int code) : RegisterBase(code) {} 2021cb0ef41Sopenharmony_ci}; 2031cb0ef41Sopenharmony_ci 2041cb0ef41Sopenharmony_cienum Simd128RegisterCode { 2051cb0ef41Sopenharmony_ci#define REGISTER_CODE(R) kSimd128Code_##R, 2061cb0ef41Sopenharmony_ci SIMD128_REGISTERS(REGISTER_CODE) 2071cb0ef41Sopenharmony_ci#undef REGISTER_CODE 2081cb0ef41Sopenharmony_ci kSimd128AfterLast 2091cb0ef41Sopenharmony_ci}; 2101cb0ef41Sopenharmony_ci 2111cb0ef41Sopenharmony_ci// Quad word NEON register. 2121cb0ef41Sopenharmony_ciclass QwNeonRegister : public RegisterBase<QwNeonRegister, kSimd128AfterLast> { 2131cb0ef41Sopenharmony_ci public: 2141cb0ef41Sopenharmony_ci static void split_code(int reg_code, int* vm, int* m) { 2151cb0ef41Sopenharmony_ci DCHECK(from_code(reg_code).is_valid()); 2161cb0ef41Sopenharmony_ci int encoded_code = reg_code << 1; 2171cb0ef41Sopenharmony_ci *m = (encoded_code & 0x10) >> 4; 2181cb0ef41Sopenharmony_ci *vm = encoded_code & 0x0F; 2191cb0ef41Sopenharmony_ci } 2201cb0ef41Sopenharmony_ci void split_code(int* vm, int* m) const { split_code(code(), vm, m); } 2211cb0ef41Sopenharmony_ci DwVfpRegister low() const { return DwVfpRegister::from_code(code() * 2); } 2221cb0ef41Sopenharmony_ci DwVfpRegister high() const { 2231cb0ef41Sopenharmony_ci return DwVfpRegister::from_code(code() * 2 + 1); 2241cb0ef41Sopenharmony_ci } 2251cb0ef41Sopenharmony_ci VfpRegList ToVfpRegList() const { 2261cb0ef41Sopenharmony_ci DCHECK(is_valid()); 2271cb0ef41Sopenharmony_ci // A Q register overlaps four S registers. 2281cb0ef41Sopenharmony_ci return uint64_t{0xf} << (code() * 4); 2291cb0ef41Sopenharmony_ci } 2301cb0ef41Sopenharmony_ci 2311cb0ef41Sopenharmony_ci private: 2321cb0ef41Sopenharmony_ci friend class RegisterBase; 2331cb0ef41Sopenharmony_ci explicit constexpr QwNeonRegister(int code) : RegisterBase(code) {} 2341cb0ef41Sopenharmony_ci}; 2351cb0ef41Sopenharmony_ci 2361cb0ef41Sopenharmony_ciusing QuadRegister = QwNeonRegister; 2371cb0ef41Sopenharmony_ci 2381cb0ef41Sopenharmony_ciusing Simd128Register = QwNeonRegister; 2391cb0ef41Sopenharmony_ci 2401cb0ef41Sopenharmony_cienum CRegisterCode { 2411cb0ef41Sopenharmony_ci#define REGISTER_CODE(R) kCCode_##R, 2421cb0ef41Sopenharmony_ci C_REGISTERS(REGISTER_CODE) 2431cb0ef41Sopenharmony_ci#undef REGISTER_CODE 2441cb0ef41Sopenharmony_ci kCAfterLast 2451cb0ef41Sopenharmony_ci}; 2461cb0ef41Sopenharmony_ci 2471cb0ef41Sopenharmony_ci// Coprocessor register 2481cb0ef41Sopenharmony_ciclass CRegister : public RegisterBase<CRegister, kCAfterLast> { 2491cb0ef41Sopenharmony_ci friend class RegisterBase; 2501cb0ef41Sopenharmony_ci explicit constexpr CRegister(int code) : RegisterBase(code) {} 2511cb0ef41Sopenharmony_ci}; 2521cb0ef41Sopenharmony_ci 2531cb0ef41Sopenharmony_ci// Support for the VFP registers s0 to s31 (d0 to d15). 2541cb0ef41Sopenharmony_ci// Note that "s(N):s(N+1)" is the same as "d(N/2)". 2551cb0ef41Sopenharmony_ci#define DECLARE_FLOAT_REGISTER(R) \ 2561cb0ef41Sopenharmony_ci constexpr SwVfpRegister R = SwVfpRegister::from_code(kSwVfpCode_##R); 2571cb0ef41Sopenharmony_ciFLOAT_REGISTERS(DECLARE_FLOAT_REGISTER) 2581cb0ef41Sopenharmony_ci#undef DECLARE_FLOAT_REGISTER 2591cb0ef41Sopenharmony_ci 2601cb0ef41Sopenharmony_ci#define DECLARE_LOW_DOUBLE_REGISTER(R) \ 2611cb0ef41Sopenharmony_ci constexpr LowDwVfpRegister R = LowDwVfpRegister::from_code(kDoubleCode_##R); 2621cb0ef41Sopenharmony_ciLOW_DOUBLE_REGISTERS(DECLARE_LOW_DOUBLE_REGISTER) 2631cb0ef41Sopenharmony_ci#undef DECLARE_LOW_DOUBLE_REGISTER 2641cb0ef41Sopenharmony_ci 2651cb0ef41Sopenharmony_ci#define DECLARE_DOUBLE_REGISTER(R) \ 2661cb0ef41Sopenharmony_ci constexpr DwVfpRegister R = DwVfpRegister::from_code(kDoubleCode_##R); 2671cb0ef41Sopenharmony_ciNON_LOW_DOUBLE_REGISTERS(DECLARE_DOUBLE_REGISTER) 2681cb0ef41Sopenharmony_ci#undef DECLARE_DOUBLE_REGISTER 2691cb0ef41Sopenharmony_ci 2701cb0ef41Sopenharmony_ciconstexpr DwVfpRegister no_dreg = DwVfpRegister::no_reg(); 2711cb0ef41Sopenharmony_ci 2721cb0ef41Sopenharmony_ci#define DECLARE_SIMD128_REGISTER(R) \ 2731cb0ef41Sopenharmony_ci constexpr Simd128Register R = Simd128Register::from_code(kSimd128Code_##R); 2741cb0ef41Sopenharmony_ciSIMD128_REGISTERS(DECLARE_SIMD128_REGISTER) 2751cb0ef41Sopenharmony_ci#undef DECLARE_SIMD128_REGISTER 2761cb0ef41Sopenharmony_ci 2771cb0ef41Sopenharmony_ci// Aliases for double registers. 2781cb0ef41Sopenharmony_ciconstexpr LowDwVfpRegister kFirstCalleeSavedDoubleReg = d8; 2791cb0ef41Sopenharmony_ciconstexpr LowDwVfpRegister kLastCalleeSavedDoubleReg = d15; 2801cb0ef41Sopenharmony_ciconstexpr LowDwVfpRegister kDoubleRegZero = d13; 2811cb0ef41Sopenharmony_ci 2821cb0ef41Sopenharmony_ciconstexpr CRegister no_creg = CRegister::no_reg(); 2831cb0ef41Sopenharmony_ci 2841cb0ef41Sopenharmony_ci#define DECLARE_C_REGISTER(R) \ 2851cb0ef41Sopenharmony_ci constexpr CRegister R = CRegister::from_code(kCCode_##R); 2861cb0ef41Sopenharmony_ciC_REGISTERS(DECLARE_C_REGISTER) 2871cb0ef41Sopenharmony_ci#undef DECLARE_C_REGISTER 2881cb0ef41Sopenharmony_ci 2891cb0ef41Sopenharmony_ci// Define {RegisterName} methods for the register types. 2901cb0ef41Sopenharmony_ciDEFINE_REGISTER_NAMES(Register, GENERAL_REGISTERS) 2911cb0ef41Sopenharmony_ciDEFINE_REGISTER_NAMES(SwVfpRegister, FLOAT_REGISTERS) 2921cb0ef41Sopenharmony_ciDEFINE_REGISTER_NAMES(DwVfpRegister, DOUBLE_REGISTERS) 2931cb0ef41Sopenharmony_ciDEFINE_REGISTER_NAMES(LowDwVfpRegister, LOW_DOUBLE_REGISTERS) 2941cb0ef41Sopenharmony_ciDEFINE_REGISTER_NAMES(QwNeonRegister, SIMD128_REGISTERS) 2951cb0ef41Sopenharmony_ciDEFINE_REGISTER_NAMES(CRegister, C_REGISTERS) 2961cb0ef41Sopenharmony_ci 2971cb0ef41Sopenharmony_ci// Give alias names to registers for calling conventions. 2981cb0ef41Sopenharmony_ciconstexpr Register kReturnRegister0 = r0; 2991cb0ef41Sopenharmony_ciconstexpr Register kReturnRegister1 = r1; 3001cb0ef41Sopenharmony_ciconstexpr Register kReturnRegister2 = r2; 3011cb0ef41Sopenharmony_ciconstexpr Register kJSFunctionRegister = r1; 3021cb0ef41Sopenharmony_ciconstexpr Register kContextRegister = r7; 3031cb0ef41Sopenharmony_ciconstexpr Register kAllocateSizeRegister = r1; 3041cb0ef41Sopenharmony_ciconstexpr Register kInterpreterAccumulatorRegister = r0; 3051cb0ef41Sopenharmony_ciconstexpr Register kInterpreterBytecodeOffsetRegister = r5; 3061cb0ef41Sopenharmony_ciconstexpr Register kInterpreterBytecodeArrayRegister = r6; 3071cb0ef41Sopenharmony_ciconstexpr Register kInterpreterDispatchTableRegister = r8; 3081cb0ef41Sopenharmony_ci 3091cb0ef41Sopenharmony_ciconstexpr Register kJavaScriptCallArgCountRegister = r0; 3101cb0ef41Sopenharmony_ciconstexpr Register kJavaScriptCallCodeStartRegister = r2; 3111cb0ef41Sopenharmony_ciconstexpr Register kJavaScriptCallTargetRegister = kJSFunctionRegister; 3121cb0ef41Sopenharmony_ciconstexpr Register kJavaScriptCallNewTargetRegister = r3; 3131cb0ef41Sopenharmony_ciconstexpr Register kJavaScriptCallExtraArg1Register = r2; 3141cb0ef41Sopenharmony_ci 3151cb0ef41Sopenharmony_ciconstexpr Register kOffHeapTrampolineRegister = ip; 3161cb0ef41Sopenharmony_ciconstexpr Register kRuntimeCallFunctionRegister = r1; 3171cb0ef41Sopenharmony_ciconstexpr Register kRuntimeCallArgCountRegister = r0; 3181cb0ef41Sopenharmony_ciconstexpr Register kRuntimeCallArgvRegister = r2; 3191cb0ef41Sopenharmony_ciconstexpr Register kWasmInstanceRegister = r3; 3201cb0ef41Sopenharmony_ciconstexpr Register kWasmCompileLazyFuncIndexRegister = r4; 3211cb0ef41Sopenharmony_ci 3221cb0ef41Sopenharmony_ci// Give alias names to registers 3231cb0ef41Sopenharmony_ciconstexpr Register cp = r7; // JavaScript context pointer. 3241cb0ef41Sopenharmony_ciconstexpr Register r11 = fp; 3251cb0ef41Sopenharmony_ciconstexpr Register kRootRegister = r10; // Roots array pointer. 3261cb0ef41Sopenharmony_ci 3271cb0ef41Sopenharmony_ciconstexpr DoubleRegister kFPReturnRegister0 = d0; 3281cb0ef41Sopenharmony_ci 3291cb0ef41Sopenharmony_ci} // namespace internal 3301cb0ef41Sopenharmony_ci} // namespace v8 3311cb0ef41Sopenharmony_ci 3321cb0ef41Sopenharmony_ci#endif // V8_CODEGEN_ARM_REGISTER_ARM_H_ 333