From 9e0f9b0d3e2cd78092e5c4b66ce1edcd79c951ea Mon Sep 17 00:00:00 2001 From: buzbee Date: Wed, 24 Aug 2011 15:32:46 -0700 Subject: Add switch and comparison tests. Fix ralloc bug We normally have 5 registers in our temp pool, but up to 6 may be needed for long 3-operand operations. Added a workaround to temporarily add lr to the temp pool in that specific case. Moved the bulk of the compiler_test code out of common_test.h into compiler_test.h. Added switch and compare unit tests. Change-Id: Ib449c49861acb5aaef716e8538e5818ba74522cb --- src/compiler/codegen/RallocUtil.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/compiler/codegen/RallocUtil.cc') diff --git a/src/compiler/codegen/RallocUtil.cc b/src/compiler/codegen/RallocUtil.cc index 30b52804e5..3b222f6f76 100644 --- a/src/compiler/codegen/RallocUtil.cc +++ b/src/compiler/codegen/RallocUtil.cc @@ -783,6 +783,12 @@ extern void oatMarkTemp(CompilationUnit* cUnit, int reg) info->isTemp = true; } +extern void oatUnmarkTemp(CompilationUnit* cUnit, int reg) +{ + RegisterInfo* info = getRegInfo(cUnit, reg); + info->isTemp = false; +} + extern void oatMarkPair(CompilationUnit* cUnit, int lowReg, int highReg) { RegisterInfo* infoLo = getRegInfo(cUnit, lowReg); -- cgit v1.2.3-59-g8ed1b