Add support for basic arithmetic operations

This commit is contained in:
2025-09-11 02:29:16 +05:30
parent 4177a6cf46
commit 6f6f101a86
3 changed files with 84 additions and 8 deletions

View File

@ -39,20 +39,23 @@ def hello_again(ctx: c_void_p) -> c_int64:
print("we did not prevail")
ts = ktime()
last().update(key, ts)
keys = 2
last().update(keys, ts)
key = 4
last().update(key, ts)
key = 5
st = "st"
last().update(key, ts)
return c_int64(0)
keena = 2 + 1
# below breaks
# keela = keena + 1
keema = 8 * 9
keesa = 10 - 11
keeda = 10 / 5
# below does not spit IR
keeda += 1
return c_int64(0)
@bpf
@bpfglobal
def LICENSE() -> str:
return "GPL"
compile()