yonghong-song wrote:

> Sure Yonghong, I can include that in this PR. Similarly, since we cannot have 
> both `relaxed_load<atomic_load_zext_{8,16}>` and 
> `relaxed_load<atomic_load_sext_{8,16}>`, I'll keep it `zext` (`BPF_MEM` | 
> `BPF_LDX`) for now. For example:
> 
> ```c
> int foo(char *ptr) {
>     return __atomic_load_n(ptr, __ATOMIC_RELAXED);
> }
> ```
> 
> This'll be compiled into:
> 
> ```
> 0000000000000000 <foo>:
>        0:     71 11 00 00 00 00 00 00 w1 = *(u8 *)(r1 + 0x0)
>        1:     bc 10 08 00 00 00 00 00 w0 = (s8)w1
>        2:     95 00 00 00 00 00 00 00 exit
> ```

Okay, LGTM. Thanks!

https://github.com/llvm/llvm-project/pull/108636
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to