Class: AArch64::Instructions::B_cond

Inherits:
Instruction show all
Defined in:
lib/aarch64/instructions/b_cond.rb

Overview

B.cond – A64 Branch conditionally B.<cond> <label>

Instance Method Summary collapse

Constructor Details

#initialize(cond, label) ⇒ B_cond

Returns a new instance of B_cond.



7
8
9
10
# File 'lib/aarch64/instructions/b_cond.rb', line 7

def initialize cond, label
  @cond  = check_mask(cond, 0xf)
  @label = label
end

Instance Method Details

#encode(pos) ⇒ Object



12
13
14
# File 'lib/aarch64/instructions/b_cond.rb', line 12

def encode pos
  B_cond(check_mask(unwrap_label(@label, pos), 0x7ffff), @cond)
end