google / buzzer

Apache License 2.0
411 stars 28 forks source link

Create the Register structure #25

Closed thatjiaozi closed 1 year ago

thatjiaozi commented 1 year ago

The purpose of this structure is to differentiate a register from an immediate value, this will allow to create a set of overloaded functions that allow to more easily build ebpf programs.

What I am aiming to have int he future is something like:

newEbpfInstructionSet(
MOV64(ebpf.RegR0, 10),
MOV64(ebpf.RegR1, ebpf.RegR0),
MUL64(ebpf.RegR1, 10),
...
)

this is the first step in a chain of patches to make this feature possible.