RFR: 8292638: x86: Improve scratch register handling in VM stubs [v4]
Vladimir Ivanov
vlivanov at openjdk.org
Mon Aug 22 23:54:31 UTC 2022
On Mon, 22 Aug 2022 11:29:17 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
>> Vladimir Ivanov has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains seven commits:
>>
>> - Merge branch 'master' into trig_rscratch
>> - rscratch
>> - cmp64
>> - 8292638: x86: Improve scratch register handling in VM stubs
>> - StubRoutines cleanup
>> - tabs
>> - x86: Improve handling of constants in trigonometric stubs
>
> src/hotspot/cpu/x86/assembler_x86.cpp line 12244:
>
>> 12242: }
>> 12243:
>> 12244: bool Assembler::always_reachable(AddressLiteral adr) {
>
> So, there is a similar block in `Assembler::is_reachable_from` -- does it make sense to reuse it then? They also are subtly different on the use of `ForceUnreachable`, would this method return different result compared to `Assembler::is_reachable_from`, and thus fail the assert in `Assembler::reachable`?
As it is now, `ForceUnreachable` works fine.
There's one implicit assumption which makes it work though: temporary code buffer has to reside in code cache which is always the case now. Otherwise, `always_reachable` would have to take `pc` into account as well.
I propose to make it a requirement for the code buffer to be placed in the code cache and simplify the reachability checks based on that. (Latest version reflects the proposal.)
-------------
PR: https://git.openjdk.org/jdk/pull/9932
More information about the hotspot-dev
mailing list