Question regarding "Add testcases for tailcall hierarchy fixing"

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

 



Hi Leon,

In the following commit:

commit b83b936f3e9a3c63896852198a1814e90e68eef5
Author: Leon Hwang <hffilwlqm@xxxxxxxxx>

    selftests/bpf: Add testcases for tailcall hierarchy fixing

you created 2 tests files that contain the following inline assembly.

    asm volatile (""::"r+"(ret));

I presume the actual intent is to force the unused ret variable to
exist as a register.

When compiling that line in GCC it produces the following error:

progs/tailcall_bpf2bpf_hierarchy2.c: In function 'tailcall_bpf2bpf_hierarchy_2':
progs/tailcall_bpf2bpf_hierarchy2.c:66:9: error: input operand constraint contains '+'
   66 |         asm volatile (""::"r+"(ret));
      |         ^~~

After analysing the reasoning behind the error, the plausible solution
is to change the constraint to "+r" and move it from the input operands
list to output operands, i.e:

      asm volatile ("":"+r"(ret));

Can you please confirm that this change would be complient with the test
semantics ?

Regards,
Cupertino




[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