arch: Cleanup of __ARM__ checks

* gcc 7.x defines __arm__ and __ARM__ (and others)
* clang defines __arm__ and __arm
* cleanup a few related ifdef vs if macros

Change-Id: I5da4bafac590f6fa3e10e543688001c2449f840d
This commit is contained in:
Alexander von Gluck IV
2018-07-31 19:12:20 -05:00
parent 26ae216d0e
commit 9642f7705b
12 changed files with 26 additions and 27 deletions
+7 -7
View File
@@ -18,7 +18,7 @@
__HAIKU_BIG_ENDIAN - defined to 1 on big endian architectures
(defaults to undefined)
*/
#ifdef __INTEL__
#if defined(__INTEL__)
# define __HAIKU_ARCH x86
# if __GNUC__ == 2
# define __HAIKU_ARCH_ABI "x86_gcc2"
@@ -27,31 +27,31 @@
# endif
# define __HAIKU_ARCH_X86 1
# define __HAIKU_ARCH_PHYSICAL_BITS 64
#elif __x86_64__
#elif defined(__x86_64__)
# define __HAIKU_ARCH x86_64
# define __HAIKU_ARCH_ABI "x86_64"
# define __HAIKU_ARCH_X86_64 1
# define __HAIKU_ARCH_BITS 64
#elif __POWERPC__
#elif defined(__POWERPC__)
# define __HAIKU_ARCH ppc
# define __HAIKU_ARCH_ABI "ppc"
# define __HAIKU_ARCH_PPC 1
# define __HAIKU_ARCH_PHYSICAL_BITS 64
# define __HAIKU_BIG_ENDIAN 1
#elif __M68K__
#elif defined(__M68K__)
# define __HAIKU_ARCH m68k
# define __HAIKU_ARCH_ABI "m68k"
# define __HAIKU_ARCH_M68K 1
# define __HAIKU_BIG_ENDIAN 1
#elif __MIPSEL__
#elif defined(__MIPSEL__)
# define __HAIKU_ARCH mipsel
# define __HAIKU_ARCH_ABI "mipsel"
# define __HAIKU_ARCH_MIPSEL 1
#elif __ARM__ || __ARMEL__
#elif defined(__ARMEL__) || defined(__arm__)
# define __HAIKU_ARCH arm
# define __HAIKU_ARCH_ABI "arm"
# define __HAIKU_ARCH_ARM 1
#elif __ARMEB__
#elif defined(__ARMEB__)
# define __HAIKU_ARCH armeb
# define __HAIKU_ARCH_ABI "armeb"
# define __HAIKU_ARCH_ARM 1
+6 -6
View File
@@ -20,17 +20,17 @@
#include <arch/arm/arch_debugger.h>
#ifdef __x86_64__
#if defined(__x86_64__)
typedef struct x86_64_debug_cpu_state debug_cpu_state;
#elif __INTEL__
#elif defined( __INTEL__)
typedef struct x86_debug_cpu_state debug_cpu_state;
#elif __POWERPC__
#elif defined(__POWERPC__)
typedef struct ppc_debug_cpu_state debug_cpu_state;
#elif __M68K__
#elif defined(__M68K__)
typedef struct m68k_debug_cpu_state debug_cpu_state;
#elif __MIPSEL__
#elif defined(__MIPSEL__)
typedef struct mipsel_debug_cpu_state debug_cpu_state;
#elif __ARM__
#elif defined(__arm__)
typedef struct arm_debug_cpu_state debug_cpu_state;
#else
#error unsupported architecture
+2 -2
View File
@@ -10,7 +10,7 @@
* Architecture-specific structure passed to signal handlers
*/
#if __ARM__
#if defined(__arm__)
struct vregs
{
ulong r0;
@@ -32,7 +32,7 @@ struct vregs
ulong cpsr;
// TODO: ARM: fix floats in vregs, add missing stuff.
};
#endif /* __ARM__ */
#endif /* defined(__arm__) */
#endif /* _ARCH_SIGNAL_H_ */
+1 -1
View File
@@ -5,7 +5,7 @@
# include <arch/x86/fenv.h>
#elif defined(__x86_64__)
# include <arch/x86_64/fenv.h>
#elif defined(__ARM__)
#elif defined(__arm__)
# include <arch/arm/fenv.h>
#elif defined(__POWERPC__)
# include <arch/ppc/fenv.h>