mirror of
https://github.com/notwa/lips
synced 2024-11-14 15:09:02 -08:00
implicit RA argument for JR
This commit is contained in:
parent
14f44f8206
commit
6e97d134e4
2 changed files with 9 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
8
lips.lua
8
lips.lua
|
@ -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 = {}
|
||||
|
|
Loading…
Reference in a new issue