diff options
| author | buzbee <buzbee@google.com> | 2010-08-31 10:16:35 -0700 |
|---|---|---|
| committer | buzbee <buzbee@google.com> | 2010-08-31 12:04:20 -0700 |
| commit | 8f8109ade5c32c8c94fa6b7c058045733c8c5ad1 (patch) | |
| tree | 8fbbd48c41312e51784406cb17c1c36a962c4604 /vm/compiler/codegen/arm/CodegenFactory.c | |
| parent | c842a1d3ac530af7b5733aa83ad15495cd359ff0 (diff) | |
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
Diffstat (limited to 'vm/compiler/codegen/arm/CodegenFactory.c')
| -rw-r--r-- | vm/compiler/codegen/arm/CodegenFactory.c | 14 |
1 files changed, 14 insertions, 0 deletions
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 |
