* config/xtensa/xtensa.h (CRT_CALL_STATIC_FUNCTION): Define.
authorBob Wilson <bob.wilson@acm.org>
Thu, 10 Jul 2003 00:22:51 +0000 (00:22 +0000)
committerBob Wilson <bwilson@gcc.gnu.org>
Thu, 10 Jul 2003 00:22:51 +0000 (00:22 +0000)
From-SVN: r69165

gcc/ChangeLog
gcc/config/xtensa/xtensa.h

index 683a24e7767437b6e001e0b9b3224b71b14a24de..69d1beb9b366ad0119751d19582be9721c86772c 100644 (file)
@@ -1,3 +1,7 @@
+2003-07-09  Bob Wilson  <bob.wilson@acm.org>
+
+       * config/xtensa/xtensa.h (CRT_CALL_STATIC_FUNCTION): Define.
+
 2003-07-09  Aldy Hernandez  <aldyh@redhat.com>
 
        PR/11144
index 5f5e112cd851e72760be262a7c32655061d98cb9..558084b7292faa456679f80371293f6aa8dccb94 100644 (file)
@@ -1482,3 +1482,13 @@ typedef struct xtensa_args {
 /* Exception handling TODO!! */
 #define DWARF_UNWIND_INFO 0
 
+/* Xtensa constant pool breaks the devices in crtstuff.c to control
+   section in where code resides.  We have to write it as asm code.  Use
+   a MOVI and let the assembler relax it -- for the .init and .fini
+   sections, the assembler knows to put the literal in the right
+   place.  */
+#define CRT_CALL_STATIC_FUNCTION(SECTION_OP, FUNC) \
+    asm (SECTION_OP "\n\
+       movi\ta8, " USER_LABEL_PREFIX #FUNC "\n\
+       callx8\ta8\n" \
+       TEXT_SECTION_ASM_OP);