mirror of
https://github.com/notwa/mm
synced 2024-11-05 05:59:04 -08:00
add reg# register aliases
This commit is contained in:
parent
cdeb4b0489
commit
9ec4d0f406
1 changed files with 6 additions and 2 deletions
|
@ -30,7 +30,6 @@ local Class = function(inherit)
|
||||||
return setmetatable(class, mt_class)
|
return setmetatable(class, mt_class)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- TODO: maybe support reg# style too
|
|
||||||
local registers = {
|
local registers = {
|
||||||
[0]=
|
[0]=
|
||||||
'R0', 'AT', 'V0', 'V1', 'A0', 'A1', 'A2', 'A3',
|
'R0', 'AT', 'V0', 'V1', 'A0', 'A1', 'A2', 'A3',
|
||||||
|
@ -77,10 +76,15 @@ revtable(fpu_registers)
|
||||||
revtable(all_registers)
|
revtable(all_registers)
|
||||||
revtable(all_directives)
|
revtable(all_directives)
|
||||||
|
|
||||||
|
|
||||||
registers['ZERO'] = 0
|
registers['ZERO'] = 0
|
||||||
all_registers['ZERO'] = 0
|
all_registers['ZERO'] = 0
|
||||||
|
|
||||||
|
for i=0, 31 do
|
||||||
|
local r = 'REG'..tostring(i)
|
||||||
|
registers[r] = i
|
||||||
|
all_registers[r] = i
|
||||||
|
end
|
||||||
|
|
||||||
local fmt_single = 16
|
local fmt_single = 16
|
||||||
local fmt_double = 17
|
local fmt_double = 17
|
||||||
local fmt_word = 20
|
local fmt_word = 20
|
||||||
|
|
Loading…
Reference in a new issue