$OpenBSD: patch-src_ppui_fastfill_h,v 1.1 2020/04/28 22:35:24 cwen Exp $

powerpc fix for "error: invalid operand for instruction" in asm code
see https://github.com/milkytracker/MilkyTracker/pull/210

Index: src/ppui/fastfill.h
--- src/ppui/fastfill.h.orig
+++ src/ppui/fastfill.h
@@ -34,7 +34,7 @@ static __attribute__((noinline)) void fill_dword(pp_ui
 static inline void fill_dword(pp_uint32* buff, pp_uint32 dw, pp_uint32 len)
 #endif
 {
-#if defined(__ppc__) && defined(__GNUC__)
+#if defined(__ppc__) && defined(__GNUC__) && !defined(__clang__)
 	// PPC assembly FTW!!1!
 	// r3 = buff
 	// r4 = dw
@@ -94,7 +94,7 @@ static __attribute__((noinline)) void fill_dword_verti
 static inline void fill_dword_vertical(pp_uint32* buff, pp_uint32 dw, pp_uint32 len, pp_uint32 pitch)
 #endif
 {
-#if defined(__ppc__) && defined(__GNUC__)
+#if defined(__ppc__) && defined(__GNUC__) && !defined(__clang__)
 	asm volatile("nop\n" // align loop start to 16 byte boundary
 				 "nop\n" // same
 				 "nop\n" // same
