[Bug target/91047] New: PowerPC: inline assembly doesn't know the difference between altivec and vsx registers
shawn at git dot icu
gcc-bugzilla@gcc.gnu.org
Mon Jul 1 18:47:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91047
Bug ID: 91047
Summary: PowerPC: inline assembly doesn't know the difference
between altivec and vsx registers
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: shawn at git dot icu
Target Milestone: ---
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 gcc -mvsx unaligned.c --save-temps -c -O3
store_unaligned:
.LFB0:
.cfi_startproc
li 9,0
#APP
# 6 "unaligned.c" 1
stxvb16x 2, 9, 5 <=== gcc needs to move it from vr3 to vs2, but didn't
More information about the Gcc-bugs
mailing list