Class: Crabstone::ARM::Operand

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

Instance Method Summary collapse

Methods included from Extension::Operand

#valid?, #value

Instance Method Details

#cimm?Boolean

Returns:

  • (Boolean)


72
73
74
# File 'lib/crabstone/arch/3/arm.rb', line 72

def cimm?
  self[:type] == OP_CIMM
end

#fp?Boolean

Returns:

  • (Boolean)


68
69
70
# File 'lib/crabstone/arch/3/arm.rb', line 68

def fp?
  self[:type] == OP_FP
end

#imm?Boolean

Returns:

  • (Boolean)


56
57
58
59
60
61
62
# File 'lib/crabstone/arch/3/arm.rb', line 56

def imm?
  [
    OP_IMM,
    OP_CIMM,
    OP_PIMM
  ].include?(self[:type])
end

#mem?Boolean

Returns:

  • (Boolean)


64
65
66
# File 'lib/crabstone/arch/3/arm.rb', line 64

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

#pimm?Boolean

Returns:

  • (Boolean)


76
77
78
# File 'lib/crabstone/arch/3/arm.rb', line 76

def pimm?
  self[:type] == OP_PIMM
end

#reg?Boolean

Returns:

  • (Boolean)


49
50
51
52
53
54
# File 'lib/crabstone/arch/3/arm.rb', line 49

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

#setend?Boolean

Returns:

  • (Boolean)


80
81
82
# File 'lib/crabstone/arch/3/arm.rb', line 80

def setend?
  self[:type] == OP_SETEND
end

#sysreg?Boolean

Returns:

  • (Boolean)


84
85
86
# File 'lib/crabstone/arch/3/arm.rb', line 84

def sysreg?
  self[:type] == OP_SYSREG
end