fix address nil values
This commit is contained in:
parent
dc12c1d70b
commit
b2339dc330
@ -138,7 +138,8 @@ module Risc
|
|||||||
def write_return_address( addr )
|
def write_return_address( addr )
|
||||||
write_ref_for( addr.get_type )
|
write_ref_for( addr.get_type )
|
||||||
write_ref_for( addr.next_integer )
|
write_ref_for( addr.next_integer )
|
||||||
write_ref_for( addr.value + @linker.platform.loaded_at )
|
val = addr.value ? addr.value + @linker.platform.loaded_at : Parfait.object_space.nil_object
|
||||||
|
write_ref_for( val )
|
||||||
write_ref_for( 0 )
|
write_ref_for( 0 )
|
||||||
log.debug "Integer witten stream 0x#{@stream.length.to_s(16)}"
|
log.debug "Integer witten stream 0x#{@stream.length.to_s(16)}"
|
||||||
end
|
end
|
||||||
|
@ -45,7 +45,7 @@ module Risc
|
|||||||
ret = main_ticks(64)
|
ret = main_ticks(64)
|
||||||
assert_equal FunctionReturn , ret.class
|
assert_equal FunctionReturn , ret.class
|
||||||
assert_equal :r1 , ret.register.symbol
|
assert_equal :r1 , ret.register.symbol
|
||||||
assert_equal 41992 , @interpreter.get_register(ret.register)
|
assert_equal 50632 , @interpreter.get_register(ret.register)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user