RFR: 8359435: AArch64: add support for SB instruction to MacroAssembler::spin_wait [v2]

Evgeny Astigeevich eastigeevich at openjdk.org
Wed Jun 25 13:47:33 UTC 2025


On Tue, 24 Jun 2025 16:36:34 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> Evgeny Astigeevich has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - Add SB detection
>>  - Add support for SB to MacroAssembler::spin_wait
>
> test/hotspot/jtreg/compiler/onSpinWait/TestOnSpinWaitAArch64.java line 80:
> 
>> 78:         OutputAnalyzer analyzer = new OutputAnalyzer(pb.start());
>> 79: 
>> 80:         if (analyzer.getExitValue() != 0 && "sb".equals(spinWaitInst) && analyzer.contains("CPU does not support SB")) {
> 
> The logic here is a bit off. Suppose we _do_ have non-zero exit code for, say, `isb`. This would not fail the test now. Do it something like this instead?
> 
> 
> if ("sb".equals(spinWaitInst) && analyzer.contains("CPU does not support SB")) {
>     System.out.println("Skipping the test. The current CPU does not support SB instruction.");
>     return;
> }
> 
> analyzer.shouldHaveExitValue(0);

Thank you, Aleksey for finding this. I accidentally removed `analyzer.shouldHaveExitValue(0)`

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25801#discussion_r2166758608


More information about the hotspot-compiler-dev mailing list