Skip to content
Permalink
Browse files
8258703: Incorrect 512-bit vector registers restore on x86_32
Backport-of: 216c2ec
  • Loading branch information
shipilev committed Aug 13, 2021
1 parent d24982f commit 8e63ecb8f0f428e83470312df3657f8480634115
Showing with 7 additions and 6 deletions.
  1. +7 −6 src/hotspot/cpu/x86/sharedRuntime_x86_32.cpp
@@ -315,18 +315,19 @@ void RegisterSaver::restore_live_registers(MacroAssembler* masm, bool restore_ve
}

if (restore_vectors) {
off = additional_frame_bytes - ymm_bytes;
// Restore upper half of YMM registers.
for (int n = 0; n < num_xmm_regs; n++) {
__ vinsertf128_high(as_XMMRegister(n), Address(rsp, n*16+off));
}

if (UseAVX > 2) {
// Restore upper half of ZMM registers.
for (int n = 0; n < num_xmm_regs; n++) {
__ vinsertf64x4_high(as_XMMRegister(n), Address(rsp, n*32));
}
__ addptr(rsp, zmm_bytes);
}
// Restore upper half of YMM registers.
for (int n = 0; n < num_xmm_regs; n++) {
__ vinsertf128_high(as_XMMRegister(n), Address(rsp, n*16));
}
__ addptr(rsp, ymm_bytes);
__ addptr(rsp, additional_frame_bytes);
}

__ pop_FPU_state();

1 comment on commit 8e63ecb

@openjdk-notifier

This comment has been minimized.

Copy link

@openjdk-notifier openjdk-notifier bot commented on 8e63ecb Aug 13, 2021

Please sign in to comment.