From the gcc manual, we can see that the specific limit of wi inline asm is “FP or VSX register to hold 64-bit integers for VSX insns or NO_REGS”. The link is https://gcc.gnu.org/onlinedocs/gcc-8.2.0/gcc/Machine-Constraints.html#Machine-Constraints.
If we use the following code to test
int foo(vector float __A)
{
int res = 0;
vector float vtmp;
__asm__(
"xxsldwi %x1,%x2,%x2,3;\n"
"xscvspdp %x1,%x1;\n"
"fctiw %1,%1;\n"
"mfvsrd %0,%x1;\n"
: "=r" (res),
"=&wi" (vtmp)
: "wa" (__A)
: );
return (res);
}We found that it would produce the following error
asm_wi.c:12:2: error: invalid output constraint '=&wi' in asm
"=&wi" (vtmp)
^
1 error generated.
We should accept this constraint.