aboutsummaryrefslogtreecommitdiffstats
path: root/prog/decodeexec.go
diff options
context:
space:
mode:
Diffstat (limited to 'prog/decodeexec.go')
-rw-r--r--prog/decodeexec.go9
1 files changed, 6 insertions, 3 deletions
diff --git a/prog/decodeexec.go b/prog/decodeexec.go
index f8c29a517..5866d8627 100644
--- a/prog/decodeexec.go
+++ b/prog/decodeexec.go
@@ -35,15 +35,16 @@ type ExecArg interface{} // one of ExecArg*
type ExecArgConst struct {
Size uint64
+ Format BinaryFormat
Value uint64
BitfieldOffset uint64
BitfieldLength uint64
PidStride uint64
- BigEndian bool
}
type ExecArgResult struct {
Size uint64
+ Format BinaryFormat
Index uint64
DivOp uint64
AddOp uint64
@@ -139,14 +140,16 @@ func (dec *execDecoder) readArg() ExecArg {
return ExecArgConst{
Value: dec.read(),
Size: meta & 0xff,
+ Format: BinaryFormat((meta >> 8) & 0xff),
BitfieldOffset: (meta >> 16) & 0xff,
BitfieldLength: (meta >> 24) & 0xff,
PidStride: meta >> 32,
- BigEndian: (meta & (1 << 8)) != 0,
}
case execArgResult:
+ meta := dec.read()
arg := ExecArgResult{
- Size: dec.read(),
+ Size: meta & 0xff,
+ Format: BinaryFormat((meta >> 8) & 0xff),
Index: dec.read(),
DivOp: dec.read(),
AddOp: dec.read(),