Skip to content

Commit

Permalink
Merge pull request #2 from UQ-PAC/stur-instructions
Browse files Browse the repository at this point in the history
Stur instructions
  • Loading branch information
Thomas-Malcolm authored Feb 8, 2022
2 parents 5d42b6d + 3286a9d commit 6bb8453
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions plugins/arm/semantics/aarch64.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,17 @@
(defun STRXroX (rt rn rm _ shift)
(store-word (+ rn (lshift rm (* shift 3))) rt))

(defmacro STUR*i (src base off size)
"Takes `size` bits from src and stores at base + off"
(store-word (+ base off) (cast-low size src)))

(defun STURXi (src base off) (STUR*i src base off 64))

(defun STURWi (src base off) (STUR*i src base off 32))

(defun STURHHi (src base off) (STUR*i src base off 16))

(defun STURBBi (src base off) (STUR*i src base off 8))

;;; LOGICAL/BITFIELD OPERATIONS

Expand Down
2 changes: 1 addition & 1 deletion plugins/arm/semantics/arm-bits.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
0b0000 ZF
0b0001 (lnot ZF)
0b0010 CF
0b0010 (lnot CF)
0b0011 (lnot CF)
0b0100 NF
0b0101 (lnot NF)
0b0110 VF
Expand Down

0 comments on commit 6bb8453

Please sign in to comment.