svn commit: r343206 - stable/12/sys/powerpc/booke
Justin Hibbits
jhibbits at FreeBSD.org
Sun Jan 20 03:30:05 UTC 2019
Author: jhibbits
Date: Sun Jan 20 03:30:04 2019
New Revision: 343206
URL: https://svnweb.freebsd.org/changeset/base/343206
Log:
MFC r342988:
powerpcspe: Correct SPE high-component loading
Don't clobber the low part of the register restoring the high component of.
This could lead to very bad behavior if it's an ABI-affected register.
While here, also mark the asm volatile in the SPE high save case, to match
the load case.
Modified:
stable/12/sys/powerpc/booke/spe.c
Directory Properties:
stable/12/ (props changed)
Modified: stable/12/sys/powerpc/booke/spe.c
==============================================================================
--- stable/12/sys/powerpc/booke/spe.c Sun Jan 20 00:58:54 2019 (r343205)
+++ stable/12/sys/powerpc/booke/spe.c Sun Jan 20 03:30:04 2019 (r343206)
@@ -425,7 +425,7 @@ static uint32_t
spe_save_reg_high(int reg)
{
uint32_t vec[2];
-#define EVSTDW(n) case n: __asm ("evstdw %1,0(%0)" \
+#define EVSTDW(n) case n: __asm __volatile ("evstdw %1,0(%0)" \
:: "b"(vec), "n"(n)); break;
switch (reg) {
EVSTDW(0); EVSTDW(1); EVSTDW(2); EVSTDW(3);
@@ -448,7 +448,7 @@ spe_save_reg_high(int reg)
static void
spe_load_reg_high(int reg, uint32_t val)
{
-#define EVLDW(n) case n: __asm __volatile("evmergelo "#n",%0,0," \
+#define EVLDW(n) case n: __asm __volatile("evmergelo "#n",%0,"#n \
:: "r"(val)); break;
switch (reg) {
EVLDW(1); EVLDW(2); EVLDW(3); EVLDW(4);
More information about the svn-src-stable-12
mailing list