RFR: 8248404: AArch64: Remove uses of long and unsigned long [v4]

Andrew Haley aph at openjdk.java.net
Tue Jan 11 17:21:14 UTC 2022


On Tue, 11 Jan 2022 17:08:43 GMT, Andrew Haley <aph at openjdk.org> wrote:

>> It does seem pedantic which makes it really difficult, but it's important to get this right.  These kinds of bugs are horrible to debug.
>
> OK, so if we have the `Address(reg_offset)` overloads for `int`, `int64_t`, and `uint64_t` we're good, and by calling the right overload we get rid of the need to cast the `layout.stack_args` offset to `int` here.

This is what I've got:


  Address(Register r)
    : _base(r), _index(noreg), _offset(0), _mode(base_plus_offset), _target(0) { }
  Address(Register r, int o)
    : _base(r), _index(noreg), _offset(o), _mode(base_plus_offset), _target(0) { }
  Address(Register r, int64_t o)
    : _base(r), _index(noreg), _offset(o), _mode(base_plus_offset), _target(0) { }
  Address(Register r, uint64_t o)
    : _base(r), _index(noreg), _offset(o), _mode(base_plus_offset), _target(0) { }
  Address(Register r, ByteSize disp)
    : Address(r, in_bytes(disp)) { }

-------------

PR: https://git.openjdk.java.net/jdk/pull/7023


More information about the hotspot-dev mailing list