Skip to content

Commit

Permalink
Fix backwards comparison on scasb
Browse files Browse the repository at this point in the history
  • Loading branch information
tbodt committed Dec 21, 2020
1 parent 3111729 commit f2976b7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
7 changes: 4 additions & 3 deletions jit/gadgets-x86_64/string.S
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,10 @@
.else; .ifc \op, scas
mov %edi, %_addr
read_prep \size, \op\size\()_\rep
mov\ss (%_addrq), %tmp\s
setf_a src=%\a, dst=%tmp\s, ss=\ss
sub\ss %\a, %tmp\s
mov\ss (%_addrq), %r14\s
setf_a src=%\a, dst=%r14\s, ss=\ss
mov\ss %\a, %tmp\s
sub\ss %r14\s, %tmp\s
setf_oc
setf_zsp %tmp\s, \ss

Expand Down
10 changes: 5 additions & 5 deletions tests/e2e/qemu/expected.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4275,12 +4275,12 @@ scasl ESI=00000800 EDI=00000814 EAX=12345678 ECX=00000011 EFL=0044
scasb ESI=00000800 EDI=0000080f EAX=12345678 ECX=00000011 EFL=0044
scasw ESI=00000800 EDI=0000080e EAX=12345678 ECX=00000011 EFL=0044
scasl ESI=00000800 EDI=0000080c EAX=12345678 ECX=00000011 EFL=0044
repz scasb ESI=00000800 EDI=00000812 EAX=12345678 ECX=0000000f EFL=0095
repz scasw ESI=00000800 EDI=00000814 EAX=12345678 ECX=0000000f EFL=0091
repz scasb ESI=00000800 EDI=00000812 EAX=12345678 ECX=0000000f EFL=0004
repz scasw ESI=00000800 EDI=00000814 EAX=12345678 ECX=0000000f EFL=0004
repz scasl ESI=00000800 EDI=00000854 EAX=12345678 ECX=00000000 EFL=0044
repz scasb ESI=00000800 EDI=0000080e EAX=12345678 ECX=0000000f EFL=0095
repz scasw ESI=00000800 EDI=0000080c EAX=12345678 ECX=0000000f EFL=0091
repz scasl ESI=00000800 EDI=000007d8 EAX=12345678 ECX=00000003 EFL=0014
repz scasb ESI=00000800 EDI=0000080e EAX=12345678 ECX=0000000f EFL=0004
repz scasw ESI=00000800 EDI=0000080c EAX=12345678 ECX=0000000f EFL=0004
repz scasl ESI=00000800 EDI=000007d8 EAX=12345678 ECX=00000003 EFL=0085
repnz scasb ESI=00000800 EDI=00000811 EAX=12345678 ECX=00000010 EFL=0044
repnz scasw ESI=00000800 EDI=00000812 EAX=12345678 ECX=00000010 EFL=0044
repnz scasl ESI=00000800 EDI=00000814 EAX=12345678 ECX=00000010 EFL=0044
Expand Down

0 comments on commit f2976b7

Please sign in to comment.