arch-x86: Implement the PUSH instruction for segment selectors.
The implementation for PUSH is very simple and can be implemented trivially like the other PUSH versions. POP is more complicated since it needs to actually set up the segment being popped into. Change-Id: I4a5a4bcace15aef02186f893ccdd052083e5cb5d Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/55446 Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com> Maintainer: Matt Sinclair <mattdsinclair@gmail.com> Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Gabe Black <gabe.black@gmail.com>
This commit is contained in:
@@ -100,6 +100,12 @@ def macroop PUSH_P {
|
||||
subi rsp, rsp, ssz
|
||||
};
|
||||
|
||||
def macroop PUSH_S {
|
||||
rdsel t1, sr
|
||||
st t1, ss, [1, t0, rsp], "-env.dataSize", addressSize=ssz
|
||||
subi rsp, rsp, dsz, dataSize=ssz
|
||||
};
|
||||
|
||||
def macroop PUSHA {
|
||||
# Check all the stack addresses. We'll assume that if the beginning and
|
||||
# end are ok, then the stuff in the middle should be as well.
|
||||
|
||||
Reference in New Issue
Block a user