src/cpu/sparc/vm/interp_masm_sparc.cpp

changeset 2138
d5d065957597
parent 1934
e9ff18c4ace7
child 2314
f95d63e2154a
     1.1 --- a/src/cpu/sparc/vm/interp_masm_sparc.cpp	Thu Sep 02 11:40:02 2010 -0700
     1.2 +++ b/src/cpu/sparc/vm/interp_masm_sparc.cpp	Fri Sep 03 17:51:07 2010 -0700
     1.3 @@ -2431,3 +2431,20 @@
     1.4    }
     1.5  #endif // CC_INTERP
     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 scratch1, Register scratch2,
    1.12 +                                                        Condition cond, Label *where) {
    1.13 +  ld(counter_addr, scratch1);
    1.14 +  add(scratch1, increment, scratch1);
    1.15 +  if (is_simm13(mask)) {
    1.16 +    andcc(scratch1, mask, G0);
    1.17 +  } else {
    1.18 +    set(mask, scratch2);
    1.19 +    andcc(scratch1, scratch2,  G0);
    1.20 +  }
    1.21 +  br(cond, false, Assembler::pn, *where);
    1.22 +  delayed()->st(scratch1, counter_addr);
    1.23 +}

mercurial