From c15445a958a885d41c5957655e3530f1e3463e4a Mon Sep 17 00:00:00 2001 From: Torsten Ruger Date: Tue, 3 Nov 2015 16:20:25 +0200 Subject: [PATCH] let labels be constants --- lib/arm/translator.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/arm/translator.rb b/lib/arm/translator.rb index 2c7e6592..0455295d 100644 --- a/lib/arm/translator.rb +++ b/lib/arm/translator.rb @@ -49,10 +49,10 @@ module Arm def translate_LoadConstant code constant = code.constant - if constant.is_a?(Parfait::Object) or constant.is_a? Symbol + if constant.is_a?(Parfait::Object) or constant.is_a?(Symbol) or constant.is_a?(Register::Label) return ArmMachine.add( code.register , constant ) else - return ArmMachine.mov( code.register , code.constant ) + return ArmMachine.mov( code.register , constant ) end end