Class: AArch64::Instructions::ADDS_addsub_imm
- Inherits:
-
Instruction
- Object
- Instruction
- AArch64::Instructions::ADDS_addsub_imm
- Defined in:
- lib/aarch64/instructions/adds_addsub_imm.rb
Overview
ADDS (immediate) – A64 Add (immediate), setting flags ADDS <Wd>, <Wn|WSP>, #<imm><shift> ADDS <Xd>, <Xn|SP>, #<imm><shift>
Instance Method Summary collapse
- #encode(_) ⇒ Object
-
#initialize(d, n, imm, shift, sf) ⇒ ADDS_addsub_imm
constructor
A new instance of ADDS_addsub_imm.
Constructor Details
#initialize(d, n, imm, shift, sf) ⇒ ADDS_addsub_imm
Returns a new instance of ADDS_addsub_imm.
8 9 10 11 12 13 14 |
# File 'lib/aarch64/instructions/adds_addsub_imm.rb', line 8 def initialize d, n, imm, shift, sf @d = check_mask(d, 0x1f) @n = check_mask(n, 0x1f) @imm = check_mask(imm, 0xfff) @shift = check_mask(shift, 0x01) @sf = check_mask(sf, 0x01) end |
Instance Method Details
#encode(_) ⇒ Object
16 17 18 |
# File 'lib/aarch64/instructions/adds_addsub_imm.rb', line 16 def encode _ ADDS_addsub_imm(@sf, @shift, @imm, @n, @d) end |