xbyak_abi: Fix ABI_PushRegistersAndAdjustStack
Pushing GPRs twice.
This commit is contained in:
parent
55ebf68636
commit
4417770ba9
|
@ -178,21 +178,17 @@ inline size_t ABI_PushRegistersAndAdjustStack(Xbyak::CodeGenerator& code, std::b
|
||||||
size_t rsp_alignment, size_t needed_frame_size = 0) {
|
size_t rsp_alignment, size_t needed_frame_size = 0) {
|
||||||
s32 subtraction, xmm_offset;
|
s32 subtraction, xmm_offset;
|
||||||
ABI_CalculateFrameSize(regs, rsp_alignment, needed_frame_size, &subtraction, &xmm_offset);
|
ABI_CalculateFrameSize(regs, rsp_alignment, needed_frame_size, &subtraction, &xmm_offset);
|
||||||
|
|
||||||
for (std::size_t i = 0; i < regs.size(); ++i) {
|
for (std::size_t i = 0; i < regs.size(); ++i) {
|
||||||
if (regs[i] && ABI_ALL_GPRS[i]) {
|
if (regs[i] && ABI_ALL_GPRS[i]) {
|
||||||
code.push(IndexToReg64(static_cast<int>(i)));
|
code.push(IndexToReg64(static_cast<int>(i)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (subtraction != 0) {
|
if (subtraction != 0) {
|
||||||
code.sub(code.rsp, subtraction);
|
code.sub(code.rsp, subtraction);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < regs.count(); i++) {
|
|
||||||
if (regs.test(i) & ABI_ALL_GPRS.test(i)) {
|
|
||||||
code.push(IndexToReg64(i));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for (std::size_t i = 0; i < regs.size(); ++i) {
|
for (std::size_t i = 0; i < regs.size(); ++i) {
|
||||||
if (regs[i] && ABI_ALL_XMMS[i]) {
|
if (regs[i] && ABI_ALL_XMMS[i]) {
|
||||||
code.movaps(code.xword[code.rsp + xmm_offset], IndexToXmm(static_cast<int>(i)));
|
code.movaps(code.xword[code.rsp + xmm_offset], IndexToXmm(static_cast<int>(i)));
|
||||||
|
|
Reference in New Issue