diff --git a/lips.lua b/lips.lua index f86ce4b..7560580 100644 --- a/lips.lua +++ b/lips.lua @@ -1029,6 +1029,8 @@ function Parser:instruction() self:optional_comma() local im = self:const() + -- for us, this is just semantics. for a "real" assembler, + -- LA could add appropriate RELO LUI/ADDIU directives. if im[1] == 'LABELSYM' then self:error('use LA for labels') end @@ -1059,13 +1061,6 @@ function Parser:instruction() self:optional_comma() local im = self:const() - -- for us, this is just semantics. for a "real" assembler, - -- LA could add appropriate RELO LUI/ADDIU directives. - -- for that reason, we should always use the respective instructions. - if im[1] ~= 'LABELSYM' then - self:error('use LI for immediates') - end - args.rs = args.rt args.immediate = {'UPPEROFF', im} self:format_out(lui[3], lui[1], args, lui[4], lui[5])