]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
initfini.c (__init): Use a full word immediate for __fini...
authorAndrew Haley <aph@cygnus.com>
Mon, 26 Jul 1999 12:19:16 +0000 (12:19 +0000)
committerAndrew Haley <aph@gcc.gnu.org>
Mon, 26 Jul 1999 12:19:16 +0000 (12:19 +0000)
1999-07-26  Andrew Haley  <aph@cygnus.com>

* config/m32r/initfini.c (__init): Use a full word immediate for
__fini: this allows it to be placed in any memory region.

* config/m32r/t-m32r: Compile crtinit.o and crtfini.o for
-mmodel=medium.  This is OK for all memory models.

From-SVN: r28266

gcc/ChangeLog
gcc/config/m32r/initfini.c
gcc/config/m32r/t-m32r

index 2b5ce97a7645f1abcfa57566caae19427f10b54f..6b34124a063e47b6617b589daf50ae3060d88826 100644 (file)
@@ -1,3 +1,11 @@
+1999-07-26  Andrew Haley  <aph@cygnus.com>
+
+       * config/m32r/initfini.c (__init): Use a full word immediate for
+       __fini: this allows it to be placed in any memory region.
+
+       * config/m32r/t-m32r: Compile crtinit.o and crtfini.o for
+       -mmodel=medium.  This is OK for all memory models.
+
 Mon Jul 26 11:58:46 1999  Nick Clifton  <nickc@cygnus.com>
 
        * config/arm/arm.c: Replace %R%s in asm_fprintf strings with %r.
index 51444279e52b080efa574230ae5ea4c3a8eafec1..4198e571c75d9a44c8c713723c51347904626e6d 100644 (file)
@@ -88,7 +88,8 @@ __init:\n\
        push fp\n\
        push lr\n\
        mv fp,sp\n\
-       ld24 r0,#__fini\n\
+       seth r0, #shigh(__fini)\n\
+       add3 r0, r0, #low(__fini)\n\
        bl atexit\n\
        .fillinsn\n\
 ");
index 3d8da58c1160a8d12afd4a008a64fe6cfb97e799..4b8f417efa0e9f9292ec37e702caeedec06bd9e8 100644 (file)
@@ -32,12 +32,12 @@ CRTSTUFF_T_CFLAGS =
 crtinit.o: $(srcdir)/config/m32r/initfini.c $(GCC_PASSES) $(CONFIG_H)
        $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(CRTSTUFF_T_CFLAGS) \
          -DCRT_INIT -finhibit-size-directive -fno-inline-functions \
-         -g0 -c $(srcdir)/config/m32r/initfini.c -o crtinit.o
+         -g0 -mmodel=medium -c $(srcdir)/config/m32r/initfini.c -o crtinit.o
 
 crtfini.o: $(srcdir)/config/m32r/initfini.c $(GCC_PASSES) $(CONFIG_H)
        $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(CRTSTUFF_T_CFLAGS) \
          -DCRT_FINI -finhibit-size-directive -fno-inline-functions \
-         -g0 -c $(srcdir)/config/m32r/initfini.c -o crtfini.o
+         -g0 -mmodel=medium -c $(srcdir)/config/m32r/initfini.c -o crtfini.o
 
 
 # -mmodel={small,medium} requires separate libraries.