summaryrefslogtreecommitdiff
path: root/src/arch/x86/isa/insts/data_transfer/stack_operations.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/x86/isa/insts/data_transfer/stack_operations.py')
-rw-r--r--src/arch/x86/isa/insts/data_transfer/stack_operations.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/arch/x86/isa/insts/data_transfer/stack_operations.py b/src/arch/x86/isa/insts/data_transfer/stack_operations.py
index b7ec0ec66..ad95fd468 100644
--- a/src/arch/x86/isa/insts/data_transfer/stack_operations.py
+++ b/src/arch/x86/isa/insts/data_transfer/stack_operations.py
@@ -55,28 +55,28 @@
microcode = '''
def macroop POP_R {
+
+ # Make the default data size of pops 64 bits in 64 bit mode
.adjust_env "if(machInst.mode.submode == SixtyFourBitMode && env.dataSize == 4) env.dataSize = 8\;"
- # There needs to be a load here to actually "pop" the data
+
+ ld "env.reg", 2, [0, "NUM_INTREGS", "INTREG_RSP"]
addi "INTREG_RSP", "INTREG_RSP", "env.dataSize"
};
def macroop PUSH_R {
+
+ # Make the default data size of pops 64 bits in 64 bit mode
.adjust_env "if(machInst.mode.submode == SixtyFourBitMode && env.dataSize == 4) env.dataSize = 8\;"
+
subi "INTREG_RSP", "INTREG_RSP", "env.dataSize"
- # There needs to be a store here to actually "push" the data
+ st "env.reg", 2, [0, "NUM_INTREGS", "INTREG_RSP"]
};
'''
#let {{
-# class POP(Inst):
-# "GenFault ${new UnimpInstFault}"
-# class POPA(Inst):
-# "GenFault ${new UnimpInstFault}"
# class POPA(Inst):
# "GenFault ${new UnimpInstFault}"
# class POPAD(Inst):
# "GenFault ${new UnimpInstFault}"
-# class PUSH(Inst):
-# "GenFault ${new UnimpInstFault}"
# class PUSHA(Inst):
# "GenFault ${new UnimpInstFault}"
# class PUSHAD(Inst):