Class: Crabstone::SH::Operand

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

Instance Method Summary collapse

Methods included from Extension::Operand

#valid?, #value

Instance Method Details

#imm?Boolean

Returns:

  • (Boolean)


52
53
54
# File 'lib/crabstone/arch/5/sh.rb', line 52

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

#mem?Boolean

Returns:

  • (Boolean)


56
57
58
# File 'lib/crabstone/arch/5/sh.rb', line 56

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

#reg?Boolean

Returns:

  • (Boolean)


48
49
50
# File 'lib/crabstone/arch/5/sh.rb', line 48

def reg?
  self[:type] == OP_REG
end