aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dynasm/dasm_arm64.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/dynasm/dasm_arm64.lua b/dynasm/dasm_arm64.lua
index 69c31db5..1f581ba0 100644
--- a/dynasm/dasm_arm64.lua
+++ b/dynasm/dasm_arm64.lua
@@ -248,7 +248,7 @@ local map_cond = {
248 248
249local parse_reg_type 249local parse_reg_type
250 250
251local function parse_reg(expr, shift) 251local function parse_reg(expr, shift, no_vreg)
252 if not expr then werror("expected register name") end 252 if not expr then werror("expected register name") end
253 local tname, ovreg = match(expr, "^([%w_]+):(@?%l%d+)$") 253 local tname, ovreg = match(expr, "^([%w_]+):(@?%l%d+)$")
254 if not tname then 254 if not tname then
@@ -281,7 +281,7 @@ local function parse_reg(expr, shift)
281 elseif parse_reg_type ~= vrt then 281 elseif parse_reg_type ~= vrt then
282 werror("register size mismatch") 282 werror("register size mismatch")
283 end 283 end
284 if shift then waction("VREG", shift, vreg) end 284 if not no_vreg then waction("VREG", shift, vreg) end
285 return 0 285 return 0
286 end 286 end
287 werror("bad register name `"..expr.."'") 287 werror("bad register name `"..expr.."'")
@@ -638,7 +638,7 @@ local function alias_bfx(p)
638end 638end
639 639
640local function alias_bfiz(p) 640local function alias_bfiz(p)
641 parse_reg(p[1], 0) 641 parse_reg(p[1], 0, true)
642 if parse_reg_type == "w" then 642 if parse_reg_type == "w" then
643 p[3] = "#(32-("..p[3]:sub(2).."))%32" 643 p[3] = "#(32-("..p[3]:sub(2).."))%32"
644 p[4] = "#("..p[4]:sub(2)..")-1" 644 p[4] = "#("..p[4]:sub(2)..")-1"
@@ -649,7 +649,7 @@ local function alias_bfiz(p)
649end 649end
650 650
651local alias_lslimm = op_alias("ubfm_4", function(p) 651local alias_lslimm = op_alias("ubfm_4", function(p)
652 parse_reg(p[1], 0) 652 parse_reg(p[1], 0, true)
653 local sh = p[3]:sub(2) 653 local sh = p[3]:sub(2)
654 if parse_reg_type == "w" then 654 if parse_reg_type == "w" then
655 p[3] = "#(32-("..sh.."))%32" 655 p[3] = "#(32-("..sh.."))%32"