Re: [PATCH bpf-next] selftests/bpf: Fix some incorrect inline asm codes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2025-06-12 at 12:29 -0700, Yonghong Song wrote:

[...]

> > Warning in llvm/gcc on imm32 > UINT_MAX is not correct either.
> > llvm should probably accept 0xffffFFFFdeadbeef as imm32.
> 
> In llvm, the value is represented as an int64, we probably
> can just check the upper 32bit must be 0 or 0xffffFFFF.
> Otherwise, the value is out of range.

I agree with Yonghong, supporting things like 0xffffFFFFdeadbeef and
rejecting things like 0x8000FFFFdeadbeef would require changes to the
assembly parser to behave differently for literals of length 8 (signe
extend them) and >8 (zero extend them), which might be surprising in
some other ways.





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux