Class: Crabstone::MIPS::Operand

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

Instance Method Summary collapse

Methods included from Extension::Operand

#valid?, #value

Instance Method Details

#imm?Boolean

Returns:

  • (Boolean)


39
40
41
# File 'lib/crabstone/arch/3/mips.rb', line 39

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

#mem?Boolean

Returns:

  • (Boolean)


43
44
45
# File 'lib/crabstone/arch/3/mips.rb', line 43

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

#reg?Boolean

Returns:

  • (Boolean)


35
36
37
# File 'lib/crabstone/arch/3/mips.rb', line 35

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