Class: AArch64::Instructions::LDRH_imm
- Inherits:
-
Instruction
- Object
- Instruction
- AArch64::Instructions::LDRH_imm
- Defined in:
- lib/aarch64/instructions/ldrh_imm.rb
Overview
LDRH (immediate) – A64 Load Register Halfword (immediate) LDRH <Wt>, [<Xn|SP>], #<simm> LDRH <Wt>, [<Xn|SP>, #<simm>]! LDRH <Wt>, [<Xn|SP>#<pimm>]
Instance Method Summary collapse
- #encode(_) ⇒ Object
-
#initialize(rt, rn, imm9, option) ⇒ LDRH_imm
constructor
A new instance of LDRH_imm.
Constructor Details
#initialize(rt, rn, imm9, option) ⇒ LDRH_imm
Returns a new instance of LDRH_imm.
9 10 11 12 13 14 |
# File 'lib/aarch64/instructions/ldrh_imm.rb', line 9 def initialize rt, rn, imm9, option @rt = check_mask(rt, 0x1f) @rn = check_mask(rn, 0x1f) @imm9 = check_mask(imm9, 0x1ff) @option = check_mask(option, 0x03) end |
Instance Method Details
#encode(_) ⇒ Object
16 17 18 |
# File 'lib/aarch64/instructions/ldrh_imm.rb', line 16 def encode _ LDRH_imm(@imm9, @option, @rn, @rt) end |