summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2009-08-06 21:44:41 -0700
committerGabe Black <gblack@eecs.umich.edu>2009-08-06 21:44:41 -0700
commitc7b894a06f16ea4bf9d02d8dc310f80e1fae0bf6 (patch)
tree2b1c3e15dc644391a12e91ea38bc2923fd94156b /src
parent011c1865ad559220f2ff07db572afd93244a9b6c (diff)
downloadgem5-c7b894a06f16ea4bf9d02d8dc310f80e1fae0bf6.tar.xz
X86: Make scas compare its operands in the right order.
Diffstat (limited to 'src')
-rw-r--r--src/arch/x86/isa/insts/general_purpose/string/scan_string.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/arch/x86/isa/insts/general_purpose/string/scan_string.py b/src/arch/x86/isa/insts/general_purpose/string/scan_string.py
index 5b0e74aad..5115fe8a2 100644
--- a/src/arch/x86/isa/insts/general_purpose/string/scan_string.py
+++ b/src/arch/x86/isa/insts/general_purpose/string/scan_string.py
@@ -62,7 +62,7 @@ def macroop SCAS_M {
mov t2, t2, t3, flags=(nCEZF,), dataSize=asz
ld t1, es, [1, t0, rdi]
- sub t0, t1, rax, flags=(OF, SF, ZF, AF, PF, CF)
+ sub t0, rax, t1, flags=(OF, SF, ZF, AF, PF, CF)
add rdi, rdi, t2, dataSize=asz
};
@@ -84,7 +84,7 @@ def macroop SCAS_E_M {
topOfLoop:
ld t1, es, [1, t0, rdi]
- sub t0, t1, rax, flags=(OF, SF, ZF, AF, PF, CF)
+ sub t0, rax, t1, flags=(OF, SF, ZF, AF, PF, CF)
subi rcx, rcx, 1, flags=(EZF,), dataSize=asz
add rdi, rdi, t2, dataSize=asz
@@ -105,7 +105,7 @@ def macroop SCAS_N_M {
topOfLoop:
ld t1, es, [1, t0, rdi]
- sub t0, t1, rax, flags=(OF, SF, ZF, AF, PF, CF)
+ sub t0, rax, t1, flags=(OF, SF, ZF, AF, PF, CF)
subi rcx, rcx, 1, flags=(EZF,), dataSize=asz
add rdi, rdi, t2, dataSize=asz