[lworld] RFR: Merge jdk [v2]
Frederic Parain
fparain at openjdk.org
Thu Sep 28 18:20:55 UTC 2023
On Thu, 28 Sep 2023 08:10:07 GMT, David Simms <dsimms at openjdk.org> wrote:
>> Merge jdk-22+9
>
> David Simms has updated the pull request incrementally with one additional commit since the last revision:
>
> Deferred test issues
Changes requested by fparain (Committer).
src/hotspot/cpu/x86/templateTable_x86.cpp line 3713:
> 3711: load_resolved_field_entry(noreg, cache, rax, rbx, rdx);
> 3712: // RBX: field offset, RCX: RAX: TOS, RDX: flags
> 3713: __ movl(rscratch2, rdx); // saving flags for is_flat test
It is dangerous to save the value in a scratch register and not using it immediately. In the current state of the code, there's no corruption of this register. But pop_and_check_object() below can produce a lot of code when verifying the oop, and if this code is modified and starts to use rschratch2, corruption will happen.
Suggested change:
load_resolved_field_entry(noreg, cache, rax, rbx, rdx);
__ pop(rax);
// Get object from stack
pop_and_check_object(rcx);
const Address field(rcx, rbx, Address::times_1);
// Check for volatile store
__ movl(rscratch2, rdx); // preserving flags for is_flat test
__ testl(rscratch2, rscratch2);
__ jcc(Assembler::zero, notVolatile);
-------------
PR Review: https://git.openjdk.org/valhalla/pull/930#pullrequestreview-1649424730
PR Review Comment: https://git.openjdk.org/valhalla/pull/930#discussion_r1340495242
More information about the valhalla-dev
mailing list