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

Method SetMode

asm/opcode.go:198–203  ·  view source on GitHub ↗

SetMode sets the mode on load and store operations. Returns InvalidOpCode if op is of the wrong class.

(mode Mode)

Source from the content-addressed store, hash-verified

196//
197// Returns InvalidOpCode if op is of the wrong class.
198func (op OpCode) SetMode(mode Mode) OpCode {
199 if !op.Class().isLoadOrStore() || !valid(OpCode(mode), modeMask) {
200 return InvalidOpCode
201 }
202 return (op & ^modeMask) | OpCode(mode)
203}
204
205// SetSize sets the size on load and store operations.
206//

Callers 8

OpCodeMethod · 0.80
LoadMemOpFunction · 0.80
LoadMemSXOpFunction · 0.80
LoadImmOpFunction · 0.80
LoadIndOpFunction · 0.80
LoadAbsOpFunction · 0.80
StoreMemOpFunction · 0.80
StoreImmOpFunction · 0.80

Calls 4

ClassMethod · 0.95
validFunction · 0.85
OpCodeTypeAlias · 0.85
isLoadOrStoreMethod · 0.80

Tested by

no test coverage detected