Class: AArch64::Instructions::ADR

Inherits:
Object
  • Object
show all
Defined in:
lib/aarch64/instructions/adr.rb

Overview

ADR – A64 Form PC-relative address ADR <Xd>, <label>

Instance Method Summary collapse

Constructor Details

#initialize(xd, label) ⇒ ADR

Returns a new instance of ADR.



7
8
9
10
# File 'lib/aarch64/instructions/adr.rb', line 7

def initialize xd, label
  @xd    = xd
  @label = label
end

Instance Method Details

#encodeObject



12
13
14
15
# File 'lib/aarch64/instructions/adr.rb', line 12

def encode
  label = @label.to_i
  ADR(label, label >> 2, @xd.to_i)
end