summaryrefslogtreecommitdiff
path: root/src/arch/x86/isa/insts/general_purpose
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2009-08-05 03:04:17 -0700
committerGabe Black <gblack@eecs.umich.edu>2009-08-05 03:04:17 -0700
commitef3896d8517990c22fe822649cf1965d6152a137 (patch)
treeec44f80dccbc531cb055d0dff9f4cb4029f2a9c4 /src/arch/x86/isa/insts/general_purpose
parent664d50b439001889e6f29a025c433c01ac3449d7 (diff)
downloadgem5-ef3896d8517990c22fe822649cf1965d6152a137.tar.xz
X86: Use the new forced folding mechanism for the SAHF and LAHF instructions.
Diffstat (limited to 'src/arch/x86/isa/insts/general_purpose')
-rw-r--r--src/arch/x86/isa/insts/general_purpose/flags/load_and_store.py20
1 files changed, 2 insertions, 18 deletions
diff --git a/src/arch/x86/isa/insts/general_purpose/flags/load_and_store.py b/src/arch/x86/isa/insts/general_purpose/flags/load_and_store.py
index 0915bf819..01908ca7b 100644
--- a/src/arch/x86/isa/insts/general_purpose/flags/load_and_store.py
+++ b/src/arch/x86/isa/insts/general_purpose/flags/load_and_store.py
@@ -55,26 +55,10 @@
microcode = '''
def macroop SAHF {
- # This will fold to ah since this never executes in 64 bit mode.
- ruflags rsp, dataSize=1
-};
-
-# This is allows the instruction to write to ah in 64 bit mode.
-def macroop SAHF_64 {
- ruflags t1
- slli t1, t1, 8
- mov t1, t1, rax, dataSize=1
- mov rax, rax, t1, dataSize=2
+ ruflags ah, dataSize=1
};
def macroop LAHF {
- # This will fold to ah since this never executes in 64 bit mode.
- wruflags rsp, t0, dataSize=1
-};
-
-# This is allows the instruction to read from ah in 64 bit mode.
-def macroop LAHF_64 {
- srli t1, rax, 8, dataSize=2
- wruflags t1, t0, dataSize=1
+ wruflags ah, t0, dataSize=1
};
'''