From 8f8109ade5c32c8c94fa6b7c058045733c8c5ad1 Mon Sep 17 00:00:00 2001 From: buzbee Date: Tue, 31 Aug 2010 10:16:35 -0700 Subject: JIT: Add new compare-immed-and-branch primative & drop useless clrex This allows better use of cbz/cbnz on Thumb2 targets. Also, removed the clrex from the inline monitor enter code (not necessary). Change-Id: I3bfa90bcdf34f6ef3e2447c9c6f1b49a98a89e58 --- vm/compiler/codegen/arm/CodegenFactory.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'vm/compiler/codegen/arm/CodegenFactory.c') diff --git a/vm/compiler/codegen/arm/CodegenFactory.c b/vm/compiler/codegen/arm/CodegenFactory.c index 157bd1f4b..1de9f90e9 100644 --- a/vm/compiler/codegen/arm/CodegenFactory.c +++ b/vm/compiler/codegen/arm/CodegenFactory.c @@ -257,6 +257,20 @@ static void storeValueWide(CompilationUnit *cUnit, RegLocation rlDest, } } } + +/* + * Perform a "reg cmp imm" operation and jump to the PCR region if condition + * satisfies. + */ +static ArmLIR *genRegImmCheck(CompilationUnit *cUnit, + ArmConditionCode cond, int reg, + int checkValue, int dOffset, + ArmLIR *pcrLabel) +{ + ArmLIR *branch = genCmpImmBranch(cUnit, cond, reg, checkValue); + return genCheckCommon(cUnit, dOffset, branch, pcrLabel); +} + /* * Perform null-check on a register. sReg is the ssa register being checked, * and mReg is the machine register holding the actual value. If internal state -- cgit v1.2.3