Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stur instructions #2

Merged
merged 2 commits into from
Feb 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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