save and restore the right registers

This commit is contained in:
Torsten Ruger
2014-05-22 21:55:17 +03:00
parent 4f0b769e82
commit 86e73bf1ba
5 changed files with 22 additions and 17 deletions

View File

@@ -59,7 +59,12 @@ module Arm
if name.is_a? Vm::Word
name = "r#{name.register}"
end
REGISTERS[name.to_s]
if name.is_a? Fixnum
name = "r#{name}"
end
r = REGISTERS[name.to_s]
raise "no reg #{name}" if r == nil
r
end
def calculate_u8_with_rr(arg)