From 2e748f364dba4505ca3a90f095d09c70bcd88eab Mon Sep 17 00:00:00 2001 From: buzbee Date: Mon, 29 Aug 2011 21:02:19 -0700 Subject: Register temp handling fix In general, compiler routines that generate code don't need to worry about register management - the underlying utilites will take care of it. However, when generating an invoke sequence specific registers must be used to conform to the calling convention. To prevent the normal utilities from allocating these fixed registers, oatLockAllTemps() is called to mark the registers as in use. However, oatLockAllTemps() did just that - it locked all of the temps, not just those used for arguments. This change renames oatLockAllTemps() to oatLockCallTemps() and restricts the locking to the argument registers. Change-Id: Id4183ce89e2672bcf2873d31aa60bd80c91c5a72 --- src/compiler/codegen/arm/MethodCodegenDriver.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/compiler/codegen/arm/MethodCodegenDriver.cc') diff --git a/src/compiler/codegen/arm/MethodCodegenDriver.cc b/src/compiler/codegen/arm/MethodCodegenDriver.cc index ea0272172c..c4b30b2e6b 100644 --- a/src/compiler/codegen/arm/MethodCodegenDriver.cc +++ b/src/compiler/codegen/arm/MethodCodegenDriver.cc @@ -693,7 +693,7 @@ static int genDalvikArgsNoRange(CompilationUnit* cUnit, MIR* mir, if (dInsn->vA == 0) return callState; - oatLockAllTemps(cUnit); + oatLockCallTemps(cUnit); callState = nextCallInsn(cUnit, mir, dInsn, callState); /* @@ -816,7 +816,7 @@ static int genDalvikArgsRange(CompilationUnit* cUnit, MIR* mir, // Finally, deal with the register arguments // We'll be using fixed registers here - oatLockAllTemps(cUnit); + oatLockCallTemps(cUnit); callState = nextCallInsn(cUnit, mir, dInsn, callState); return callState; } -- cgit v1.2.3-59-g8ed1b