Assembler
qmonnet opened this issue · comments
Please, do not start working on this, someone already asked me by email to start the work on the assembler.
New feature: an assembler similar to the one of uBPF, to build eBPF programs with a syntax similar to:
mov32 r0, 0
mov32 r1, 2
add32 r0, 1
add32 r0, r1
exit
This would make rbpf natively compatible with uBPF test cases (most functional unit tests have been translated into bytecode already, but it would make it more readable to have them in human-readable form, and it would help be compatible when uBPF receives new test cases.
Improvement suggestion: use add64
instead of add
for 64-bits arithmetic operations (but also accept add
only, to remain compatible).
Link to PR #9