Class: AArch64::Instructions::EOR::LOG_shift

Inherits:
Instruction
  • Object
show all
Defined in:
lib/aarch64/instructions/eor/log_shift.rb

Overview

EOR (shifted register) – A64 Bitwise Exclusive OR (shifted register) EOR <Wd>, <Wn>, <Wm><shift> #<amount> EOR <Xd>, <Xn>, <Xm><shift> #<amount>

Instance Method Summary collapse

Constructor Details

#initialize(rd, rn, rm, shift, imm6, sf) ⇒ LOG_shift

Returns a new instance of LOG_shift.



9
10
11
12
13
14
15
16
# File 'lib/aarch64/instructions/eor/log_shift.rb', line 9

def initialize rd, rn, rm, shift, imm6, sf
  @rd    = check_mask(rd, 0x1f)
  @rn    = check_mask(rn, 0x1f)
  @rm    = check_mask(rm, 0x1f)
  @shift = check_mask(shift, 0x03)
  @imm6  = check_mask(imm6, 0x3f)
  @sf    = check_mask(sf, 0x01)
end

Instance Method Details

#encode(_) ⇒ Object



18
19
20
# File 'lib/aarch64/instructions/eor/log_shift.rb', line 18

def encode _
  EOR_log_shift(@sf, @shift, @rm, @imm6, @rn, @rd)
end