aboutsummaryrefslogtreecommitdiff
path: root/tcc.h
diff options
context:
space:
mode:
authorThomas Preud'homme <robotux@celest.fr>2012-10-16 00:31:56 +0200
committerThomas Preud'homme <robotux@celest.fr>2012-10-16 00:31:56 +0200
commit9966fd4eaea163439a63d63d044d0657df1908ea (patch)
treed9777d4451a99796534fe5b51b2fdc6f0aabaa1b /tcc.h
parentc6630ef92a21ca33af08b1faa03fba578e12315f (diff)
downloadtinycc-9966fd4eaea163439a63d63d044d0657df1908ea.tar.gz
tinycc-9966fd4eaea163439a63d63d044d0657df1908ea.tar.bz2
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.
Diffstat (limited to 'tcc.h')
-rw-r--r--tcc.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/tcc.h b/tcc.h
index 8bca9ae..4e88782 100644
--- a/tcc.h
+++ b/tcc.h
@@ -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 */