Gabe Black has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/55250 )
Change subject: arch-x86: Use operand size consistently pushing for near
calls.
......................................................................
arch-x86: Use operand size consistently pushing for near calls.
The near call instruction first attempts to store the return address on
the stack (the part of the instruction that could fail), and then if
that succeeds it decrements the stack pointer to point at the newly
stored data.
Unfortunately, the microcode was not using the same offset between
those two steps. Specifically it was using the effective operand size
when storing the return address, but then incorrectly using the
effective stack size when adjusting the stack pointer.
This change updates the microcode to use the effective operand size in
both places.
Change-Id: Ic4211a96900fee5d10c2fa0e038070383fefaac3
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/55250
Maintainer: Bobby Bruce <bbr...@ucdavis.edu>
Tested-by: kokoro <noreply+kok...@google.com>
Reviewed-by: Gabe Black <gabe.bl...@gmail.com>
---
M src/arch/x86/isa/insts/general_purpose/control_transfer/call.py
1 file changed, 30 insertions(+), 4 deletions(-)
Approvals:
Gabe Black: Looks good to me, approved
Bobby Bruce: Looks good to me, approved
kokoro: Regressions pass
diff --git
a/src/arch/x86/isa/insts/general_purpose/control_transfer/call.py
b/src/arch/x86/isa/insts/general_purpose/control_transfer/call.py
index 4204a8c..31b81e9 100644
--- a/src/arch/x86/isa/insts/general_purpose/control_transfer/call.py
+++ b/src/arch/x86/isa/insts/general_purpose/control_transfer/call.py
@@ -45,7 +45,7 @@
rdip t7
# Check target of call
stis t7, ss, [0, t0, rsp], "-env.dataSize"
- subi rsp, rsp, ssz
+ subi rsp, rsp, dsz
wrip t7, t1
};
@@ -59,7 +59,7 @@
rdip t1
# Check target of call
stis t1, ss, [0, t0, rsp], "-env.dataSize"
- subi rsp, rsp, ssz
+ subi rsp, rsp, dsz
wripi reg, 0
};
@@ -74,7 +74,7 @@
ld t1, seg, sib, disp
# Check target of call
st t7, ss, [0, t0, rsp], "-env.dataSize"
- subi rsp, rsp, ssz
+ subi rsp, rsp, dsz
wripi t1, 0
};
@@ -89,7 +89,7 @@
ld t1, seg, riprel, disp
# Check target of call
st t7, ss, [0, t0, rsp], "-env.dataSize"
- subi rsp, rsp, ssz
+ subi rsp, rsp, dsz
wripi t1, 0
};
'''
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/55250
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Ic4211a96900fee5d10c2fa0e038070383fefaac3
Gerrit-Change-Number: 55250
Gerrit-PatchSet: 12
Gerrit-Owner: Gabe Black <gabe.bl...@gmail.com>
Gerrit-Reviewer: Bobby Bruce <bbr...@ucdavis.edu>
Gerrit-Reviewer: Bradford Beckmann <bradford.beckm...@gmail.com>
Gerrit-Reviewer: Gabe Black <gabe.bl...@gmail.com>
Gerrit-Reviewer: Jason Lowe-Power <ja...@lowepower.com>
Gerrit-Reviewer: Matt Sinclair <mattdsincl...@gmail.com>
Gerrit-Reviewer: Matthew Poremba <matthew.pore...@amd.com>
Gerrit-Reviewer: kokoro <noreply+kok...@google.com>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s