[llvm-bugs] [Bug 42469] New: PowerPC: inline assembly doesn't know the difference between altivec and vsx registers
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Jul 1 11:49:30 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=42469
Bug ID: 42469
Summary: PowerPC: inline assembly doesn't know the difference
between altivec and vsx registers
Product: new-bugs
Version: 8.0
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: new bugs
Assignee: unassignedbugs at nondot.org
Reporter: slandden at gmail.com
CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org
AltiVec registers are differn't registers from VSX registers, and even when the
VSX register class ("wa"[1]) is specified to an inline assembly, gcc doesn't
put the variable in the right register
#include <altivec.h>
#include <stdint.h>
void store_unaligned(vector unsigned char vec, unsigned char *dest) {
uintptr_t zero = 0;
__asm__ volatile ("stxvb16x %0, %1, %2\n\t"
:
: "wa" (vec), "r" (zero), "r" ((uintptr_t)dest));
}
compiled with clang -mvsx unaligned.c --save-temps -c -O3
store_unaligned: # @store_unaligned
.Lfunc_begin0:
# %bb.0:
li 3, 0
#APP
stxvb16x 2, 3, 5 <=== clang needs to move it from vr3 to vs2, but
didn't
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190701/f3091e84/attachment.html>
More information about the llvm-bugs
mailing list