diff -r cc624b341ab2 -r 970dc585ab63 hotspot/src/cpu/x86/vm/interp_masm_x86_32.cpp --- a/hotspot/src/cpu/x86/vm/interp_masm_x86_32.cpp Thu Sep 02 11:40:02 2010 -0700 +++ b/hotspot/src/cpu/x86/vm/interp_masm_x86_32.cpp Fri Sep 03 17:51:07 2010 -0700 @@ -1397,3 +1397,17 @@ NOT_CC_INTERP(pop(state)); } } + +// Jump if ((*counter_addr += increment) & mask) satisfies the condition. +void InterpreterMacroAssembler::increment_mask_and_jump(Address counter_addr, + int increment, int mask, + Register scratch, bool preloaded, + Condition cond, Label* where) { + if (!preloaded) { + movl(scratch, counter_addr); + } + incrementl(scratch, increment); + movl(counter_addr, scratch); + andl(scratch, mask); + jcc(cond, *where); +}