Withdrawn: 8285436: riscv: Fix broken MacroAssembler::debug64

Xiaolin Zheng xlinzheng at openjdk.java.net
Fri Apr 22 11:40:24 UTC 2022


On Fri, 22 Apr 2022 07:33:43 GMT, Xiaolin Zheng <xlinzheng at openjdk.org> wrote:

> `MacroAssembler::stop()`[1] and `StubGenerator::generate_verify_oop()`[2] would first push all regs (calling `MacroAssembler::pusha()`[3]) onto the stack and then call `MacroAssembler::debug64()`[4] to print the pushed regs. But `MacroAssembler::pusha()`[3] won't push x0~x4 so the result of `MacroAssembler::debug64()` is broken.
> 
> Tested by manually adding a `__ verify_oop(x1)` and option `-XX:+VerifyOops -XX:+ShowMessageBoxOnError` to deliberately crash the VM to make sure the new result matches the fact. Also a hotspot tier1.
> 
> [1] https://github.com/openjdk/jdk/blob/master/src/hotspot/cpu/riscv/macroAssembler_riscv.cpp#L533
> [2] https://github.com/openjdk/jdk/blob/master/src/hotspot/cpu/riscv/stubGenerator_riscv.cpp#L581
> [3] https://github.com/openjdk/jdk/blob/master/src/hotspot/cpu/riscv/macroAssembler_riscv.cpp#L1126-L1130
> [4] https://github.com/openjdk/jdk/blob/master/src/hotspot/cpu/riscv/macroAssembler_riscv.cpp#L473-L503
> 
> Thanks,
> Xiaolin

This pull request has been closed without being integrated.

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

PR: https://git.openjdk.java.net/jdk/pull/8357


More information about the hotspot-compiler-dev mailing list