loading label must translate the labels too

(psst: like arm translator already did. duh)
This commit is contained in:
Torsten Ruger
2018-05-24 19:20:06 +03:00
parent dae8e88b7a
commit 183d4152d5
7 changed files with 37 additions and 31 deletions

View File

@ -34,10 +34,14 @@ module Risc
case code
when Branch
ret = code.class.new(code.source , code.label.to_cpu(self))
when LoadConstant
const = code.constant
const = const.to_cpu(self) if const.is_a?(Label)
ret = LoadConstant.new(code.source , const , code.register)
else
ret = code.dup
ret.nil_next
end
ret.nil_next
ret
end
end