diff --git a/dynasm/dasm_s390x.lua b/dynasm/dasm_s390x.lua index b3cda6ff..0c1263c5 100644 --- a/dynasm/dasm_s390x.lua +++ b/dynasm/dasm_s390x.lua @@ -329,11 +329,6 @@ local function split_memop(arg) if b then return 0, parse_reg(x), parse_reg(b) end - -- Assuming that only displacement is passed, as either digit or label "45 or label1" - -- local d = match(arg,"[%w_]+") - -- if d then - -- return d, 0, 0 - -- end local reg, tailr = match(arg, "^([%w_:]+)%s*(.*)$") if reg then local r, tp = parse_reg(reg) @@ -341,6 +336,11 @@ local function split_memop(arg) return format(tp.ctypefmt, tailr), 0, r end end + -- Assuming that only displacement is passed, as either digit or label "45 or label1" + local d = match(arg,"[%w_]+") + if d then + return d, 0, 0 + end -- TODO: handle values without registers? -- TODO: handle registers without a displacement? -- done, above ,needs to be tested werror("bad memory operand: "..arg)