test and last fixes for previous commits (allocalte ints)

mostly just fixing the additional instructions
close #20
This commit is contained in:
Torsten Ruger
2018-11-24 22:40:22 +02:00
parent e6615d0a6a
commit 4d30727811
19 changed files with 308 additions and 233 deletions

View File

@ -145,6 +145,7 @@ module Risc
# We sidestep all that by pre-allocating.
def prepare_int_return
integer_tmp = allocate_int
reset_names
build do
message[:return_value] << integer_tmp
end

View File

@ -127,14 +127,17 @@ module Risc
end
# restore the message that we save in r8
# get a new int and save the c return into it
# the int gets retured, ie is the return_value of the message
# before th restore, the syscall return, a fixnum, is saved
# The caller of this method is assumed to caal prepare_int_return
# so that the return value already has an integer instance
# This instance is filled with os return value
def restore_message(builder)
r8 = RegisterValue.new( :r8 , :Message)
builder.build do
integer_reg! << message
message << r8
integer_tmp[Parfait::Integer.integer_index] << integer_reg
integer_2! << message[:return_value]
integer_2[Parfait::Integer.integer_index] << integer_reg
end
end