Class: Crabstone::ARM64::Operand

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

Instance Method Summary collapse

Methods included from Extension::Operand

#valid?, #value

Instance Method Details

#barrier?Boolean

Returns:

  • (Boolean)


107
108
109
# File 'lib/crabstone/arch/3/arm64.rb', line 107

def barrier?
  self[:type] == OP_BARRIER
end

#cimm?Boolean

Returns:

  • (Boolean)


83
84
85
# File 'lib/crabstone/arch/3/arm64.rb', line 83

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

#ext?Boolean

Returns:

  • (Boolean)


54
55
56
# File 'lib/crabstone/arch/3/arm64.rb', line 54

def ext?
  self[:ext] != EXT_INVALID
end

#fp?Boolean

Returns:

  • (Boolean)


79
80
81
# File 'lib/crabstone/arch/3/arm64.rb', line 79

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

#imm?Boolean

Returns:

  • (Boolean)


68
69
70
71
72
73
# File 'lib/crabstone/arch/3/arm64.rb', line 68

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

#mem?Boolean

Returns:

  • (Boolean)


75
76
77
# File 'lib/crabstone/arch/3/arm64.rb', line 75

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

#prefetch?Boolean

Returns:

  • (Boolean)


103
104
105
# File 'lib/crabstone/arch/3/arm64.rb', line 103

def prefetch?
  self[:type] == OP_PREFETCH
end

#pstate?Boolean

Returns:

  • (Boolean)


95
96
97
# File 'lib/crabstone/arch/3/arm64.rb', line 95

def pstate?
  self[:type] == OP_PSTATE
end

#reg?Boolean

Returns:

  • (Boolean)


60
61
62
63
64
65
66
# File 'lib/crabstone/arch/3/arm64.rb', line 60

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

#reg_mrs?Boolean

Returns:

  • (Boolean)


87
88
89
# File 'lib/crabstone/arch/3/arm64.rb', line 87

def reg_mrs?
  self[:type] == OP_REG_MRS
end

#reg_msr?Boolean

Returns:

  • (Boolean)


91
92
93
# File 'lib/crabstone/arch/3/arm64.rb', line 91

def reg_msr?
  self[:type] == OP_REG_MSR
end

#shift?Boolean

Returns:

  • (Boolean)


50
51
52
# File 'lib/crabstone/arch/3/arm64.rb', line 50

def shift?
  self[:shift][:type] != SFT_INVALID
end

#sme_index?Boolean

Returns:

  • (Boolean)


113
114
115
# File 'lib/crabstone/arch/5/arm64.rb', line 113

def sme_index?
  self[:type] == OP_SME_INDEX
end

#svcr?Boolean

Returns:

  • (Boolean)


101
102
103
# File 'lib/crabstone/arch/5/arm64.rb', line 101

def svcr?
  self[:type] == OP_SVCR
end

#sys?Boolean

Returns:

  • (Boolean)


99
100
101
# File 'lib/crabstone/arch/3/arm64.rb', line 99

def sys?
  self[:type] == OP_SYS
end