RFR: 8315841: RISC-V: Check for hardware TSO support [v4]

Ludovic Henry luhenry at openjdk.org
Thu Sep 7 12:56:42 UTC 2023


On Thu, 7 Sep 2023 12:44:09 GMT, Robbin Ehn <rehn at openjdk.org> wrote:

>> Ludovic Henry has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   fixup! 8315841: RISC-V: Check for hardware TSO support
>
> src/hotspot/cpu/riscv/vm_version_riscv.cpp line 213:
> 
>> 211:   }
>> 212: 
>> 213: #if defined(TARGET_ZTSO) && TARGET_ZTSO
> 
> If someone compiles with "CXXFLAGS=-marchrv64....ztso..", we need to try to parse the supplied flags, that doesn't seem like fun.
> Instead I suggest we add code to read-out the elf flags, i.e:
> "Flags:                             0x15, RVC, double-float ABI, TSO"
> 
> And set UseZtso:
> A: If this is a TSO elf.
> B: If hwprobe says this TSO hardware (either directly or via vendor).
> C: If someone set flag,
> 
> I guess your idea was to have a flag like --enable-tso which sets TARGET_TSO ?
> If we have that or not I still like above to happen.
> 
> (I'm not saying you should do any of this in this PR, I can file new ones)

`TARGET_TSO` is set by gcc directly. See https://www.mail-archive.com/gcc-patches@gcc.gnu.org/msg281514.html

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

PR Review Comment: https://git.openjdk.org/jdk/pull/15613#discussion_r1318559665


More information about the hotspot-dev mailing list