RFR: 8255579: x86: Use cmpq(Register,Address) in safepoint_poll
Erik Österlund
eosterlund at openjdk.java.net
Thu Oct 29 09:54:45 UTC 2020
On Thu, 29 Oct 2020 08:14:27 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
> JDK-8253180 added a new block in `safepoint_poll` that uses broken `cmpq` (JDK-8255550): it effectively does the comparison with operands swapped. It makes sense to use the non-broken `cmpq`, as to avoid changing the condition code and thus making the code less understandable. See the discussion in #910.
>
> Testing:
> - [x] `tier1` with Z (some SA tests fail, and some other fail with OOME -- seem to be expected/problem-listed)
Looks good. I also got confused about this. When this instruction didn't work the way I thought it would, I thought it must be a weird style thing, that everything is right to left in the assembler, for consistency, so it would read from right to left. Then I convinced myself it made sense. But the instruction being incorrectly encoded also checks out. Sigh. Anyway, I ran some local testing that would just fall over immediately if this didn't work. And it seems to work.
-------------
Marked as reviewed by eosterlund (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/924
More information about the hotspot-dev
mailing list