add more functionality to get while to work (not there yet)

This commit is contained in:
Torsten Ruger
2014-05-14 11:33:23 +03:00
parent 2230a4f25e
commit d50c38f5ad
6 changed files with 46 additions and 23 deletions

View File

@ -20,6 +20,11 @@ module Arm
left
end
def integer_minus block , left , right
block.add_code sub(:left => left , :right => right )
left
end
def integer_load block , left , right
reg = "r#{left.register}".to_sym
block.add_code mov( :left => reg , :right => right )
@ -35,7 +40,7 @@ module Arm
def function_call into , call
raise "Not CallSite #{call.inspect}" unless call.is_a? Vm::CallSite
raise "Not linked #{call.inspect}" unless call.function
into.add_code bl( :left => call.function )
into.add_code call( :left => call.function )
call.function.return_type
end