mirror of
https://github.com/openjdk/jdk.git
synced 2026-04-04 20:18:49 +00:00
8270832: Aarch64: Update algorithm annotations for MacroAssembler::fill_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
This commit is contained in:
parent
eb221812b2
commit
649c22c5b1
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user