[aarch64-port-dev ] RFR(S/M): 8247766: [aarch64] guarantee(val < (1U << nbits)) failed: Field too big for insn

Andrew Haley aph at redhat.com
Mon Jul 27 13:24:23 UTC 2020


Hi,

On 27/07/2020 11:02, Patric Hedlin wrote:
>
> I've refreshed the webrev (as discussed off-line), moving
> legitimize_address() into the stack_slot_address() with additional
> conditions related to the (well-aligned) frame slot address produced.
> Use of is_simm9() and is_uimm12() is now using implementation in Assembler.

That's much nicer. Some minor nits...

Please pass the scratch register to be used as an argument to
stack_slot_address:

+// Ensure a valid Address (base + offset) to a stack-slot. If stack access is
+// not encodable as a base + (immediate) offset, generate an explicit address
+// calculation to hold the address in a temporary register (rscratch1).
+Address LIR_Assembler::stack_slot_address(int index, uint size, int adjust) {

These consts are too obscure. Please be explicit: either use one of
the predefined constants that mean the same thing (such as
BytesPerInt) or if you really want low-level types, sizeof int32_t:

+  uint const c_sz32 = 4;
+  uint const c_sz64 = 8;

Otherwise OK. It doesn't need another review with these changes.

Thanks.

-- 
Andrew Haley  (he/him)
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
https://keybase.io/andrewhaley
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671



More information about the hotspot-compiler-dev mailing list