Revert "Revert "v.gen.c: add a __V_architecture macro""

This reverts commit 339f2cd180.
pull/10439/head
Delyan Angelov 2021-06-13 00:46:27 +03:00
parent dc654b0121
commit dc1c8820cc
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED
1 changed files with 6 additions and 0 deletions

View File

@ -61,11 +61,17 @@ const c_common_macros = '
#define __NOINLINE __attribute__((noinline)) #define __NOINLINE __attribute__((noinline))
#define __IRQHANDLER __attribute__((interrupt)) #define __IRQHANDLER __attribute__((interrupt))
#define __V_architecture 0
#if defined(__x86_64__) #if defined(__x86_64__)
#define __V_amd64 1 #define __V_amd64 1
#undef __V_architecture
#define __V_architecture 1
#endif #endif
#if defined(__aarch64__) || defined(__arm64__) #if defined(__aarch64__) || defined(__arm64__)
#define __V_arm64 1 #define __V_arm64 1
#undef __V_architecture
#define __V_architecture 2
#endif #endif
// Using just __GNUC__ for detecting gcc, is not reliable because other compilers define it too: // Using just __GNUC__ for detecting gcc, is not reliable because other compilers define it too: