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:
Torsten Ruger
2018-05-30 12:54:40 +03:00
parent 01a2911483
commit 53107d3ef8
28 changed files with 202 additions and 176 deletions

View File

@ -27,6 +27,7 @@ module Mom
caller_index = Risc.resolve_to_index(:message , :caller)
return_index = Risc.resolve_to_index(:message , :return_address)
moves << Risc::SlotToReg.new(self, Risc.message_reg, return_index , return_address)
moves << Risc::SlotToReg.new( self , return_address , Parfait::Integer.integer_index , return_address)
moves << Risc::SlotToReg.new(self, Risc.message_reg , caller_index , Risc.message_reg)
moves << Risc::FunctionReturn.new(self, return_address)
end

View File

@ -226,7 +226,7 @@ module Risc
def execute_FunctionReturn
link = get_register( @instruction.register )
log.debug "Return to #{link}"
set_pc link.value
set_pc link
false
end