diff options
| -rw-r--r-- | dynasm/dasm_arm.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/dynasm/dasm_arm.lua b/dynasm/dasm_arm.lua index 3aa8dead..d5078f7e 100644 --- a/dynasm/dasm_arm.lua +++ b/dynasm/dasm_arm.lua | |||
| @@ -929,13 +929,16 @@ map_op[".template__"] = function(params, template, nparams) | |||
| 929 | -- A single opcode needs a maximum of 3 positions. | 929 | -- A single opcode needs a maximum of 3 positions. |
| 930 | if secpos+3 > maxsecpos then wflush() end | 930 | if secpos+3 > maxsecpos then wflush() end |
| 931 | local pos = wpos() | 931 | local pos = wpos() |
| 932 | local apos, spos = #actargs, secpos | 932 | local lpos, apos, spos = #actlist, #actargs, secpos |
| 933 | 933 | ||
| 934 | local ok, err | 934 | local ok, err |
| 935 | for t in gmatch(template, "[^|]+") do | 935 | for t in gmatch(template, "[^|]+") do |
| 936 | ok, err = pcall(parse_template, params, t, nparams, pos) | 936 | ok, err = pcall(parse_template, params, t, nparams, pos) |
| 937 | if ok then return end | 937 | if ok then return end |
| 938 | secpos = spos | 938 | secpos = spos |
| 939 | actlist[lpos+1] = nil | ||
| 940 | actlist[lpos+2] = nil | ||
| 941 | actlist[lpos+3] = nil | ||
| 939 | actargs[apos+1] = nil | 942 | actargs[apos+1] = nil |
| 940 | actargs[apos+2] = nil | 943 | actargs[apos+2] = nil |
| 941 | actargs[apos+3] = nil | 944 | actargs[apos+3] = nil |
