Skip to content
Permalink
Browse files
8270832: Aarch64: Update algorithm annotations for MacroAssembler::fi…
…ll_words

Co-authored-by: Wang Huang <whuang@openjdk.org>
Co-authored-by: Miu Zhuojun <mouzhuojun@huawei.com>
Co-authored-by: Wu Yan <wuyan@openjdk.org>
Reviewed-by: ngasson, aph
  • Loading branch information
3 people authored and nick-arm committed Sep 7, 2021
1 parent eb22181 commit 649c22c5b17efbc3116ac34739b8d1be39de01be
Showing 1 changed file with 21 additions and 7 deletions.
@@ -4773,23 +4773,37 @@ void MacroAssembler::fill_words(Register base, Register cnt, Register value)
{
// Algorithm:
//
// scratch1 = cnt & 7;
// if (cnt == 0) {
// return;
// }
// if ((p & 8) != 0) {
// *p++ = v;
// }
//
// scratch1 = cnt & 14;
// cnt -= scratch1;
// p += scratch1;
// switch (scratch1) {
// switch (scratch1 / 2) {
// do {
// cnt -= 8;
// p[-8] = v;
// cnt -= 16;
// p[-16] = v;
// p[-15] = v;
// case 7:
// p[-7] = v;
// p[-14] = v;
// p[-13] = v;
// case 6:
// p[-6] = v;
// p[-12] = v;
// p[-11] = v;
// // ...
// case 1:
// p[-2] = v;
// p[-1] = v;
// case 0:
// p += 8;
// p += 16;
// } while (cnt);
// }
// if ((cnt & 1) == 1) {
// *p++ = v;
// }

assert_different_registers(base, cnt, value, rscratch1, rscratch2);

1 comment on commit 649c22c

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on 649c22c Sep 7, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.