2014-05-10 14:34:05 +02:00
|
|
|
require_relative "instruction"
|
|
|
|
require_relative "logic_helper"
|
|
|
|
|
|
|
|
module Arm
|
|
|
|
|
|
|
|
class MoveInstruction < Vm::MoveInstruction
|
|
|
|
include Arm::Constants
|
|
|
|
include LogicHelper
|
|
|
|
|
|
|
|
def initialize(attributes)
|
|
|
|
super(attributes)
|
|
|
|
@update_status_flag = 0
|
|
|
|
@condition_code = :al
|
|
|
|
@opcode = attributes[:opcode]
|
|
|
|
@operand = 0
|
|
|
|
|
|
|
|
@i = 0
|
2014-05-10 14:47:27 +02:00
|
|
|
@rd = @attributes[:left]
|
2014-05-10 14:34:05 +02:00
|
|
|
@rn = :r0 # register zero = zero bit pattern
|
|
|
|
end
|
|
|
|
|
|
|
|
def build
|
2014-05-10 14:47:27 +02:00
|
|
|
do_build @attributes[:right]
|
2014-05-10 14:34:05 +02:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|