Changeset View
Changeset View
Standalone View
Standalone View
source/lib/sysdep/arch.h
/* Copyright (C) 2015 Wildfire Games. | /* Copyright (C) 2020 Wildfire Games. | ||||
* | * | ||||
* Permission is hereby granted, free of charge, to any person obtaining | * Permission is hereby granted, free of charge, to any person obtaining | ||||
* a copy of this software and associated documentation files (the | * a copy of this software and associated documentation files (the | ||||
* "Software"), to deal in the Software without restriction, including | * "Software"), to deal in the Software without restriction, including | ||||
* without limitation the rights to use, copy, modify, merge, publish, | * without limitation the rights to use, copy, modify, merge, publish, | ||||
* distribute, sublicense, and/or sell copies of the Software, and to | * distribute, sublicense, and/or sell copies of the Software, and to | ||||
* permit persons to whom the Software is furnished to do so, subject to | * permit persons to whom the Software is furnished to do so, subject to | ||||
* the following conditions: | * the following conditions: | ||||
▲ Show 20 Lines • Show All 55 Lines • ▼ Show 20 Lines | |||||
# define ARCH_AARCH64 0 | # define ARCH_AARCH64 0 | ||||
#endif | #endif | ||||
// .. MIPS | // .. MIPS | ||||
#if defined(__MIPS__) || defined(__mips__) || defined(__mips) | #if defined(__MIPS__) || defined(__mips__) || defined(__mips) | ||||
# define ARCH_MIPS 1 | # define ARCH_MIPS 1 | ||||
#else | #else | ||||
# define ARCH_MIPS 0 | # define ARCH_MIPS 0 | ||||
#endif | #endif | ||||
// .. E2K (MCST Elbrus 2000) | |||||
#if defined(__e2k__) | |||||
# define ARCH_E2K 1 | |||||
#else | |||||
# define ARCH_E2K 0 | |||||
#endif | |||||
// ensure exactly one architecture has been detected | // ensure exactly one architecture has been detected | ||||
#if (ARCH_IA32+ARCH_IA64+ARCH_AMD64+ARCH_ALPHA+ARCH_ARM+ARCH_AARCH64+ARCH_MIPS) != 1 | #if (ARCH_IA32+ARCH_IA64+ARCH_AMD64+ARCH_ALPHA+ARCH_ARM+ARCH_AARCH64+ARCH_MIPS+ARCH_E2K) != 1 | ||||
# error "architecture not correctly detected (either none or multiple ARCH_* defined)" | # error "architecture not correctly detected (either none or multiple ARCH_* defined)" | ||||
#endif | #endif | ||||
// "X86_X64"-specific code requires either IA-32 or AMD64 | // "X86_X64"-specific code requires either IA-32 or AMD64 | ||||
#define ARCH_X86_X64 (ARCH_IA32|ARCH_AMD64) | #define ARCH_X86_X64 (ARCH_IA32|ARCH_AMD64) | ||||
#endif // #ifndef INCLUDED_ARCH | #endif // #ifndef INCLUDED_ARCH |
Wildfire Games · Phabricator