initfini.c (__init): Use a full word immediate for __fini...

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
This commit is contained in:
Andrew Haley 1999-07-26 12:19:16 +00:00 committed by Andrew Haley
parent dd18ae5606
commit 63063278a7
3 changed files with 12 additions and 3 deletions

View 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.

View 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\
");

View 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.