Author: jhibbits
Date: Sat Nov 16 16:27:31 2019
New Revision: 354775
URL: https://svnweb.freebsd.org/changeset/base/354775

Log:
  powerpcspe: Mark asm statement in spe_save_reg_high as clobbering memory
  
  Modern gcc errors that "'vec[0]' is used uninitialized in this function"
  without us telling it that vec is clobbered.  Neither clang nor gcc 4.2.1
  error on the existing construct.
  
  Submitted by: bdragon

Modified:
  head/sys/powerpc/booke/spe.c

Modified: head/sys/powerpc/booke/spe.c
==============================================================================
--- head/sys/powerpc/booke/spe.c        Sat Nov 16 12:00:22 2019        
(r354774)
+++ head/sys/powerpc/booke/spe.c        Sat Nov 16 16:27:31 2019        
(r354775)
@@ -426,7 +426,7 @@ spe_save_reg_high(int reg)
 {
        uint32_t vec[2];
 #define EVSTDW(n)   case n: __asm __volatile ("evstdw %1,0(%0)" \
-               :: "b"(vec), "n"(n)); break;
+               :: "b"(vec), "n"(n) : "memory"); break;
        switch (reg) {
        EVSTDW(0);      EVSTDW(1);      EVSTDW(2);      EVSTDW(3);
        EVSTDW(4);      EVSTDW(5);      EVSTDW(6);      EVSTDW(7);
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to