You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#? should leave immr/imms open (LSL Rd, Rn, #? can't pin either field). Like MOV, encode them the way assemblers do and check against clang in tests/test_arm.cpp.
Addressed in #12 (parse_bitfield<kind>, parse_shift):
LSL/LSR/ASR #imm (UBFM/SBFM) and ROR #imm (EXTR Rd, Rn, Rn); the register forms LSL/LSR/ASR/ROR Rd, Rn, Rm and LSLV etc.
UBFX/SBFX/BFXIL/UBFIZ/SBFIZ/BFI, raw UBFM/SBFM/BFM/EXTR, and SXTB/SXTH/SXTW/UXTB/UXTH.
Wildcards: LSR/ASR #? keep imms pinned (exact); LSL #? has to open immr and imms, so it also matches other UBFM forms (documented). A field computed from a ? is left open (UBFX #?, #8 leaves imms open). With a bare ? register, the 32- and 64-bit encodings are both computed and only the bits they share stay pinned; if only one size fits (LSL ?, ?, #40), that one is used.
Out-of-range immediates, SXTW W0, W1 and UXTB X0, W1 give mask 0. All encodings were checked against clang.
Activity
scizzydo commentedon Oct 12, 2026
Addressed in #12 (
parse_bitfield<kind>,parse_shift):LSL/LSR/ASR #imm(UBFM/SBFM) andROR #imm(EXTR Rd, Rn, Rn); the register formsLSL/LSR/ASR/ROR Rd, Rn, RmandLSLVetc.UBFX/SBFX/BFXIL/UBFIZ/SBFIZ/BFI, rawUBFM/SBFM/BFM/EXTR, andSXTB/SXTH/SXTW/UXTB/UXTH.LSR/ASR #?keep imms pinned (exact);LSL #?has to open immr and imms, so it also matches other UBFM forms (documented). A field computed from a?is left open (UBFX #?, #8leaves imms open). With a bare?register, the 32- and 64-bit encodings are both computed and only the bits they share stay pinned; if only one size fits (LSL ?, ?, #40), that one is used.SXTW W0, W1andUXTB X0, W1give mask 0. All encodings were checked against clang.🤖 Generated with Claude Code