mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-08 15:34:09 +00:00
Updated the memory parsing
The order matters here, so just moved displacement check to end
This commit is contained in:
parent
dcb1dd74ed
commit
206c650689
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user