add function_return helper to risc_value

create a function_return from within builder
This commit is contained in:
Torsten Ruger
2018-08-06 13:03:33 +03:00
parent c9d8f750e5
commit 595e032edf
3 changed files with 14 additions and 1 deletions

View File

@ -41,6 +41,11 @@ module Risc
assert_equal :next_message , message.index
assert_equal @r0 , message.register
end
def test_return
ret = @r0.function_return
assert_equal FunctionReturn , ret.class
assert_equal @r0 , ret.register
end
def test_slot_to_reg
instr = @r0 << @r1[:next_message]
assert_equal SlotToReg , instr.class