add an operator function
to be able to use the builder more also add ability to load fixnums (for the int functions)
This commit is contained in:
@ -46,6 +46,12 @@ module Risc
|
||||
assert_equal FunctionReturn , ret.class
|
||||
assert_equal @r0 , ret.register
|
||||
end
|
||||
def test_operator
|
||||
ret = @r0.op :<< , @r1
|
||||
assert_equal OperatorInstruction , ret.class
|
||||
assert_equal @r0 , ret.left
|
||||
assert_equal @r1 , ret.right
|
||||
end
|
||||
def test_slot_to_reg
|
||||
instr = @r0 << @r1[:next_message]
|
||||
assert_equal SlotToReg , instr.class
|
||||
|
Reference in New Issue
Block a user