RFR: 8345159: RISCV: Fix -Wzero-as-null-pointer-constant warning in emit_static_call_stub
Kim Barrett
kbarrett at openjdk.org
Wed Dec 4 08:59:38 UTC 2024
On Tue, 3 Dec 2024 06:42:25 GMT, Robbin Ehn <rehn at openjdk.org> wrote:
>> That seems OK to me. Then we can still use `movptr` here.
>>
>> address placeholder = pc(); // correct value will be patched in later
>> movptr(t1, placeholder, offset, t0); // lui + lui + slli + add
>
> When looking at the disassembly it much easier to find uninitialized call stubs when we use 0.
> Also if something would go wrong, it much nicer with a crash than a loop.
> So for debuggability I prefer address 0.
I'm inclined to leave this as is, because I agree with @robehn and because I think directly calling movptr2
when that's what one needs to have called (because one expected a particular sequence of instructions
to be generated) is better than indirectly calling it via the more generic movptr. Anyone disagree? I'll wait
another day for responses.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22435#discussion_r1868998058
More information about the hotspot-compiler-dev
mailing list