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

Changbin Du changbin.du at huawei.com
Thu May 12 01:28:20 PDT 2022


On Wed, May 11, 2022 at 11:39:07AM -0700, Nick Desaulniers wrote:
> On Mon, May 9, 2022 at 11:54 PM Changbin Du <changbin.du at huawei.com> wrote:
> >
[snip]
> > I also built a simple test function with 9 parameters by clang and same cflags,
> > but cannot reproduce it. Maybe it is conditional?
> >
> > Simple test code:
> > __attribute__ ((noinline))
> > void test_func(int *a, int *b, int *c, int *d, int *e, int *f, int *g, int *h, int *i)
> > {
> >         printf("__find_rr_leaf: %d\n", *i);
> > }
> >
> > int main(void)
> > {
> >         int a,b,c,d,e,f,g,h,i = 100;
> >
> >         test_func(&a,&b,&c,&d,&e,&f,&g,&h,&i);
> >         return 0;
> > }
> 
> Hmm...any chance you could come up with a more concise test case then
> using creduce [0] or cvise [1]?
> [0] https://embed.cs.utah.edu/creduce/
> [1] https://github.com/marxin/cvise
> 
>
okay, let me try to reduce the orignal source with creduce.

> 
> 
> -- 
> Thanks,
> ~Nick Desaulniers

-- 
Cheers,
Changbin Du



More information about the linux-riscv mailing list