reducing the label's int for return
placing the raw address in the register to jump to puts the extra instruction at the risc level (not arm), thus changing a lot of (brittle?) tests
This commit is contained in:
@ -20,13 +20,18 @@ module Risc
|
||||
SlotToReg, SlotToReg, SlotToReg, SlotToReg, OperatorInstruction,
|
||||
LoadConstant, SlotToReg, SlotToReg, RegToSlot, RegToSlot,
|
||||
RegToSlot, SlotToReg, Branch, SlotToReg, RegToSlot,
|
||||
SlotToReg, SlotToReg, FunctionReturn, SlotToReg, SlotToReg,
|
||||
RegToSlot, SlotToReg, SlotToReg, RegToSlot, SlotToReg,
|
||||
SlotToReg, RegToSlot, SlotToReg, SlotToReg, FunctionReturn,
|
||||
Transfer, Syscall, NilClass]
|
||||
SlotToReg, SlotToReg, SlotToReg, FunctionReturn, SlotToReg,
|
||||
SlotToReg, RegToSlot, SlotToReg, SlotToReg, RegToSlot,
|
||||
SlotToReg, SlotToReg, RegToSlot, SlotToReg, SlotToReg,
|
||||
SlotToReg, Branch, FunctionReturn, Transfer, Syscall,
|
||||
NilClass]
|
||||
assert_equal Parfait::Integer , get_return.class
|
||||
assert_equal 0 , get_return.value
|
||||
end
|
||||
def test_zero
|
||||
ticks( 12 )
|
||||
assert @interpreter.flags[:zero]
|
||||
end
|
||||
def test_op
|
||||
op = main_ticks(35)
|
||||
assert_equal OperatorInstruction , op.class
|
||||
@ -39,9 +44,5 @@ module Risc
|
||||
main_ticks( 37 )
|
||||
assert @interpreter.flags[:overflow]
|
||||
end
|
||||
def test_zero
|
||||
ticks( 12 )
|
||||
assert @interpreter.flags[:zero]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user