diff options
| author | 2020-06-15 18:59:01 +0100 | |
|---|---|---|
| committer | 2020-06-15 18:59:01 +0100 | |
| commit | 4417770ba9a1d48ded255e75c32dcc1005b912c1 (patch) | |
| tree | 009a371125b04f9c06418176b9a71cf8067b6b52 /src | |
| parent | Merge pull request #4070 from ogniK5377/GetTPCMasks-fix (diff) | |
| download | yuzu-4417770ba9a1d48ded255e75c32dcc1005b912c1.tar.gz yuzu-4417770ba9a1d48ded255e75c32dcc1005b912c1.tar.xz yuzu-4417770ba9a1d48ded255e75c32dcc1005b912c1.zip | |
xbyak_abi: Fix ABI_PushRegistersAndAdjustStack
Pushing GPRs twice.
Diffstat (limited to 'src')
| -rw-r--r-- | src/common/x64/xbyak_abi.h | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/common/x64/xbyak_abi.h b/src/common/x64/xbyak_abi.h index 794da8a52..d15e1aaf0 100644 --- a/src/common/x64/xbyak_abi.h +++ b/src/common/x64/xbyak_abi.h | |||
| @@ -178,21 +178,17 @@ inline size_t ABI_PushRegistersAndAdjustStack(Xbyak::CodeGenerator& code, std::b | |||
| 178 | size_t rsp_alignment, size_t needed_frame_size = 0) { | 178 | size_t rsp_alignment, size_t needed_frame_size = 0) { |
| 179 | s32 subtraction, xmm_offset; | 179 | s32 subtraction, xmm_offset; |
| 180 | ABI_CalculateFrameSize(regs, rsp_alignment, needed_frame_size, &subtraction, &xmm_offset); | 180 | ABI_CalculateFrameSize(regs, rsp_alignment, needed_frame_size, &subtraction, &xmm_offset); |
| 181 | |||
| 181 | for (std::size_t i = 0; i < regs.size(); ++i) { | 182 | for (std::size_t i = 0; i < regs.size(); ++i) { |
| 182 | if (regs[i] && ABI_ALL_GPRS[i]) { | 183 | if (regs[i] && ABI_ALL_GPRS[i]) { |
| 183 | code.push(IndexToReg64(static_cast<int>(i))); | 184 | code.push(IndexToReg64(static_cast<int>(i))); |
| 184 | } | 185 | } |
| 185 | } | 186 | } |
| 187 | |||
| 186 | if (subtraction != 0) { | 188 | if (subtraction != 0) { |
| 187 | code.sub(code.rsp, subtraction); | 189 | code.sub(code.rsp, subtraction); |
| 188 | } | 190 | } |
| 189 | 191 | ||
| 190 | for (int i = 0; i < regs.count(); i++) { | ||
| 191 | if (regs.test(i) & ABI_ALL_GPRS.test(i)) { | ||
| 192 | code.push(IndexToReg64(i)); | ||
| 193 | } | ||
| 194 | } | ||
| 195 | |||
| 196 | for (std::size_t i = 0; i < regs.size(); ++i) { | 192 | for (std::size_t i = 0; i < regs.size(); ++i) { |
| 197 | if (regs[i] && ABI_ALL_XMMS[i]) { | 193 | if (regs[i] && ABI_ALL_XMMS[i]) { |
| 198 | code.movaps(code.xword[code.rsp + xmm_offset], IndexToXmm(static_cast<int>(i))); | 194 | code.movaps(code.xword[code.rsp + xmm_offset], IndexToXmm(static_cast<int>(i))); |