From 101d8964f1cf0a390e94e20139a6262cb727d4ad Mon Sep 17 00:00:00 2001 From: Cameron Cawley Date: Sun, 13 May 2018 11:34:45 +0100 Subject: [PATCH] common: Fix compilation on ARM --- src/common/common_funcs.h | 4 +--- src/common/swap.h | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/common/common_funcs.h b/src/common/common_funcs.h index d1a716d112..ecb71224ce 100644 --- a/src/common/common_funcs.h +++ b/src/common/common_funcs.h @@ -4,7 +4,7 @@ #pragma once -#if !defined(ARCHITECTURE_x86_64) && !defined(ARCHITECTURE_ARM) +#if !defined(ARCHITECTURE_x86_64) #include // for exit #endif #include "common/common_types.h" @@ -32,8 +32,6 @@ #ifdef ARCHITECTURE_x86_64 #define Crash() __asm__ __volatile__("int $3") -#elif defined(ARCHITECTURE_ARM) -#define Crash() __asm__ __volatile__("trap") #else #define Crash() exit(1) #endif diff --git a/src/common/swap.h b/src/common/swap.h index f025f7450f..3970a42a1a 100644 --- a/src/common/swap.h +++ b/src/common/swap.h @@ -69,7 +69,7 @@ inline u32 swap32(u32 _data) { inline u64 swap64(u64 _data) { return _byteswap_uint64(_data); } -#elif ARCHITECTURE_ARM +#elif defined(ARCHITECTURE_ARM) && (__ARM_ARCH >= 6) inline u16 swap16(u16 _data) { u32 data = _data; __asm__("rev16 %0, %1\n" : "=l"(data) : "l"(data));