efriedma-quic wrote:
> My understanding is that you refer to the following part of the
> [specification](https://riscv.org/wp-content/uploads/2015/01/riscv-calling.pdf):
Yes. For example, on RISC-V, the function `long f(unsigned g) { return (int)g;
}` compiles to just a "ret".
> clang would now guarantee sign or zero extension for all integral function
> parameters.
clang would guarantee sign-extension for signed parameters, and zero-extension
for unsigned parameters. Which is not the same as the RISCV ABI rules.
> That is, we will do zero extension for uint argument here. This will
> guarantee correct value if 'foo' is a kernel function.
A kernel function will expect the uint to be sign-extended, not zero-extended.
https://github.com/llvm/llvm-project/pull/84874
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits