common: Use ARCHITECTURE_ARM instead of _M_ARM
This commit is contained in:
parent
d03f72eb56
commit
1afcaed1ff
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#if !defined(ARCHITECTURE_x86_64) && !defined(_M_ARM)
|
#if !defined(ARCHITECTURE_x86_64) && !defined(ARCHITECTURE_ARM)
|
||||||
#include <cstdlib> // for exit
|
#include <cstdlib> // for exit
|
||||||
#endif
|
#endif
|
||||||
#include "common/common_types.h"
|
#include "common/common_types.h"
|
||||||
|
@ -32,7 +32,7 @@
|
||||||
|
|
||||||
#ifdef ARCHITECTURE_x86_64
|
#ifdef ARCHITECTURE_x86_64
|
||||||
#define Crash() __asm__ __volatile__("int $3")
|
#define Crash() __asm__ __volatile__("int $3")
|
||||||
#elif defined(_M_ARM)
|
#elif defined(ARCHITECTURE_ARM)
|
||||||
#define Crash() __asm__ __volatile__("trap")
|
#define Crash() __asm__ __volatile__("trap")
|
||||||
#else
|
#else
|
||||||
#define Crash() exit(1)
|
#define Crash() exit(1)
|
||||||
|
|
|
@ -69,7 +69,7 @@ inline u32 swap32(u32 _data) {
|
||||||
inline u64 swap64(u64 _data) {
|
inline u64 swap64(u64 _data) {
|
||||||
return _byteswap_uint64(_data);
|
return _byteswap_uint64(_data);
|
||||||
}
|
}
|
||||||
#elif _M_ARM
|
#elif ARCHITECTURE_ARM
|
||||||
inline u16 swap16(u16 _data) {
|
inline u16 swap16(u16 _data) {
|
||||||
u32 data = _data;
|
u32 data = _data;
|
||||||
__asm__("rev16 %0, %1\n" : "=l"(data) : "l"(data));
|
__asm__("rev16 %0, %1\n" : "=l"(data) : "l"(data));
|
||||||
|
|
Reference in New Issue