RFR: 8351156: C1: Remove FPU stack support after 32-bit x86 removal [v2]

Aleksey Shipilev shade at openjdk.org
Fri Mar 28 18:05:21 UTC 2025


On Fri, 28 Mar 2025 17:59:21 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:

>> I think the intent for `ShouldNotReachHere()`-s in C1 code is to crash out on a gross error, instead of silently miscompiling. I would not be 100% sure src type and dst reg type are always correct. It is basically `guarantee` in disguise, AFAIU. So I'd prefer to keep it as is.
>
>> I think the intent for ShouldNotReachHere()-s in C1 code is to crash out on a gross error, instead of silently miscompiling.
> 
> It's not an universal convention and it varies even in `c1_LIRAssembler_x86.cpp`. 
> 
> For example, `LIR_Assembler::reg2mem` uses asserts for small dynamic dispatch tables while using `ShouldNotReachHere` on default case in top switch.
> 
> Anyway, it's a minor thing and more of a code style. 
> 
> If we want to crash on such conditions, `guarantee(cond, "")` looks superior to `if (cond) { ... } else { ShouldNotReachHere(); }`.

Yeah, I tend to agree. But I see the code style in majority of C1 code I saw/touched is `ShouldNotReachHere()`, so I prefer to stick with it :)

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24274#discussion_r2019112261


More information about the hotspot-compiler-dev mailing list