diff options
| author | 2012-11-13 16:31:10 -0800 | |
|---|---|---|
| committer | 2012-11-14 12:23:53 -0800 | |
| commit | f0504cdc5b6400edd4b39eea64ac280465042d5b (patch) | |
| tree | 09aea792db81ef23e4b5264acc76b677382e3e84 /src/compiler/codegen/CodegenFactory.cc | |
| parent | ec13743da80a80c1817cf6660c28917fc28846bc (diff) | |
Quick backend: rename target-specific #defines
Another step towards a single compiler. The #include build mechanism
relies on macros with the same name to take on different values for
our various targets. This CL prepends a target-specific string
(and exposes some needed by common code as functions rather than #defines).
Macros and #defines still available for use from target-dependent code,
but functions added for target independent use. For example,
rRET0 for Arm becomes rARM_RET0 in target-dependent code, and
targetRegister(kRet0) in target-independent code.
No logic changes, other than adding functions to return previously #defined
values. As of this CL, the primary target includes, xxxLIR.h, have no
macro collisions.
Change-Id: I5e11df844815b7d129b525a209dd7c46bd9a4a09
Diffstat (limited to 'src/compiler/codegen/CodegenFactory.cc')
| -rw-r--r-- | src/compiler/codegen/CodegenFactory.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/compiler/codegen/CodegenFactory.cc b/src/compiler/codegen/CodegenFactory.cc index b0dc30c67a..600b324841 100644 --- a/src/compiler/codegen/CodegenFactory.cc +++ b/src/compiler/codegen/CodegenFactory.cc @@ -58,7 +58,7 @@ void loadValueDirect(CompilationUnit* cUnit, RegLocation rlSrc, int rDest) } else { DCHECK((rlSrc.location == kLocDalvikFrame) || (rlSrc.location == kLocCompilerTemp)); - loadWordDisp(cUnit, rSP, oatSRegOffset(cUnit, rlSrc.sRegLow), rDest); + loadWordDisp(cUnit, targetReg(kSp), oatSRegOffset(cUnit, rlSrc.sRegLow), rDest); } } @@ -88,7 +88,7 @@ void loadValueDirectWide(CompilationUnit* cUnit, RegLocation rlSrc, int regLo, } else { DCHECK((rlSrc.location == kLocDalvikFrame) || (rlSrc.location == kLocCompilerTemp)); - loadBaseDispWide(cUnit, rSP, oatSRegOffset(cUnit, rlSrc.sRegLow), + loadBaseDispWide(cUnit, targetReg(kSp), oatSRegOffset(cUnit, rlSrc.sRegLow), regLo, regHi, INVALID_SREG); } } @@ -167,7 +167,7 @@ void storeValue(CompilationUnit* cUnit, RegLocation rlDest, RegLocation rlSrc) if (oatIsDirty(cUnit, rlDest.lowReg) && oatLiveOut(cUnit, rlDest.sRegLow)) { defStart = (LIR* )cUnit->lastLIRInsn; - storeBaseDisp(cUnit, rSP, oatSRegOffset(cUnit, rlDest.sRegLow), + storeBaseDisp(cUnit, targetReg(kSp), oatSRegOffset(cUnit, rlDest.sRegLow), rlDest.lowReg, kWord); oatMarkClean(cUnit, rlDest); defEnd = (LIR* )cUnit->lastLIRInsn; @@ -207,7 +207,7 @@ void storeValueWide(CompilationUnit* cUnit, RegLocation rlDest, #endif LIR* defStart; LIR* defEnd; - DCHECK_EQ(FPREG(rlSrc.lowReg), FPREG(rlSrc.highReg)); + DCHECK_EQ(fpReg(rlSrc.lowReg), fpReg(rlSrc.highReg)); DCHECK(rlDest.wide); DCHECK(rlSrc.wide); if (rlSrc.location == kLocPhysReg) { @@ -248,7 +248,7 @@ void storeValueWide(CompilationUnit* cUnit, RegLocation rlDest, defStart = (LIR*)cUnit->lastLIRInsn; DCHECK_EQ((SRegToVReg(cUnit, rlDest.sRegLow)+1), SRegToVReg(cUnit, oatSRegHi(rlDest.sRegLow))); - storeBaseDispWide(cUnit, rSP, oatSRegOffset(cUnit, rlDest.sRegLow), + storeBaseDispWide(cUnit, targetReg(kSp), oatSRegOffset(cUnit, rlDest.sRegLow), rlDest.lowReg, rlDest.highReg); oatMarkClean(cUnit, rlDest); defEnd = (LIR*)cUnit->lastLIRInsn; |