@@ -640,10 +640,10 @@ end
640
640
local function alias_bfiz (p )
641
641
parse_reg (p [1 ], 0 )
642
642
if parse_reg_type == " w" then
643
- p [3 ] = " #-(" .. p [3 ]:sub (2 ).. " )%32"
643
+ p [3 ] = " #(32 -(" .. p [3 ]:sub (2 ).. " ) )%32"
644
644
p [4 ] = " #(" .. p [4 ]:sub (2 ).. " )-1"
645
645
else
646
- p [3 ] = " #-(" .. p [3 ]:sub (2 ).. " )%64"
646
+ p [3 ] = " #(64 -(" .. p [3 ]:sub (2 ).. " ) )%64"
647
647
p [4 ] = " #(" .. p [4 ]:sub (2 ).. " )-1"
648
648
end
649
649
end
@@ -652,10 +652,10 @@ local alias_lslimm = op_alias("ubfm_4", function(p)
652
652
parse_reg (p [1 ], 0 )
653
653
local sh = p [3 ]:sub (2 )
654
654
if parse_reg_type == " w" then
655
- p [3 ] = " #-(" .. sh .. " )%32"
655
+ p [3 ] = " #(32 -(" .. sh .. " ) )%32"
656
656
p [4 ] = " #31-(" .. sh .. " )"
657
657
else
658
- p [3 ] = " #-(" .. sh .. " )%64"
658
+ p [3 ] = " #(64 -(" .. sh .. " ) )%64"
659
659
p [4 ] = " #63-(" .. sh .. " )"
660
660
end
661
661
end )
@@ -1001,8 +1001,8 @@ function op_template(params, template, nparams)
1001
1001
if not params then return template :gsub (" %x%x%x%x%x%x%x%x" , " " ) end
1002
1002
1003
1003
-- Limit number of section buffer positions used by a single dasm_put().
1004
- -- A single opcode needs a maximum of 3 positions.
1005
- if secpos + 3 > maxsecpos then wflush () end
1004
+ -- A single opcode needs a maximum of 4 positions.
1005
+ if secpos + 4 > maxsecpos then wflush () end
1006
1006
local pos = wpos ()
1007
1007
local lpos , apos , spos = # actlist , # actargs , secpos
1008
1008
@@ -1014,9 +1014,11 @@ function op_template(params, template, nparams)
1014
1014
actlist [lpos + 1 ] = nil
1015
1015
actlist [lpos + 2 ] = nil
1016
1016
actlist [lpos + 3 ] = nil
1017
+ actlist [lpos + 4 ] = nil
1017
1018
actargs [apos + 1 ] = nil
1018
1019
actargs [apos + 2 ] = nil
1019
1020
actargs [apos + 3 ] = nil
1021
+ actargs [apos + 4 ] = nil
1020
1022
end
1021
1023
error (err , 0 )
1022
1024
end
0 commit comments