Skip to content

Commit

Permalink
DynASM/ARM64: Support ldp/stp of q registers.
Browse files Browse the repository at this point in the history
Thanks to Peter Cawley. LuaJIT#1096
  • Loading branch information
Mike Pall committed Oct 8, 2023
1 parent d2a5487 commit 656ecbc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions dynasm/dasm_arm64.lua
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ end
local function parse_load_pair(params, nparams, n, op)
if params[n+2] then werror("too many operands") end
local pn, p2 = params[n], params[n+1]
local scale = shr(op, 30) == 0 and 2 or 3
local scale = 2 + shr(op, 31 - band(shr(op, 26), 1))
local p1, wb = match(pn, "^%[%s*(.-)%s*%](!?)$")
if not p1 then
if not p2 then
Expand Down Expand Up @@ -806,8 +806,8 @@ map_op = {
["ldrsw_*"] = "98000000DxB|b8800000DxL",
-- NOTE: ldur etc. are handled by ldr et al.

["stp_*"] = "28000000DAwP|a8000000DAxP|2c000000DAsP|6c000000DAdP",
["ldp_*"] = "28400000DAwP|a8400000DAxP|2c400000DAsP|6c400000DAdP",
["stp_*"] = "28000000DAwP|a8000000DAxP|2c000000DAsP|6c000000DAdP|ac000000DAqP",
["ldp_*"] = "28400000DAwP|a8400000DAxP|2c400000DAsP|6c400000DAdP|ac400000DAqP",
["ldpsw_*"] = "68400000DAxP",

-- Branches.
Expand Down Expand Up @@ -942,7 +942,7 @@ local function parse_template(params, template, nparams, pos)
werror("bad register type")
end
parse_reg_type = false
elseif p == "x" or p == "w" or p == "d" or p == "s" then
elseif p == "x" or p == "w" or p == "d" or p == "s" or p == "q" then
if parse_reg_type ~= p then
werror("register size mismatch")
end
Expand Down

0 comments on commit 656ecbc

Please sign in to comment.