From: Gabe Black Date: Fri, 7 Aug 2009 04:44:41 +0000 (-0700) Subject: X86: Make scas compare its operands in the right order. X-Git-Tag: Calvin_Submission~157 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c7b894a06f16ea4bf9d02d8dc310f80e1fae0bf6;p=gem5.git X86: Make scas compare its operands in the right order. --- 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