Re: riscv: llvm-compiler: calling convention violation: temporary register $t2 is used to pass the ninth function parameter

From: Nick Desaulniers
Date: Fri May 13 2022 - 15:40:17 EST


On Thu, May 12, 2022 at 8:46 PM Changbin Du <changbin.du@xxxxxxxxxx> wrote:
>
> On Thu, May 12, 2022 at 07:49:41AM -0700, Craig Topper wrote:
> > Changbin, can you provide a pre-processed source and a command line? I can
> > reduce it on the llvm side.
> >
>
> hmm, clang can not build the preprocessed source by itself!

Sorry, I should have provided more info.

In order to get the preprocessed source, you generally can do:

$ ARCH=riscv make LLVM=1 -j$(nproc) defconfig lib/string.i

replace the final command line parameter with the path to the source
file you care about.

Then, to get the command line invocation, you can do:

$ ARCH=riscv make LLVM=1 -j$(nproc) lib/string.o V=1

Then you can provide the output of those two commands.
--
Thanks,
~Nick Desaulniers