renaming update_status_flag to just update_status
This commit is contained in:
@ -22,7 +22,7 @@ module Arm
|
||||
|
||||
def initialize(first, attributes)
|
||||
super(first , attributes)
|
||||
@attributes[:update_status_flag] = 0
|
||||
@attributes[:update_status] = 0
|
||||
@attributes[:condition_code] = :al if @attributes[:condition_code] == nil
|
||||
end
|
||||
|
||||
|
@ -10,7 +10,7 @@ module Arm
|
||||
@attributes[:condition_code] = :al if @attributes[:condition_code] == nil
|
||||
@operand = 0
|
||||
@i = 0
|
||||
@attributes[:update_status_flag] = 1
|
||||
@attributes[:update_status] = 1
|
||||
@rn = first
|
||||
@rd = :r0
|
||||
end
|
||||
|
@ -9,7 +9,7 @@ module Arm
|
||||
# Only when an instruction affects the status is a subsequent compare instruction effective
|
||||
# But to make the conditional execution (see cond) work for more than one instruction, one needs to
|
||||
# be able to execute without changing the status
|
||||
#attr_reader :update_status_flag
|
||||
#attr_reader :update_status
|
||||
|
||||
module LogicHelper
|
||||
# ADDRESSING MODE 1
|
||||
@ -83,7 +83,7 @@ module Arm
|
||||
raise inspect unless reg_code(@rd)
|
||||
val |= shift(reg_code(@rd) , 12)
|
||||
val |= shift(reg_code(@rn) , 12+4)
|
||||
val |= shift(@attributes[:update_status_flag] , 12+4+4)#20
|
||||
val |= shift(@attributes[:update_status] , 12+4+4)#20
|
||||
val |= shift(op_bit_code , 12+4+4 +1)
|
||||
val |= shift(@i , 12+4+4 +1+4)
|
||||
val |= shift(instuction_class , 12+4+4 +1+4+1)
|
||||
|
@ -7,7 +7,7 @@ module Arm
|
||||
|
||||
def initialize(first , attributes)
|
||||
super(first , attributes)
|
||||
@attributes[:update_status_flag] = 0 if @attributes[:update_status_flag] == nil
|
||||
@attributes[:update_status] = 0 if @attributes[:update_status] == nil
|
||||
@attributes[:condition_code] = :al if @attributes[:condition_code] == nil
|
||||
@operand = 0
|
||||
|
||||
@ -61,7 +61,7 @@ module Arm
|
||||
val = shift(@operand , 0)
|
||||
val |= shift(reg_code(@first) , 12)
|
||||
val |= shift(reg_code(@left) , 12+4)
|
||||
val |= shift(@attributes[:update_status_flag] , 12+4+4)#20
|
||||
val |= shift(@attributes[:update_status] , 12+4+4)#20
|
||||
val |= shift(op_bit_code , 12+4+4 +1)
|
||||
val |= shift(@immediate , 12+4+4 +1+4)
|
||||
val |= shift(instuction_class , 12+4+4 +1+4+1)
|
||||
|
@ -8,7 +8,7 @@ module Arm
|
||||
|
||||
def initialize(first , attributes)
|
||||
super(first , attributes)
|
||||
@attributes[:update_status_flag] = 0 if @attributes[:update_status_flag] == nil
|
||||
@attributes[:update_status] = 0 if @attributes[:update_status] == nil
|
||||
@attributes[:condition_code] = :al if @attributes[:condition_code] == nil
|
||||
@operand = 0
|
||||
|
||||
|
@ -7,7 +7,7 @@ module Arm
|
||||
|
||||
def initialize(first , attributes)
|
||||
super(first , attributes)
|
||||
@attributes[:update_status_flag] = 0 if @attributes[:update_status_flag] == nil
|
||||
@attributes[:update_status] = 0 if @attributes[:update_status] == nil
|
||||
@attributes[:condition_code] = :al if @attributes[:condition_code] == nil
|
||||
@attributes[:opcode] = attributes[:opcode]
|
||||
@operand = 0
|
||||
@ -59,7 +59,7 @@ module Arm
|
||||
val = shift(@operand , 0)
|
||||
val |= shift(reg_code(@first) , 12)
|
||||
val |= shift(reg_code(@rn) , 12+4)
|
||||
val |= shift(@attributes[:update_status_flag] , 12+4+4)#20
|
||||
val |= shift(@attributes[:update_status] , 12+4+4)#20
|
||||
val |= shift(op_bit_code , 12+4+4 +1)
|
||||
val |= shift(@immediate , 12+4+4 +1+4)
|
||||
val |= shift(instuction_class , 12+4+4 +1+4+1)
|
||||
|
@ -13,12 +13,12 @@ module Arm
|
||||
|
||||
def initialize(first , attributes)
|
||||
super(first , attributes)
|
||||
@attributes[:update_status_flag] = 0 if @attributes[:update_status_flag] == nil
|
||||
@attributes[:update_status] = 0 if @attributes[:update_status] == nil
|
||||
@attributes[:condition_code] = :al if @attributes[:condition_code] == nil
|
||||
@attributes[:opcode] = attributes[:opcode]
|
||||
@operand = 0
|
||||
|
||||
@attributes[:update_status_flag]= 0
|
||||
@attributes[:update_status]= 0
|
||||
@rn = :r0 # register zero = zero bit pattern
|
||||
# downward growing, decrement before memory access
|
||||
# official ARM style stack as used by gas
|
||||
@ -44,7 +44,7 @@ module Arm
|
||||
val |= (reg_code(@rn) << 16)
|
||||
val |= (is_pop << 16+4) #20
|
||||
val |= (write_base << 16+4+ 1)
|
||||
val |= (@attributes[:update_status_flag] << 16+4+ 1+1)
|
||||
val |= (@attributes[:update_status] << 16+4+ 1+1)
|
||||
val |= (up_down << 16+4+ 1+1+1)
|
||||
val |= (pre_post_index << 16+4+ 1+1+1+1)#24
|
||||
val |= (instuction_class << 16+4+ 1+1+1+1 +2)
|
||||
|
Reference in New Issue
Block a user