Class: Crabstone::SysZ::Operand

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

Instance Method Summary collapse

Methods included from Extension::Operand

#valid?, #value

Instance Method Details

#acreg?Boolean

Returns:

  • (Boolean)


52
53
54
# File 'lib/crabstone/arch/3/sysz.rb', line 52

def acreg?
  self[:type] == OP_ACREG
end

#imm?Boolean

Returns:

  • (Boolean)


44
45
46
# File 'lib/crabstone/arch/3/sysz.rb', line 44

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

#mem?Boolean

Returns:

  • (Boolean)


48
49
50
# File 'lib/crabstone/arch/3/sysz.rb', line 48

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

#reg?Boolean

Returns:

  • (Boolean)


37
38
39
40
41
42
# File 'lib/crabstone/arch/3/sysz.rb', line 37

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