Introduce ARM version for the target architecture in order to determine if blx instruction can be used or not. Availability of blx instruction allows for more scenarii supported in R_ARM_CALL relocation. It should also be useful when introducing support for the R_ARM_THM_CALL relocation.
Showing the changes to tcc.h (1 of 2 files). Show all
Unified · Split
| @@ -105,6 +105,14 @@ · 104 unmodified lines | ||
| 105 | 105 | #define TCC_TARGET_I386 |
| 106 | 106 | #endif |
| 107 | 107 | |
| 108 | +#if defined (TCC_TARGET_ARM) && !defined(TCC_ARM_VERSION) | |
| 109 | + #ifdef TCC_ARM_HARDFLOAT | |
| 110 | + #define TCC_ARM_VERSION 7 | |
| 111 | + #else | |
| 112 | + #define TCC_ARM_VERSION 4 | |
| 113 | + #endif | |
| 114 | +#endif | |
| 115 | + | |
| 108 | 116 | #if !defined(TCC_UCLIBC) && !defined(TCC_TARGET_ARM) && \ |
| 109 | 117 | !defined(TCC_TARGET_C67) && !defined(TCC_TARGET_X86_64) |
| 110 | 118 | #define CONFIG_TCC_BCHECK /* enable bound checking code */ |