Date: Sun, 20 Jan 2019 03:30:04 +0000 (UTC) From: Justin Hibbits <jhibbits@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r343206 - stable/12/sys/powerpc/booke Message-ID: <201901200330.x0K3U4Cm085187@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201901200330.x0K3U4Cm085187>