Class: AArch64::Instructions::ADRP
- Inherits:
-
Instruction
- Object
- Instruction
- AArch64::Instructions::ADRP
- Defined in:
- lib/aarch64/instructions/adrp.rb
Overview
ADRP – A64 Form PC-relative address to 4KB page ADRP <Xd>, <label>
Instance Method Summary collapse
- #encode(_) ⇒ Object
-
#initialize(xd, label) ⇒ ADRP
constructor
A new instance of ADRP.
Constructor Details
#initialize(xd, label) ⇒ ADRP
Returns a new instance of ADRP.
7 8 9 10 |
# File 'lib/aarch64/instructions/adrp.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/adrp.rb', line 12 def encode _ label = unwrap_label(@label, 0) / 4096 ADRP(label & 0x3, check_mask(label >> 2, 0x7ffff), @xd) end |