Class: AArch64::Instructions::B_cond

Inherits:
Object
  • Object
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



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

def initialize cond, label
  @cond  = cond
  @label = label
end

Instance Method Details

#encodeObject



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

def encode
  B_cond(@label.to_i / 4, Utils.cond2bin(@cond))
end