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
diff --git a/src/compiler/codegen/arm/MethodCodegenDriver.cc b/src/compiler/codegen/arm/MethodCodegenDriver.cc
index ea02721..c4b30b2 100644
--- a/src/compiler/codegen/arm/MethodCodegenDriver.cc
+++ b/src/compiler/codegen/arm/MethodCodegenDriver.cc
@@ -693,7 +693,7 @@
if (dInsn->vA == 0)
return callState;
- oatLockAllTemps(cUnit);
+ oatLockCallTemps(cUnit);
callState = nextCallInsn(cUnit, mir, dInsn, callState);
/*
@@ -816,7 +816,7 @@
// 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;
}