Class: AArch64::Instructions::ADR
- Inherits:
-
Instruction
- Object
- Instruction
- AArch64::Instructions::ADR
- Defined in:
- lib/aarch64/instructions/adr.rb
Overview
ADR – A64 Form PC-relative address ADR <Xd>, <label>
Instance Method Summary collapse
- #encode ⇒ Object
-
#initialize(xd, label) ⇒ ADR
constructor
A new instance of ADR.
Constructor Details
#initialize(xd, label) ⇒ ADR
7 8 9 10 |
# File 'lib/aarch64/instructions/adr.rb', line 7 def initialize xd, label @xd = check_mask(xd, 0x1f) @label = label end |
Instance Method Details
#encode ⇒ Object
12 13 14 15 |
# File 'lib/aarch64/instructions/adr.rb', line 12 def encode label = @label.unwrap_label ADR(label & 0x3, check_mask((label >> 2), 0x7ffff), @xd) end |