1
0
Fork 0
mirror of https://github.com/notwa/lips synced 2024-11-14 18:29:03 -08:00

implicit RA argument for JR

This commit is contained in:
Connor Olding 2015-11-25 10:47:37 -08:00
parent 14f44f8206
commit 6e97d134e4
2 changed files with 9 additions and 1 deletions

View file

@ -34,7 +34,7 @@ Whether or not they output the proper machine code is another thing.
### Unimplemented Pseudo-Instructions
Besides implied arguments for existing instructions, there are:
Besides implicit arguments for existing instructions, there are:
* ABS, MUL, DIV, REM

View file

@ -946,6 +946,14 @@ function Parser:instruction()
args.immediate = {'LOWER', im}
self:format_out(addi[3], addi[1], args, addi[4], addi[5])
end
elseif name == 'JR' then
local args = {}
if self:is_EOL() then
args.rs = 'RA'
else
args.rs = self:register()
end
self:format_out(h[3], h[1], args, h[4], h[5])
elseif h[2] == 'tob' then -- or h[2] == 'Tob' then
local lui = instructions['LUI']
local args = {}