RFR: 8256757: Incorrect MachCallRuntimeNode::ret_addr_offset() for CallLeafNoFP on x86_32
Aleksey Shipilev
shade at openjdk.java.net
Thu Nov 26 13:04:01 UTC 2020
JDK-8254231 added new assert in `output.cpp`:
assert(!is_mcall || (call_returns[block->_pre_order] <= (uint) current_offset))
Which verifies that the offset returned by MachCallNode::ret_addr_offset() (and sub-types) at matches the emitted code, to avoid potential conflicts between oop maps of different calls.
It caught the failure running `compiler/intrinsics/string/TestStringLatin1IndexOfChar.java` on Linux x86_32, because it forces lower SSE settings. But more tests fail if you run with lower SSE settings. The real issue is `MachCallRuntimeNode::ret_addr_offset()` computing the offset incorrectly for `CallLeafNoFP`: the match rule for it does not include `FFree_Float_Stack_All`.
See the definitions:
// Call runtime without safepoint
instruct CallLeafDirect(method meth) %{
match(CallLeaf);
effect(USE meth);
ins_cost(300);
format %{ "CALL_LEAF,runtime " %}
opcode(0xE8); /* E8 cd */
ins_encode( pre_call_resets,
FFree_Float_Stack_All,
Java_To_Runtime( meth ),
Verify_FPU_For_Leaf, post_call_FPU );
ins_pipe( pipe_slow );
%}
instruct CallLeafNoFPDirect(method meth) %{
match(CallLeafNoFP);
effect(USE meth);
ins_cost(300);
format %{ "CALL_LEAF_NOFP,runtime " %}
opcode(0xE8); /* E8 cd */
ins_encode(pre_call_resets, Java_To_Runtime(meth));
ins_pipe( pipe_slow );
%}
Testing:
- [x] A few known failing tests on Linux x86_32
- [x] Linux x86_32 `tier1`
- [ ] Linux x86_32 `tier1` with `-UseSSE=1`
-------------
Commit messages:
- Formatting, comments
- 8256757: Incorrect MachCallRuntimeNode::ret_addr_offset() for CallLeafNoFP
Changes: https://git.openjdk.java.net/jdk/pull/1452/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=1452&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8256757
Stats: 9 lines in 5 files changed: 7 ins; 0 del; 2 mod
Patch: https://git.openjdk.java.net/jdk/pull/1452.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/1452/head:pull/1452
PR: https://git.openjdk.java.net/jdk/pull/1452
More information about the hotspot-compiler-dev
mailing list