[10] [s390] RFR(XS): micro-optimization in resize_frame_absolute()

Schmidt, Lutz lutz.schmidt at sap.com
Thu Jun 1 14:58:46 UTC 2017

Hi Martin,

thank you for your comments! They triggered some deeper thoughts.

I could not find any written proof that it is ok to write outside the bounds given by the SP. The risk is minimal, though. You would need an external interrupt to hit the gap between the write and the SP update.

There is more than one code location affected. Doing it right will definitely blow up the fix size. There is not enough time right now: I will leave the office for vacation in an hour or so. I will resume working on the issue once I’m back (June 19th).

Best regards,

On 29.05.2017, 12:58, "Doerr, Martin" <martin.doerr at sap.com<mailto:martin.doerr at sap.com>> wrote:

Hi Lutz,

thanks for providing the webrev.

Is it allowed to write to the stack before updating the SP?
I know that the PPC ABI allows this within a certain range, but I’m not aware of such an exception on s390x.

I’d also prefer separate functions instead of one with so many cases.
E.g. one function which copies the fp and one which takes a given fp like:
void MacroAssembler::resize_frame_absolute(Register newSP, Register fp) {
  assert_different_registers(newSP, fp, Z_SP);
  z_lgr(Z_SP, newSP);
  z_stg(fp, _z_abi(callers_sp), (newSP == Z_R0) ? Z_SP : newSP);

Thanks and best regards,

From: hotspot-compiler-dev [mailto:hotspot-compiler-dev-bounces at openjdk.java.net] On Behalf Of Schmidt, Lutz
Sent: Dienstag, 23. Mai 2017 12:47
To: hotspot-compiler-dev at openjdk.java.net
Subject: [10] [s390] RFR(XS): micro-optimization in resize_frame_absolute()

Dear all,

I would like to request reviews for this tiny, s390-only enhancement:
Bug:    https://bugs.openjdk.java.net/browse/JDK-8180659
Webrev: http://cr.openjdk.java.net/~lucy/webrevs/8180659.00/

Thank you!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20170601/daf76004/attachment-0001.html>

More information about the hotspot-compiler-dev mailing list