Skip to content

Commit 2ef02d6

Browse files
authored
fixes Thumb's SBC semantics (#1302)
We shall do 1-complement negation instead of 2-complement negation. Thanks @ccasin, @philzook58 for pointing out that the implementation was incorrect!
1 parent 872b4a5 commit 2ef02d6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plugins/arm/semantics/thumb.lisp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
(set$ rd (+ rn rm)))
5454

5555
(defun tSBC (rd _ rn rm _ _)
56-
(add-with-carry rd rn (- rm) CF))
56+
(add-with-carry rd rn (lnot rm) CF))
5757

5858
(defun tRSB (rd _ rn _ _)
5959
"rsbs r3, r2, #0"

0 commit comments

Comments
 (0)