fix register issues, some typos

This commit is contained in:
Torsten Ruger
2014-05-14 22:04:03 +03:00
parent e10f4863ee
commit 3912e0cd31
8 changed files with 26 additions and 25 deletions

View File

@ -15,14 +15,14 @@ module Arm
Vm::Bool.new
end
def integer_plus block , left , right
block.add_code add(:left => left , :right => left , :extra => :right )
left
def integer_plus block , result , left , right
block.add_code add(:left => result , :right => left , :extra => right )
result
end
def integer_minus block , left , right
block.add_code sub(:left => left , :right => left , :extra => :right )
left
def integer_minus block , result , left , right
block.add_code sub(:left => result , :right => left , :extra => right )
result
end
def integer_load block , left , right
@ -54,6 +54,7 @@ module Arm
end
def main_exit exit
syscall(exit , 1)
exit
end
def function_entry block, f_name
# entry.add_code push( :regs => [:lr] )

View File

@ -39,6 +39,7 @@ module Arm
elsif (op_with_rot = calculate_u8_with_rr(arg))
@operand = op_with_rot
@i = 1
raise "hmm"
else
raise "cannot fit numeric literal argument in operand #{arg.inspect}"
end