From d497464c9f32ae18aad9fdf15c8a79a8a54d6cdf Mon Sep 17 00:00:00 2001 From: MerryMage Date: Fri, 26 Jan 2018 18:35:46 +0000 Subject: [PATCH] a64_jitstate: Have 128-bit wide spills --- src/backend_x64/a64_jitstate.h | 4 ++-- src/backend_x64/hostloc.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/backend_x64/a64_jitstate.h b/src/backend_x64/a64_jitstate.h index 430de5be..386c3c63 100644 --- a/src/backend_x64/a64_jitstate.h +++ b/src/backend_x64/a64_jitstate.h @@ -42,10 +42,10 @@ struct A64JitState { alignas(16) std::array vec{}; // Extension registers. static constexpr size_t SpillCount = 64; - std::array spill{}; // Spill. + alignas(16) std::array, SpillCount> spill{}; // Spill. static Xbyak::Address GetSpillLocationFromIndex(size_t i) { using namespace Xbyak::util; - return qword[r15 + offsetof(A64JitState, spill) + i * sizeof(u64)]; + return xword[r15 + offsetof(A64JitState, spill) + i * sizeof(u64) * 2]; } // For internal use (See: BlockOfCode::RunCode) diff --git a/src/backend_x64/hostloc.h b/src/backend_x64/hostloc.h index 2d29c87a..bb6d22fd 100644 --- a/src/backend_x64/hostloc.h +++ b/src/backend_x64/hostloc.h @@ -53,7 +53,7 @@ inline size_t HostLocBitWidth(HostLoc loc) { if (HostLocIsXMM(loc)) return 128; if (HostLocIsSpill(loc)) - return 64; + return 128; if (HostLocIsFlag(loc)) return 1; UNREACHABLE();