commit 01d4d5770053730ee54609f1b1fb715f19107817 Author: Brandon Bergren Date: Sat Nov 2 13:07:01 2019 -0500 SPE clang work (WIP?) diff --git a/sys/conf/Makefile.powerpc b/sys/conf/Makefile.powerpc index 2f28a9ff732..f8b5bd6b054 100644 --- a/sys/conf/Makefile.powerpc +++ b/sys/conf/Makefile.powerpc @@ -37,7 +37,8 @@ INCLUDES+= -I$S/contrib/libfdt .if "${MACHINE_ARCH}" == "powerpcspe" # Force __SPE__, since the builtin will be removed later with -mno-spe -CFLAGS+= -mabi=spe -D__SPE__ +CFLAGS.gcc+= -mabi=spe -D__SPE__ +CFLAGS.clang+= -mspe -D__SPE__ -m32 .endif CFLAGS+= -msoft-float CFLAGS.gcc+= -Wa,-many diff --git a/sys/contrib/ncsw/Peripherals/BM/bm.h b/sys/contrib/ncsw/Peripherals/BM/bm.h index e9708666e24..09870cb0715 100644 --- a/sys/contrib/ncsw/Peripherals/BM/bm.h +++ b/sys/contrib/ncsw/Peripherals/BM/bm.h @@ -395,7 +395,7 @@ static __inline__ uint32_t BmBpidGet(t_Bm *p_Bm, bool force, uint32_t base) size, alignment, "BM BPID MEM"); - KASSERT(ans < UINT32_MAX, ("Oops, %lx > UINT32_MAX!\n", ans)); + KASSERT(ans < UINT32_MAX, ("Oops, %jx > UINT32_MAX!\n", (uintmax_t)ans)); return (uint32_t)ans; } diff --git a/sys/contrib/ncsw/Peripherals/QM/qm.c b/sys/contrib/ncsw/Peripherals/QM/qm.c index 50b74712e26..ed3049f0a31 100644 --- a/sys/contrib/ncsw/Peripherals/QM/qm.c +++ b/sys/contrib/ncsw/Peripherals/QM/qm.c @@ -560,7 +560,7 @@ uint32_t QmFqidGet(t_Qm *p_Qm, uint32_t size, uint32_t alignment, bool force, ui "QM FQID MEM"); XX_UnlockIntrSpinlock(p_Qm->lock, intFlags); - KASSERT(ans < UINT32_MAX, ("Oops, %lx > UINT32_MAX!\n", ans)); + KASSERT(ans < UINT32_MAX, ("Oops, %jx > UINT32_MAX!\n", (uintmax_t)ans)); return (uint32_t)ans; } diff --git a/sys/powerpc/booke/spe.c b/sys/powerpc/booke/spe.c index 846d11aaccf..597c6801b6a 100644 --- a/sys/powerpc/booke/spe.c +++ b/sys/powerpc/booke/spe.c @@ -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);