MCPcopy
hub / github.com/cilium/ebpf / JumpOp

Method JumpOp

asm/opcode.go:180–193  ·  view source on GitHub ↗

JumpOp returns the JumpOp. Returns InvalidJumpOp if it doesn't encode a jump.

()

Source from the content-addressed store, hash-verified

178// JumpOp returns the JumpOp.
179// Returns InvalidJumpOp if it doesn't encode a jump.
180func (op OpCode) JumpOp() JumpOp {
181 if !op.Class().IsJump() {
182 return InvalidJumpOp
183 }
184
185 jumpOp := JumpOp(op & jumpMask)
186
187 // Some JumpOps are only supported by JumpClass, not Jump32Class.
188 if op.Class() == Jump32Class && (jumpOp == Exit || jumpOp == Call) {
189 return InvalidJumpOp
190 }
191
192 return jumpOp
193}
194
195// SetMode sets the mode on load and store operations.
196//

Callers 8

StringMethod · 0.95
relocateInstructionMethod · 0.80
TestGetSetJumpOpFunction · 0.80
SetJumpOpMethod · 0.80
IsFunctionCallMethod · 0.80
IsKfuncCallMethod · 0.80
IsBuiltinCallMethod · 0.80
FormatMethod · 0.80

Calls 3

ClassMethod · 0.95
JumpOpTypeAlias · 0.85
IsJumpMethod · 0.80

Tested by 1

TestGetSetJumpOpFunction · 0.64