RFR: 8353500: [s390x] Intrinsify Unsafe::setMemory
Martin Doerr
mdoerr at openjdk.org
Tue Apr 8 08:49:16 UTC 2025
On Mon, 7 Apr 2025 13:42:03 GMT, Lutz Schmidt <lucy at openjdk.org> wrote:
>> Unsafe::setMemory intrinsic implementation for s390x.
>>
>> Stub Code:
>>
>>
>> StubRoutines::unsafe_setmemory [0x000003ffb04b63c0, 0x000003ffb04b64d0] (272 bytes)
>> --------------------------------------------------------------------------------
>> 0x000003ffb04b63c0: ogrk %r1,%r2,%r3
>> 0x000003ffb04b63c4: nill %r1,7
>> 0x000003ffb04b63c8: je 0x000003ffb04b6410
>> 0x000003ffb04b63cc: nill %r1,3
>> 0x000003ffb04b63d0: je 0x000003ffb04b6460
>> 0x000003ffb04b63d4: nill %r1,1
>> 0x000003ffb04b63d8: jlh 0x000003ffb04b64a0
>> 0x000003ffb04b63dc: risbg %r4,%r4,48,55,8
>> 0x000003ffb04b63e2: risbgz %r1,%r3,32,63,62
>> 0x000003ffb04b63e8: je 0x000003ffb04b6402
>> 0x000003ffb04b63ec: nopr
>> 0x000003ffb04b63ee: nopr
>> 0x000003ffb04b63f0: sth %r4,0(%r2)
>> 0x000003ffb04b63f4: sth %r4,2(%r2)
>> 0x000003ffb04b63f8: agfi %r2,4
>> 0x000003ffb04b63fe: brct %r1,0x000003ffb04b63f0
>> 0x000003ffb04b6402: nilf %r3,2
>> 0x000003ffb04b6408: ber %r14
>> 0x000003ffb04b640a: sth %r4,0(%r2)
>> 0x000003ffb04b640e: br %r14
>> 0x000003ffb04b6410: risbg %r4,%r4,48,55,8
>> 0x000003ffb04b6416: risbg %r4,%r4,32,47,16
>> 0x000003ffb04b641c: risbg %r4,%r4,0,31,32
>> 0x000003ffb04b6422: risbgz %r1,%r3,32,63,60
>> 0x000003ffb04b6428: je 0x000003ffb04b6446
>> 0x000003ffb04b642c: nopr
>> 0x000003ffb04b642e: nopr
>> 0x000003ffb04b6430: stg %r4,0(%r2)
>> 0x000003ffb04b6436: stg %r4,8(%r2)
>> 0x000003ffb04b643c: agfi %r2,16
>> 0x000003ffb04b6442: brct %r1,0x000003ffb04b6430
>> 0x000003ffb04b6446: nilf %r3,8
>> 0x000003ffb04b644c: ber %r14
>> 0x000003ffb04b644e: stg %r4,0(%r2)
>> 0x000003ffb04b6454: br %r14
>> 0x000003ffb04b6456: nopr
>> 0x000003ffb04b6458: nopr
>> 0x000003ffb04b645a: nopr
>> 0x000003ffb04b645c: nopr
>> 0x000003ffb04b645e: nopr
>> 0x000003ffb04b6460: risbg %r4,%r4,48,55,8
>> 0x000003ffb04b6466: risbg %r4,%r4,32,47,16
>> 0x000003ffb04b646c: risbgz %r1,%r3,32,63,61
>> 0x000003ffb04b6472: je 0x000003ffb04b6492
>> 0x000003ffb04b6476: nopr
>> 0x000003ffb04b6478: nopr
>> 0x000003ffb04b647a: nopr
>> 0x000003ffb04b647c: nopr
>> 0x000003ffb04b647e: nopr
>> 0x000003ffb04b6480: st %r4,0(%r2)
>> 0x000003ffb04b6484: st %r4,4(%r2)
>> 0x000003ffb04b6488: agfi %r2,8
>> 0x000003ffb04b648e: brct %r1,0x000003ffb04b6480
>> 0x000003ffb04b6492: nilf %r3,4
>> 0x000003ffb04b6498: ber %r14
>> 0x000003ffb04b649a: st %r4,0(%r2)
>> 0x0000...
>
> src/hotspot/cpu/s390/stubGenerator_s390.cpp line 1557:
>
>> 1555: do_setmemory_atomic_loop(2, dest, size, byteVal, _masm);
>> 1556:
>> 1557: __ align(16);
>
> What is this alignment good for?
Branch target alignment. There is no fallthrough path from before this point. Should it be 32?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24480#discussion_r2032709818
More information about the hotspot-compiler-dev
mailing list