Class: AArch64::Instructions::ADD_addsub_imm
- Inherits:
-
Instruction
- Object
- Instruction
- AArch64::Instructions::ADD_addsub_imm
- Defined in:
- lib/aarch64/instructions/add_addsub_imm.rb
Overview
ADD (immediate) – A64 Add (immediate) ADD <Wd|WSP>, <Wn|WSP>, #<imm><shift>
Instance Method Summary collapse
- #encode(_) ⇒ Object
-
#initialize(rd, rn, imm12, sh, sf) ⇒ ADD_addsub_imm
constructor
A new instance of ADD_addsub_imm.
Constructor Details
#initialize(rd, rn, imm12, sh, sf) ⇒ ADD_addsub_imm
Returns a new instance of ADD_addsub_imm.
7 8 9 10 11 12 13 |
# File 'lib/aarch64/instructions/add_addsub_imm.rb', line 7 def initialize rd, rn, imm12, sh, sf @rd = check_mask(rd, 0x1f) @rn = check_mask(rn, 0x1f) @imm12 = check_mask(imm12, 0xfff) @sh = check_mask(sh, 0x01) @sf = check_mask(sf, 0x01) end |
Instance Method Details
#encode(_) ⇒ Object
15 16 17 |
# File 'lib/aarch64/instructions/add_addsub_imm.rb', line 15 def encode _ ADD_addsub_imm(@sf, @sh, @imm12, @rn, @rd) end |