clang can't build this code: In file included from src/e_basis.cc:27: In file included from src/main.h:86: src/sys_endian.h:66:58: error: unsupported inline asm: input with type 'int' matching output with type 'u16_t' (aka 'unsigned short') __asm__("rlwimi %0,%2,8,16,23" : "=&r" (result) : "0" (x >> 8), "r" (x)); Approved by: tier 2 blanket
11 lines
420 B
C
11 lines
420 B
C
--- src/sys_endian.h.orig 2020-12-18 15:02:12 UTC
|
|
+++ src/sys_endian.h
|
|
@@ -58,7 +58,7 @@ static inline u16_t UT_Swap16(u16_t x)
|
|
__asm__("xchgb %b0,%h0" : "=Q" (x) : "0" (x));
|
|
return x;
|
|
}
|
|
-#elif defined(__GNUC__) && (defined(__powerpc__) || defined(__ppc__))
|
|
+#elif defined(__GNUC__) && !defined(__clang__) && (defined(__powerpc__) || defined(__ppc__))
|
|
static inline u16_t UT_Swap16(u16_t x)
|
|
{
|
|
u16_t result;
|