2014-05-10 14:34:05 +02:00
|
|
|
require_relative "logic_helper"
|
|
|
|
|
|
|
|
module Arm
|
|
|
|
class CompareInstruction < Vm::CompareInstruction
|
|
|
|
include Arm::Constants
|
|
|
|
include LogicHelper
|
|
|
|
|
2014-05-16 09:42:25 +02:00
|
|
|
def initialize(first , attributes)
|
|
|
|
super(first , attributes)
|
2014-05-14 09:47:30 +02:00
|
|
|
@attributes[:condition_code] = :al if @attributes[:condition_code] == nil
|
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-16 09:42:25 +02:00
|
|
|
@rn = first
|
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
|