2014-05-10 14:34:05 +02:00
|
|
|
require_relative "logic_helper"
|
|
|
|
|
|
|
|
module Arm
|
|
|
|
class CompareInstruction < Vm::CompareInstruction
|
|
|
|
include Arm::Constants
|
|
|
|
include LogicHelper
|
|
|
|
|
|
|
|
def initialize(attributes)
|
|
|
|
super(attributes)
|
2014-05-10 14:59:46 +02:00
|
|
|
@attributes[:condition_code] = :al
|
2014-05-10 14:34:05 +02:00
|
|
|
@operand = 0
|
|
|
|
@i = 0
|
2014-05-10 14:59:46 +02:00
|
|
|
@attributes[:update_status_flag] = 1
|
2014-05-10 14:47:27 +02:00
|
|
|
@rn = attributes[:left]
|
2014-05-10 14:34:05 +02:00
|
|
|
@rd = :r0
|
|
|
|
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
|