RFR: 8270832: Aarch64: Update algorithm annotations for MacroAssembler::fill_words
Nick Gasson
ngasson at openjdk.java.net
Mon Jul 19 03:06:54 UTC 2021
On Fri, 16 Jul 2021 11:20:45 GMT, Wang Huang <whuang at openjdk.org> wrote:
> It is found that the comments of `MacroAssembler::fill_words` is not right here. Let's fix that.
src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp line 4811:
> 4809: {
> 4810: // Algorithm:
> 4811: //
There's an extra store at the beginning to align `base` if bit 3 is set. Do you want to document that here too?
src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp line 4834:
> 4832: // } while (cnt);
> 4833: // }
> 4834: // if (cnt & 1 == 1) {
Should be `(cnt & 1) == 1`.
src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp line 4835:
> 4833: // }
> 4834: // if (cnt & 1 == 1) {
> 4835: // p[0] = v;
How about `*p++ = v` as `base` also gets incremented here.
-------------
PR: https://git.openjdk.java.net/jdk/pull/4809
More information about the hotspot-dev
mailing list