Only use blx if available

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.
This commit is contained in:
Thomas Preud'homme
2012-10-16 00:31:56 +02:00
parent c6630ef92a
commit 9966fd4eae
2 changed files with 19 additions and 8 deletions

8
tcc.h
View File

@ -105,6 +105,14 @@
#define TCC_TARGET_I386
#endif
#if defined (TCC_TARGET_ARM) && !defined(TCC_ARM_VERSION)
#ifdef TCC_ARM_HARDFLOAT
#define TCC_ARM_VERSION 7
#else
#define TCC_ARM_VERSION 4
#endif
#endif
#if !defined(TCC_UCLIBC) && !defined(TCC_TARGET_ARM) && \
!defined(TCC_TARGET_C67) && !defined(TCC_TARGET_X86_64)
#define CONFIG_TCC_BCHECK /* enable bound checking code */