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.