Class: Crabstone::TMS320C64X::Operand

Inherits:
FFI::Struct
  • Object
show all
Includes:
Extension::Operand
Defined in:
lib/crabstone/arch/4/tms320c64x.rb,
lib/crabstone/arch/5/tms320c64x.rb

Instance Method Summary collapse

Methods included from Extension::Operand

#valid?, #value

Instance Method Details

#imm?Boolean

Returns:

  • (Boolean)


47
48
49
# File 'lib/crabstone/arch/4/tms320c64x.rb', line 47

def imm?
  self[:type] == OP_IMM
end

#mem?Boolean

Returns:

  • (Boolean)


51
52
53
# File 'lib/crabstone/arch/4/tms320c64x.rb', line 51

def mem?
  self[:type] == OP_MEM
end

#reg?Boolean

Returns:

  • (Boolean)


40
41
42
43
44
45
# File 'lib/crabstone/arch/4/tms320c64x.rb', line 40

def reg?
  [
    OP_REG,
    OP_REGPAIR
  ].include?(self[:type])
end

#regpair?Boolean

Returns:

  • (Boolean)


55
56
57
# File 'lib/crabstone/arch/4/tms320c64x.rb', line 55

def regpair?
  self[:type] == OP_REGPAIR
end