Move definitions of named registers as constant structures to assembler-arm.h file.

Review URL: http://codereview.chromium.org/660256

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3983 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
whesse@chromium.org 2010-03-01 08:34:09 +00:00
parent dee0b9d636
commit 09e3bac689
2 changed files with 84 additions and 178 deletions

View File

@ -80,100 +80,6 @@ void CpuFeatures::Probe() {
} }
// -----------------------------------------------------------------------------
// Implementation of Register and CRegister
Register no_reg = { -1 };
Register r0 = { 0 };
Register r1 = { 1 };
Register r2 = { 2 };
Register r3 = { 3 };
Register r4 = { 4 };
Register r5 = { 5 };
Register r6 = { 6 };
Register r7 = { 7 };
Register r8 = { 8 }; // Used as context register.
Register r9 = { 9 };
Register r10 = { 10 }; // Used as roots register.
Register fp = { 11 };
Register ip = { 12 };
Register sp = { 13 };
Register lr = { 14 };
Register pc = { 15 };
CRegister no_creg = { -1 };
CRegister cr0 = { 0 };
CRegister cr1 = { 1 };
CRegister cr2 = { 2 };
CRegister cr3 = { 3 };
CRegister cr4 = { 4 };
CRegister cr5 = { 5 };
CRegister cr6 = { 6 };
CRegister cr7 = { 7 };
CRegister cr8 = { 8 };
CRegister cr9 = { 9 };
CRegister cr10 = { 10 };
CRegister cr11 = { 11 };
CRegister cr12 = { 12 };
CRegister cr13 = { 13 };
CRegister cr14 = { 14 };
CRegister cr15 = { 15 };
// Support for the VFP registers s0 to s31 (d0 to d15).
// Note that "sN:sM" is the same as "dN/2".
SwVfpRegister s0 = { 0 };
SwVfpRegister s1 = { 1 };
SwVfpRegister s2 = { 2 };
SwVfpRegister s3 = { 3 };
SwVfpRegister s4 = { 4 };
SwVfpRegister s5 = { 5 };
SwVfpRegister s6 = { 6 };
SwVfpRegister s7 = { 7 };
SwVfpRegister s8 = { 8 };
SwVfpRegister s9 = { 9 };
SwVfpRegister s10 = { 10 };
SwVfpRegister s11 = { 11 };
SwVfpRegister s12 = { 12 };
SwVfpRegister s13 = { 13 };
SwVfpRegister s14 = { 14 };
SwVfpRegister s15 = { 15 };
SwVfpRegister s16 = { 16 };
SwVfpRegister s17 = { 17 };
SwVfpRegister s18 = { 18 };
SwVfpRegister s19 = { 19 };
SwVfpRegister s20 = { 20 };
SwVfpRegister s21 = { 21 };
SwVfpRegister s22 = { 22 };
SwVfpRegister s23 = { 23 };
SwVfpRegister s24 = { 24 };
SwVfpRegister s25 = { 25 };
SwVfpRegister s26 = { 26 };
SwVfpRegister s27 = { 27 };
SwVfpRegister s28 = { 28 };
SwVfpRegister s29 = { 29 };
SwVfpRegister s30 = { 30 };
SwVfpRegister s31 = { 31 };
DwVfpRegister d0 = { 0 };
DwVfpRegister d1 = { 1 };
DwVfpRegister d2 = { 2 };
DwVfpRegister d3 = { 3 };
DwVfpRegister d4 = { 4 };
DwVfpRegister d5 = { 5 };
DwVfpRegister d6 = { 6 };
DwVfpRegister d7 = { 7 };
DwVfpRegister d8 = { 8 };
DwVfpRegister d9 = { 9 };
DwVfpRegister d10 = { 10 };
DwVfpRegister d11 = { 11 };
DwVfpRegister d12 = { 12 };
DwVfpRegister d13 = { 13 };
DwVfpRegister d14 = { 14 };
DwVfpRegister d15 = { 15 };
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// Implementation of RelocInfo // Implementation of RelocInfo

View File

@ -84,25 +84,24 @@ struct Register {
int code_; int code_;
}; };
const Register no_reg = { -1 };
extern Register no_reg; const Register r0 = { 0 };
extern Register r0; const Register r1 = { 1 };
extern Register r1; const Register r2 = { 2 };
extern Register r2; const Register r3 = { 3 };
extern Register r3; const Register r4 = { 4 };
extern Register r4; const Register r5 = { 5 };
extern Register r5; const Register r6 = { 6 };
extern Register r6; const Register r7 = { 7 };
extern Register r7; const Register r8 = { 8 }; // Used as context register.
extern Register r8; const Register r9 = { 9 };
extern Register r9; const Register r10 = { 10 }; // Used as roots register.
extern Register r10; const Register fp = { 11 };
extern Register fp; const Register ip = { 12 };
extern Register ip; const Register sp = { 13 };
extern Register sp; const Register lr = { 14 };
extern Register lr; const Register pc = { 15 };
extern Register pc;
// Single word VFP register. // Single word VFP register.
struct SwVfpRegister { struct SwVfpRegister {
@ -139,57 +138,57 @@ struct DwVfpRegister {
}; };
// Support for VFP registers s0 to s31 (d0 to d15). // Support for the VFP registers s0 to s31 (d0 to d15).
// Note that "s(N):s(N+1)" is the same as "d(N/2)". // Note that "s(N):s(N+1)" is the same as "d(N/2)".
extern SwVfpRegister s0; const SwVfpRegister s0 = { 0 };
extern SwVfpRegister s1; const SwVfpRegister s1 = { 1 };
extern SwVfpRegister s2; const SwVfpRegister s2 = { 2 };
extern SwVfpRegister s3; const SwVfpRegister s3 = { 3 };
extern SwVfpRegister s4; const SwVfpRegister s4 = { 4 };
extern SwVfpRegister s5; const SwVfpRegister s5 = { 5 };
extern SwVfpRegister s6; const SwVfpRegister s6 = { 6 };
extern SwVfpRegister s7; const SwVfpRegister s7 = { 7 };
extern SwVfpRegister s8; const SwVfpRegister s8 = { 8 };
extern SwVfpRegister s9; const SwVfpRegister s9 = { 9 };
extern SwVfpRegister s10; const SwVfpRegister s10 = { 10 };
extern SwVfpRegister s11; const SwVfpRegister s11 = { 11 };
extern SwVfpRegister s12; const SwVfpRegister s12 = { 12 };
extern SwVfpRegister s13; const SwVfpRegister s13 = { 13 };
extern SwVfpRegister s14; const SwVfpRegister s14 = { 14 };
extern SwVfpRegister s15; const SwVfpRegister s15 = { 15 };
extern SwVfpRegister s16; const SwVfpRegister s16 = { 16 };
extern SwVfpRegister s17; const SwVfpRegister s17 = { 17 };
extern SwVfpRegister s18; const SwVfpRegister s18 = { 18 };
extern SwVfpRegister s19; const SwVfpRegister s19 = { 19 };
extern SwVfpRegister s20; const SwVfpRegister s20 = { 20 };
extern SwVfpRegister s21; const SwVfpRegister s21 = { 21 };
extern SwVfpRegister s22; const SwVfpRegister s22 = { 22 };
extern SwVfpRegister s23; const SwVfpRegister s23 = { 23 };
extern SwVfpRegister s24; const SwVfpRegister s24 = { 24 };
extern SwVfpRegister s25; const SwVfpRegister s25 = { 25 };
extern SwVfpRegister s26; const SwVfpRegister s26 = { 26 };
extern SwVfpRegister s27; const SwVfpRegister s27 = { 27 };
extern SwVfpRegister s28; const SwVfpRegister s28 = { 28 };
extern SwVfpRegister s29; const SwVfpRegister s29 = { 29 };
extern SwVfpRegister s30; const SwVfpRegister s30 = { 30 };
extern SwVfpRegister s31; const SwVfpRegister s31 = { 31 };
extern DwVfpRegister d0; const DwVfpRegister d0 = { 0 };
extern DwVfpRegister d1; const DwVfpRegister d1 = { 1 };
extern DwVfpRegister d2; const DwVfpRegister d2 = { 2 };
extern DwVfpRegister d3; const DwVfpRegister d3 = { 3 };
extern DwVfpRegister d4; const DwVfpRegister d4 = { 4 };
extern DwVfpRegister d5; const DwVfpRegister d5 = { 5 };
extern DwVfpRegister d6; const DwVfpRegister d6 = { 6 };
extern DwVfpRegister d7; const DwVfpRegister d7 = { 7 };
extern DwVfpRegister d8; const DwVfpRegister d8 = { 8 };
extern DwVfpRegister d9; const DwVfpRegister d9 = { 9 };
extern DwVfpRegister d10; const DwVfpRegister d10 = { 10 };
extern DwVfpRegister d11; const DwVfpRegister d11 = { 11 };
extern DwVfpRegister d12; const DwVfpRegister d12 = { 12 };
extern DwVfpRegister d13; const DwVfpRegister d13 = { 13 };
extern DwVfpRegister d14; const DwVfpRegister d14 = { 14 };
extern DwVfpRegister d15; const DwVfpRegister d15 = { 15 };
// Coprocessor register // Coprocessor register
@ -210,23 +209,24 @@ struct CRegister {
}; };
extern CRegister no_creg; const CRegister no_creg = { -1 };
extern CRegister cr0;
extern CRegister cr1; const CRegister cr0 = { 0 };
extern CRegister cr2; const CRegister cr1 = { 1 };
extern CRegister cr3; const CRegister cr2 = { 2 };
extern CRegister cr4; const CRegister cr3 = { 3 };
extern CRegister cr5; const CRegister cr4 = { 4 };
extern CRegister cr6; const CRegister cr5 = { 5 };
extern CRegister cr7; const CRegister cr6 = { 6 };
extern CRegister cr8; const CRegister cr7 = { 7 };
extern CRegister cr9; const CRegister cr8 = { 8 };
extern CRegister cr10; const CRegister cr9 = { 9 };
extern CRegister cr11; const CRegister cr10 = { 10 };
extern CRegister cr12; const CRegister cr11 = { 11 };
extern CRegister cr13; const CRegister cr12 = { 12 };
extern CRegister cr14; const CRegister cr13 = { 13 };
extern CRegister cr15; const CRegister cr14 = { 14 };
const CRegister cr15 = { 15 };
// Coprocessor number // Coprocessor number