github.com/dylandreimerink/gobpfld@v0.6.1-0.20220205171531-e79c330ad608/emulator/inst_ja.go (about) 1 package emulator 2 3 import ( 4 "github.com/dylandreimerink/gobpfld/ebpf" 5 ) 6 7 var _ Instruction = (*Jump)(nil) 8 9 type Jump struct { 10 ebpf.Jump 11 } 12 13 func (i *Jump) Clone() Instruction { 14 c := *i 15 return &c 16 } 17 18 func (i *Jump) Execute(vm *VM) error { 19 vm.Registers.PC += int(i.Offset) 20 return nil 21 }