From 77e5e4a62cf6e2c741708bea3ca9b95231974370 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Thu, 2 Jun 2022 13:40:50 +0300 Subject: [PATCH] DynAsm/ARM64: Temporary fix for "LSL Rx(dst), Rd(src), #imm" encoding --- dynasm/dasm_arm64.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dynasm/dasm_arm64.lua b/dynasm/dasm_arm64.lua index cb82dc4..05954c3 100644 --- a/dynasm/dasm_arm64.lua +++ b/dynasm/dasm_arm64.lua @@ -248,7 +248,7 @@ local map_cond = { local parse_reg_type -local function parse_reg(expr, shift) +local function parse_reg(expr, shift, skip_vreg) if not expr then werror("expected register name") end local tname, ovreg = match(expr, "^([%w_]+):(@?%l%d+)$") if not tname then @@ -281,7 +281,7 @@ local function parse_reg(expr, shift) elseif parse_reg_type ~= vrt then werror("register size mismatch") end - if shift then waction("VREG", shift, vreg) end + if not skip_vreg then waction("VREG", shift, vreg) end return 0 end werror("bad register name `"..expr.."'") @@ -649,7 +649,7 @@ local function alias_bfiz(p) end local alias_lslimm = op_alias("ubfm_4", function(p) - parse_reg(p[1], 0) + parse_reg(p[1], 0, true) local sh = p[3]:sub(2) if parse_reg_type == "w" then p[3] = "#(32-("..sh.."))%32"