2014-05-10 14:34:05 +02:00
|
|
|
require_relative "logic_helper"
|
|
|
|
|
|
|
|
module Arm
|
|
|
|
|
|
|
|
class MoveInstruction < Vm::MoveInstruction
|
|
|
|
include Arm::Constants
|
|
|
|
include LogicHelper
|
|
|
|
|
|
|
|
def initialize(attributes)
|
|
|
|
super(attributes)
|
2014-05-10 14:59:46 +02:00
|
|
|
@attributes[:update_status_flag] = 0
|
|
|
|
@attributes[:condition_code] = :al
|
|
|
|
@attributes[:opcode] = attributes[:opcode]
|
2014-05-10 14:34:05 +02:00
|
|
|
@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
|