2006-11-29 Paul Brook <paul@codesourcery.com>
authorPaul Brook <paul@codesourcery.com>
Wed, 29 Nov 2006 17:53:39 +0000 (17:53 +0000)
committerPaul Brook <paul@codesourcery.com>
Wed, 29 Nov 2006 17:53:39 +0000 (17:53 +0000)
gas/
* config/tc-arm.c (arm_is_eabi): New function.
* config/tc-arm.h (arm_is_eabi): New prototype.
(THUMB_IS_FUNC): Use ELF function type for EABI objects.
* doc/c-arm.texi (.thumb_func): Update documentation.

gas/ChangeLog
gas/config/tc-arm.c
gas/config/tc-arm.h
gas/doc/c-arm.texi

index e21af06787453d23011eaa67a19ea145c453e045..d8066c4f12376d91b22b1ad882679e7a71bf8472 100644 (file)
@@ -1,3 +1,10 @@
+2006-11-29  Paul Brook  <paul@codesourcery.com>
+
+       * config/tc-arm.c (arm_is_eabi): New function.
+       * config/tc-arm.h (arm_is_eabi): New prototype.
+       (THUMB_IS_FUNC): Use ELF function type for EABI objects.
+       * doc/c-arm.texi (.thumb_func): Update documentation.
+
 2006-11-29  Paul Brook  <paul@codesourcery.com>
 
        * config/tc-arm.c (do_vfp_sp_const, do_vfp_dp_const): Fix operans
index 7f3751d894ec2c1ecd39968ec2aadf0c50698fe8..8ea3ad198b7be1d4455bfdd44e85d12dd97c9331 100644 (file)
@@ -232,6 +232,12 @@ static int meabi_flags = EABI_DEFAULT;
 # else
 static int meabi_flags = EF_ARM_EABI_UNKNOWN;
 # endif
+
+bfd_boolean
+arm_is_eabi(void)
+{
+  return (EF_ARM_EABI_VERSION (meabi_flags) >= EF_ARM_EABI_VER4);
+}
 #endif
 
 #ifdef OBJ_ELF
index 56ceec4ef3bfb3e9ab2b0fa4ba06f210f01ebf4c..591d496d6cc2d679c94302cd3524dc25aed5ba62 100644 (file)
@@ -100,6 +100,7 @@ extern int arm_optimize_expr (expressionS *, operatorT, expressionS *);
 #ifdef OBJ_ELF
 #define md_end arm_md_end
 extern void arm_md_end (void);
+bfd_boolean arm_is_eabi (void);
 #endif
 
 /* NOTE: The fake label creation in stabs.c:s_stab_generic() has
@@ -122,7 +123,19 @@ extern void arm_md_end (void);
 
 #define ARM_IS_THUMB(s)                (ARM_GET_FLAG (s) & ARM_FLAG_THUMB)
 #define ARM_IS_INTERWORK(s)    (ARM_GET_FLAG (s) & ARM_FLAG_INTERWORK)
+#ifdef OBJ_ELF
+
+/* For ELF objects THUMB_IS_FUNC is inferred from
+   ARM_IS_TUMB and the function type.  */
+#define THUMB_IS_FUNC(s) \
+  ((arm_is_eabi () \
+    && (ARM_IS_THUMB (s)) \
+    && (symbol_get_bfdsym (s)->flags & BSF_FUNCTION)) \
+   || (ARM_GET_FLAG (s) & THUMB_FLAG_FUNC))
+
+#else
 #define THUMB_IS_FUNC(s)       (ARM_GET_FLAG (s) & THUMB_FLAG_FUNC)
+#endif
 
 #define ARM_SET_THUMB(s,t)      ((t) ? ARM_SET_FLAG (s, ARM_FLAG_THUMB)     : ARM_RESET_FLAG (s, ARM_FLAG_THUMB))
 #define ARM_SET_INTERWORK(s,t)  ((t) ? ARM_SET_FLAG (s, ARM_FLAG_INTERWORK) : ARM_RESET_FLAG (s, ARM_FLAG_INTERWORK))
index 2fea463c54efb95b0d54830e8b83bb12f815ea4f..a3db1df910a42343e3f53a4c0438ff829c976775 100644 (file)
@@ -429,6 +429,9 @@ between Arm and Thumb instructions and should be used even if
 interworking is not going to be performed.  The presence of this
 directive also implies @code{.thumb}
 
+This directive is not neccessary when generating EABI objects.  On these
+targets the encoding is implicit when generating Thumb code.
+
 @cindex @code{thumb_set} directive, ARM
 @item .thumb_set
 This performs the equivalent of a @code{.set} directive in that it
This page took 0.04203 seconds and 4 git commands to generate.