RFR: Fix jmp-if-possible macro assembly

Aleksey Shipilev shade at redhat.com
Fri Oct 28 20:35:25 UTC 2016


On 10/28/2016 10:23 PM, Roman Kennke wrote:
> I introduced jmpb_if_possible and jccb_if_possible to
> macroAssembler_x86 in order to deal with increased offsets when
> ShenandoahStoreCheck is enabled. This patch fixes it so that it also
> works correctly with release build and under correct conditions.
> 
> http://cr.openjdk.java.net/~rkennke/fix-jmp-if-possible/webrev.00/

Not very sure about Shenandoah-specific things in Assembler. Can't we
rewrite the potentially non-jmpb cases with jmp(Label, bool = maybe_short)?

Or, maybe we should do:

void Assembler::jmpb_unless(Label& L, bool test) {
  if (test) {
    jmp(L, /* maybe_short = */ true);
  } else
    jmpb(L);
  }
}

...then usages would be specific:

   jmpb_unless(DONE_LABEL, ShenandoahStoreCheck);

Thanks,
-Aleksey



More information about the shenandoah-dev mailing list