increase binary_code size to 32
save a few jump, adds some size to binary 16 just seemed kind of small
This commit is contained in:
@ -12,24 +12,24 @@ module Risc
|
||||
|
||||
def test_chain
|
||||
# show_main_ticks # get output of what is
|
||||
check_main_chain [LoadConstant, LoadConstant, SlotToReg, SlotToReg, RegToSlot,
|
||||
check_main_chain [LoadConstant, LoadConstant, SlotToReg, SlotToReg, RegToSlot,
|
||||
RegToSlot, RegToSlot, RegToSlot, LoadConstant, SlotToReg, # 10
|
||||
RegToSlot, LoadConstant, SlotToReg, Branch, SlotToReg,
|
||||
RegToSlot, LoadConstant, SlotToReg, RegToSlot, SlotToReg, # 20
|
||||
FunctionCall, LoadConstant, SlotToReg, LoadConstant, OperatorInstruction,
|
||||
IsNotZero, SlotToReg, RegToSlot, SlotToReg, Branch, # 30
|
||||
SlotToReg, SlotToReg, SlotToReg, SlotToReg, OperatorInstruction,
|
||||
RegToSlot, RegToSlot, SlotToReg, SlotToReg, RegToSlot, # 40
|
||||
LoadConstant, SlotToReg, RegToSlot, Branch, RegToSlot,
|
||||
SlotToReg, SlotToReg, SlotToReg, FunctionReturn, SlotToReg, # 50
|
||||
RegToSlot, Branch, SlotToReg, SlotToReg, RegToSlot,
|
||||
Branch, LoadConstant, SlotToReg, RegToSlot, RegToSlot, # 60
|
||||
SlotToReg, SlotToReg, SlotToReg, FunctionReturn, Transfer,
|
||||
SlotToReg, SlotToReg, Syscall, NilClass, ]
|
||||
RegToSlot, LoadConstant, SlotToReg, SlotToReg, RegToSlot,
|
||||
LoadConstant, SlotToReg, RegToSlot, SlotToReg, FunctionCall, # 20
|
||||
LoadConstant, SlotToReg, LoadConstant, OperatorInstruction, IsNotZero,
|
||||
SlotToReg, RegToSlot, SlotToReg, SlotToReg, SlotToReg, # 30
|
||||
SlotToReg, Branch, SlotToReg, OperatorInstruction, RegToSlot,
|
||||
RegToSlot, SlotToReg, SlotToReg, RegToSlot, LoadConstant, # 40
|
||||
SlotToReg, RegToSlot, RegToSlot, SlotToReg, SlotToReg,
|
||||
SlotToReg, FunctionReturn, SlotToReg, RegToSlot, Branch, # 50
|
||||
SlotToReg, SlotToReg, RegToSlot, LoadConstant, SlotToReg,
|
||||
RegToSlot, Branch, RegToSlot, SlotToReg, SlotToReg, # 60
|
||||
SlotToReg, FunctionReturn, Transfer, SlotToReg, SlotToReg,
|
||||
Syscall, NilClass, ]
|
||||
assert_equal 10 , get_return
|
||||
end
|
||||
def base_ticks(num)
|
||||
main_ticks(22 + num)
|
||||
main_ticks(21 + num)
|
||||
end
|
||||
def test_load_factory
|
||||
lod = base_ticks( 0 )
|
||||
@ -67,7 +67,7 @@ module Risc
|
||||
assert_reg_to_slot( int , :r4 , :r2 , 2)
|
||||
end
|
||||
def test_branch_to_next_block
|
||||
br = base_ticks( 8 )
|
||||
br = base_ticks( 11 )
|
||||
assert_equal Branch , br.class
|
||||
assert_equal Parfait::BinaryCode , br.label.class
|
||||
end
|
||||
|
Reference in New Issue
Block a user