The patch is to add the VSX register support for inline assembly.
Before this patch, below case will get an error.
$ cat test.c #include <altivec.h> unsigned int a=0; int main () { unsigned int *dbell=&a; int d; __asm__ __volatile__ ("lxvw4x %%vs32, 0, %2\n\t" "stxvw4x %%vs32, 0, %1" : "=m"(*(volatile unsigned int*)(dbell)) : "r" (dbell), "r" (&d) : "vs32"); return 0; }
Below is the error information.
$ clang -c test.c t1.c:12:20: error: unknown register name 'vs32' in asm : "vs32"); ^ 1 error generated.
After this patch, we can get inline assembly we expected without error.
RegNum is wrong here!
"vs0" should be mapped to RegNum of "f0", which is 33.
"vs32" should be mapped to RegNum of "v0", which is 78.