This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] arc backend patches. Mainline.
Giovanni Bajo wrote:
<snip>
Really , it was not all that hard. Should remind myself never to create
patches when I am a bit sleepy. I hope this works out fine.
BTW, I'll commit the patches for you if they get approved, so I'll fix up
remaining problems in ChangeLogs if any.
Thanks for your comments . In any case these are trivial fixes which can
be committed as obvious.
cheers
Ramana
ChangeLog:
2004-10-18 Ramana Radhakrishnan <ramana.radhakrishnan@codito.com>
* config/arc/lib1funcs.asm(___umulsidi3): Correct usage of flags
Index: lib1funcs.asm
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/arc/lib1funcs.asm,v
retrieving revision 1.5
diff -a -u -r1.5 lib1funcs.asm
--- lib1funcs.asm 27 Sep 2003 04:48:13 -0000 1.5
+++ lib1funcs.asm 18 Oct 2004 12:09:40 -0000
@@ -1,6 +1,6 @@
; libgcc routines for ARC cpu.
-/* Copyright (C) 1995, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1997,2004 Free Software Foundation, Inc.
This file is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
@@ -89,8 +89,12 @@
nop
beq.nd .Ldone
and.f 0,r0,1 ; if (a & 1)
- add.nz r4,r4,r1 ; r += b
- adc.nz r3,r3,r2
+ cmp r0,0
+ nop
+ beq .Ldontadd
+ add.f r4,r4,r1 ; r += b
+ adc r3,r3,r2
+.L dontadd:
lsr r0,r0 ; a >>= 1
lsl.f r1,r1 ; b <<= 1
b.d .Lloop
ChangeLog:
2004-10-18 Ramana Radhakrishnan <ramana.radhakrishnan@codito.com>
PR target/17317
* config/arc/arc.h (REGNO_OK_FOR_BASE_P,REGNO_OK_FOR_INDEX_P,
REG_OK_FOR_BASE, REG_OK_FOR_INDEX): Consider blink(r31) as a valid
base and index register for loads.
Index: arc.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/arc/arc.h,v
retrieving revision 1.80
diff -a -u -r1.80 arc.h
--- arc.h 8 Sep 2004 18:45:02 -0000 1.80
+++ arc.h 18 Oct 2004 12:11:48 -0000
@@ -456,9 +456,9 @@
Since they use reg_renumber, they are safe only once reg_renumber
has been allocated, which happens in local-alloc.c. */
#define REGNO_OK_FOR_BASE_P(REGNO) \
-((REGNO) < 29 || (unsigned) reg_renumber[REGNO] < 29)
+((REGNO) < 32 || (unsigned) reg_renumber[REGNO] < 32)
#define REGNO_OK_FOR_INDEX_P(REGNO) \
-((REGNO) < 29 || (unsigned) reg_renumber[REGNO] < 29)
+((REGNO) < 32 || (unsigned) reg_renumber[REGNO] < 32)
/* Given an rtx X being reloaded into a reg required to be
in class CLASS, return the class of reg to actually use.
@@ -820,11 +820,11 @@
/* Nonzero if X is a hard reg that can be used as an index
or if it is a pseudo reg. */
#define REG_OK_FOR_INDEX_P(X) \
-((unsigned) REGNO (X) - 29 >= FIRST_PSEUDO_REGISTER - 29)
+((unsigned) REGNO (X) - 32 >= FIRST_PSEUDO_REGISTER - 32)
/* Nonzero if X is a hard reg that can be used as a base reg
or if it is a pseudo reg. */
#define REG_OK_FOR_BASE_P(X) \
-((unsigned) REGNO (X) - 29 >= FIRST_PSEUDO_REGISTER - 29)
+((unsigned) REGNO (X) - 32 >= FIRST_PSEUDO_REGISTER - 32)
#else
ChangeLog:
2004-10-18 Ramana Radhakrishnan <ramana.radhakrishnan@codito.com>
* config/arc/t-arc: Fix multilib handling
Index: t-arc
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/arc/t-arc,v
retrieving revision 1.7
diff -a -u -r1.7 t-arc
--- t-arc 9 Jul 2003 21:25:40 -0000 1.7
+++ t-arc 5 Sep 2004 11:23:57 -0000
@@ -26,46 +26,16 @@
# .init/.fini section routines
-crtinit.o: $(srcdir)/config/arc/initfini.c $(GCC_PASSES) $(CONFIG_H)
+$(T)crtinit.o: $(srcdir)/config/arc/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/arc/initfini.c -o crtinit.o
+ $(MULTILIB_CFLAGS) -DCRT_INIT -finhibit-size-directive -fno-inline-functions \
+ -g0 -c $(srcdir)/config/arc/initfini.c -o $(T)crtinit.o
-crtfini.o: $(srcdir)/config/arc/initfini.c $(GCC_PASSES) $(CONFIG_H)
+$(T)crtfini.o: $(srcdir)/config/arc/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/arc/initfini.c -o crtfini.o
+ -DCRT_FINI $(MULTILIB_CFLAGS) -finhibit-size-directive -fno-inline-functions \
+ -g0 -c $(srcdir)/config/arc/initfini.c -o $(T)crtfini.o
MULTILIB_OPTIONS = EB
MULTILIB_DIRNAMES = be
-
-# We need our own versions to build multiple copies of crt*.o.
-# ??? Use new support in Makefile.
-
-LIBGCC = stmp-multilib-arc
-INSTALL_LIBGCC = install-multilib-arc
-
-stmp-multilib-arc: stmp-multilib
- for i in `$(GCC_FOR_TARGET) --print-multi-lib`; do \
- dir=`echo $$i | sed -e 's/;.*$$//'`; \
- flags=`echo $$i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \
- $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
- CC="$(CC)" CFLAGS="$(CFLAGS)" \
- BUILD_PREFIX="$(BUILD_PREFIX)" BUILD_PREFIX_1="$(BUILD_PREFIX_1)" \
- GCC_CFLAGS="$(GCC_CFLAGS) $${flags}" \
- INCLUDES="$(INCLUDES)" CRTSTUFF_T_CFLAGS=$(CRTSTUFF_T_CFLAGS) \
- dir="$${dir}" crtinit.o crtfini.o; \
- if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
- done
- touch stmp-multilib-arc
-
-install-multilib-arc: install-multilib
- for i in `$(GCC_FOR_TARGET) --print-multi-lib`; do \
- dir=`echo $$i | sed -e 's/;.*$$//'`; \
- rm -f $(DESTDIR)$(libsubdir)/$${dir}/crtinit.o; \
- $(INSTALL_DATA) $${dir}/crtinit.o $(DESTDIR)$(libsubdir)/$${dir}/crtinit.o; \
- chmod a-x $(DESTDIR)$(libsubdir)/$${dir}/crtinit.o; \
- rm -f $(DESTDIR)$(libsubdir)/$${dir}/crtfini.o; \
- $(INSTALL_DATA) $${dir}/crtfini.o $(DESTDIR)$(libsubdir)/$${dir}/crtfini.o; \
- chmod a-x $(DESTDIR)$(libsubdir)/$${dir}/crtfini.o; \
- done
+EXTRA_MULTILIB_PARTS = crtinit.o crtfini.o