MCPcopy Index your code
hub / github.com/cilium/ebpf / SetALUOp

Method SetALUOp

asm/opcode.go:235–240  ·  view source on GitHub ↗

SetALUOp sets the ALUOp on ALU operations. Returns InvalidOpCode if op is of the wrong class.

(alu ALUOp)

Source from the content-addressed store, hash-verified

233//
234// Returns InvalidOpCode if op is of the wrong class.
235func (op OpCode) SetALUOp(alu ALUOp) OpCode {
236 if !op.Class().IsALU() || !valid(OpCode(alu), aluMask) {
237 return InvalidOpCode
238 }
239 return (op & ^aluMask) | OpCode(alu)
240}
241
242// SetJumpOp sets the JumpOp on jump operations.
243//

Callers 6

HostToFunction · 0.80
BSwapFunction · 0.80
OpMethod · 0.80
Op32Method · 0.80
UnmarshalMethod · 0.80
MarshalMethod · 0.80

Calls 4

ClassMethod · 0.95
validFunction · 0.85
OpCodeTypeAlias · 0.85
IsALUMethod · 0.80

Tested by

no test coverage detected