RFR: 8299172: RISC-V: [TESTBUG] Fix stack alignment logic in jvmci RISCV64TestAssembler.java

Fei Yang fyang at openjdk.org
Wed Dec 21 08:54:50 UTC 2022


On Wed, 21 Dec 2022 06:13:04 GMT, Xiaolin Zheng <xlinzheng at openjdk.org> wrote:

> We observed a failure in JVMCI tests after `-ea -esa` turned on when running `./test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/NativeCallTest.java`.
> 
> Failure at the line [1].
> 
> 
> java.lang.AssertionError
> at jdk.vm.ci.code.test.riscv64.RISCV64TestAssembler.emitGrowStack(RISCV64TestAssembler.java:203)
> at jdk.vm.ci.code.test.riscv64.RISCV64TestAssembler.emitCallPrologue(RISCV64TestAssembler.java:239)
> ...
> ...
> 
> 
> The failure output has been attached to the JBS issue link.
> 
> To be short, the stack alignment should align with `16`, and we can align with the logic in AArch64 [2] and x86_64 [3]. The x86_64 one is inside a recent change.
> 
> Tested along with other patches, and the failed test passed.
> 
> Thanks,
> Xiaolin
> 
> [1] https://github.com/openjdk/jdk/blob/f56285c3613bb127e22f544bd4b461a0584e9d2a/test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/riscv64/RISCV64TestAssembler.java#L193
> [2] https://github.com/openjdk/jdk/blob/f56285c3613bb127e22f544bd4b461a0584e9d2a/test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/aarch64/AArch64TestAssembler.java#L273-L285
> [3] https://github.com/openjdk/jdk/commit/277f0c24a2e186166bfe70fc93ba79aec10585aa

Looks reasonable to me.

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

Marked as reviewed by fyang (Reviewer).

PR: https://git.openjdk.org/jdk/pull/11751


More information about the hotspot-compiler-dev mailing list