[llvm] BPF: Emit an error for illegal LD_imm64 insn when LLVM_ENABLE_ASSERTI… (PR #74035)

via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 1 05:33:17 PST 2023


eddyz87 wrote:

I tried building with `LLVM_ENABLE_ASSERTIONS=OFF` the following example still does not produce error:

```
$ cat test-asm-ll.c
int foo(void)
{
  asm volatile ("r1 = 10 + w3 ll;");
  return 0;
}
$ clang -target bpf -c test-asm-ll.c -o - | llvm-objdump -d -
...
0000000000000000 <foo>:
       0:	18 01 00 00 0a 00 00 00 00 00 00 00 00 00 00 00	r1 = 0xa ll
       2:	b7 00 00 00 00 00 00 00	r0 = 0x0
       3:	95 00 00 00 00 00 00 00	exit
```

https://github.com/llvm/llvm-project/pull/74035


More information about the llvm-commits mailing list