On Tue, 21 Jul 2026 08:54:29 GMT, Harshit Dhiman <[email protected]> wrote:

> Port the Z garbage collector to s390.
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

Some comments from a short glance. I will spend more time on it.

src/hotspot/cpu/s390/gc/z/zBarrierSetAssembler_s390.cpp line 281:

> 279:   // Combined pointer bump and check if the buffer is disabled or full
> 280:   __ z_lg(temp2, Address(temp1, ZStoreBarrierBuffer::current_offset()));
> 281:   __ z_cghi(temp2, (uint8_t)0);

can't you use `ltg` here ?

src/hotspot/cpu/s390/gc/z/zBarrierSetAssembler_s390.cpp line 518:

> 516:   Label done, loop, load_bad, load_good, store_bad, store_good;
> 517:   __ z_sllg(Z_R0, Z_ARG3, 3);
> 518:   __ z_ltgr(Z_R0, Z_R0);

what's the issue with `slag` here ?

src/hotspot/cpu/s390/gc/z/zBarrierSetAssembler_s390.cpp line 537:

> 535:   __ pop_frame();
> 536: 
> 537:   __ z_xgr(Z_RET, Z_RET);

xgr also sets the condition code, I would prefer to use `clear_reg` here.

src/hotspot/cpu/s390/gc/z/zBarrierSetAssembler_s390.cpp line 738:

> 736:   __ pop_frame();
> 737: 
> 738:   __ z_lgr(ref, Z_R0);

What's here in Z_R0 ?

src/hotspot/cpu/s390/gc/z/zBarrierSetAssembler_s390.cpp line 804:

> 802:                                                                  
> DecoratorSet decorators) const {
> 803: 
> 804:   int nbytes_save = 15 * BytesPerWord;                               // 
> R1 to R5, F0 to F7, SP, PC

z_abi_160 will make slot for return_pc and sp. you don't need to create extra.

src/hotspot/cpu/s390/gc/z/zBarrierSetAssembler_s390.cpp line 830:

> 828:                                                                   bool 
> self_healing) const {
> 829: 
> 830:   int nbytes_save = 15 * BytesPerWord;                               /* 
> R1 to R5, F0 to F7, SP, PC */

same as above.

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

PR Review: https://git.openjdk.org/jdk/pull/31984#pullrequestreview-4896329805
PR Review Comment: https://git.openjdk.org/jdk/pull/31984#discussion_r3749133568
PR Review Comment: https://git.openjdk.org/jdk/pull/31984#discussion_r3749209808
PR Review Comment: https://git.openjdk.org/jdk/pull/31984#discussion_r3749225650
PR Review Comment: https://git.openjdk.org/jdk/pull/31984#discussion_r3749296479
PR Review Comment: https://git.openjdk.org/jdk/pull/31984#discussion_r3749318721
PR Review Comment: https://git.openjdk.org/jdk/pull/31984#discussion_r3749320643

Reply via email to