src/cpu/x86/vm/interp_masm_x86_32.cpp

changeset 2138
d5d065957597
parent 1934
e9ff18c4ace7
child 2314
f95d63e2154a
     1.1 --- a/src/cpu/x86/vm/interp_masm_x86_32.cpp	Thu Sep 02 11:40:02 2010 -0700
     1.2 +++ b/src/cpu/x86/vm/interp_masm_x86_32.cpp	Fri Sep 03 17:51:07 2010 -0700
     1.3 @@ -1397,3 +1397,17 @@
     1.4      NOT_CC_INTERP(pop(state));
     1.5    }
     1.6  }
     1.7 +
     1.8 +// Jump if ((*counter_addr += increment) & mask) satisfies the condition.
     1.9 +void InterpreterMacroAssembler::increment_mask_and_jump(Address counter_addr,
    1.10 +                                                        int increment, int mask,
    1.11 +                                                        Register scratch, bool preloaded,
    1.12 +                                                        Condition cond, Label* where) {
    1.13 +  if (!preloaded) {
    1.14 +    movl(scratch, counter_addr);
    1.15 +  }
    1.16 +  incrementl(scratch, increment);
    1.17 +  movl(counter_addr, scratch);
    1.18 +  andl(scratch, mask);
    1.19 +  jcc(cond, *where);
    1.20 +}

mercurial