rename risc_value to register_value

almost to register, but it still carries that value
This commit is contained in:
Torsten Ruger
2018-06-29 11:39:07 +03:00
parent 606c7bf906
commit d50893bb0f
21 changed files with 67 additions and 67 deletions

View File

@ -18,19 +18,19 @@ module Arm
rn , operand , immediate= @rn , @operand , 1
arg = @right
operand = Risc::RiscValue.new( arg , :Integer) if( arg.is_a? Symbol )
operand = Risc::RegisterValue.new( arg , :Integer) if( arg.is_a? Symbol )
case operand
when Numeric
operand = arg
raise "numeric literal operand to large #{arg.inspect}" unless (arg.fits_u8?)
when Symbol , ::Risc::RiscValue
when Symbol , ::Risc::RegisterValue
immediate = 0
when Arm::Shift
handle_shift
else
raise "invalid operand argument #{arg.inspect} , #{inspect}"
end
val = (operand.is_a?(Symbol) or operand.is_a?(::Risc::RiscValue)) ? reg_code(operand) : operand
val = (operand.is_a?(Symbol) or operand.is_a?(::Risc::RegisterValue)) ? reg_code(operand) : operand
val = 0 if val == nil
val = shift(val , 0)
raise inspect unless reg_code(@rd)