Mercurial > hg > graal-compiler
diff src/cpu/sparc/vm/interp_masm_sparc.cpp @ 1783:d5d065957597
6953144: Tiered compilation
Summary: Infrastructure for tiered compilation support (interpreter + c1 + c2) for 32 and 64 bit. Simple tiered policy implementation.
Reviewed-by: kvn, never, phh, twisti
author | iveresov |
---|---|
date | Fri, 03 Sep 2010 17:51:07 -0700 |
parents | e9ff18c4ace7 |
children | f95d63e2154a |
line wrap: on
line diff
--- a/src/cpu/sparc/vm/interp_masm_sparc.cpp Thu Sep 02 11:40:02 2010 -0700 +++ b/src/cpu/sparc/vm/interp_masm_sparc.cpp Fri Sep 03 17:51:07 2010 -0700 @@ -2431,3 +2431,20 @@ } #endif // CC_INTERP } + +// Jump if ((*counter_addr += increment) & mask) satisfies the condition. +void InterpreterMacroAssembler::increment_mask_and_jump(Address counter_addr, + int increment, int mask, + Register scratch1, Register scratch2, + Condition cond, Label *where) { + ld(counter_addr, scratch1); + add(scratch1, increment, scratch1); + if (is_simm13(mask)) { + andcc(scratch1, mask, G0); + } else { + set(mask, scratch2); + andcc(scratch1, scratch2, G0); + } + br(cond, false, Assembler::pn, *where); + delayed()->st(scratch1, counter_addr); +}