This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] arc backend patches. Mainline.
- From: Ramana Radhakrishnan <ramana dot radhakrishnan at codito dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 18 Oct 2004 12:18:40 +0530
- Subject: [PATCH] arc backend patches. Mainline.
Hi ,
These are the patches for PRs 17317 and 17889 applicable on mainline as
well. We had first observed these on the 3.4 branch. However these are
visible also on the mainline.
Ran the testsuite for mainline 20041510.
Ok to commit ?
regards
Ramana
ChangeLog:
20041018 - Ramana Radhakrishnan <ramana.radhakrishnan@codito.com>
arc.h:
* PR#17317 / Update
REGNO_OK_FOR_BASE,REGNO_OK_FOR_INDEX,REG_OK_FOR_BASE, REG_OK_FOR_INDEX
to accept blink as a valid operand.
* Update copyright years
* Rename Argonaut RISC Cores to ARCtangent A4 cpu which is how the
processor is referred to currently.
arc.c:
* Update copyright years
* Rename Argonaut RISC Cores to ARCtangent A4 cpu which is how the
processor is referred to currently.
t-arc:
* Fix multilib build problem (Reported as PR#17889)
lib1funcs.asm:
* Update copyright years.
* __umulsidi3 : Fixed so that the sign bits are set for the Carry flag
to be used correctly.
Index: arc.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/arc/arc.c,v
retrieving revision 1.62
diff -a -u -r1.62 arc.c
--- arc.c 18 Sep 2004 19:19:30 -0000 1.62
+++ arc.c 18 Oct 2004 06:31:40 -0000
@@ -1,4 +1,4 @@
-/* Subroutines used for code generation on the Argonaut ARC cpu.
+/* Subroutines used for code generation on the ARCtangent A4 cpu.
Copyright (C) 1994, 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
2004
Free Software Foundation, Inc.
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 06:31:43 -0000
@@ -1,4 +1,4 @@
-/* Definitions of target machine for GNU compiler, Argonaut ARC cpu.
+/* Definitions of target machine for GNU compiler, ARCtangent A4 cpu.
Copyright (C) 1994, 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2004
Free Software Foundation, Inc.
@@ -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
Index: arc.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/arc/arc.md,v
retrieving revision 1.13
diff -a -u -r1.13 arc.md
--- arc.md 18 Sep 2004 19:19:30 -0000 1.13
+++ arc.md 18 Oct 2004 06:31:46 -0000
@@ -1,4 +1,4 @@
-;; Machine description of the Argonaut ARC cpu for GNU C compiler
+;; Machine description of the ARCtangent A4 cpu for GNU C compiler
;; Copyright (C) 1994, 1997, 1998, 1999, 2000, 2004
;; Free Software Foundation, Inc.
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 06:31:47 -0000
@@ -1,6 +1,7 @@
; libgcc routines for ARC cpu.
-/* Copyright (C) 1995, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1997,1998,1999,2000,2001,2002,2003,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
@@ -88,9 +89,12 @@
sub.f 0,r0,0 ; while (a)
nop
beq.nd .Ldone
- and.f 0,r0,1 ; if (a & 1)
- add.nz r4,r4,r1 ; r += b
- adc.nz r3,r3,r2
+ and.f 0,r0,1
+ nop
+ bz.nd .Ldontadd ; if (a & 1)
+ add.f r4,r4,r1 ; r += b
+ adc r3,r3,r2
+.Ldontadd:
lsr r0,r0 ; a >>= 1
lsl.f r1,r1 ; b <<= 1
b.d .Lloop
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 18 Oct 2004 06:31:47 -0000
@@ -26,46 +26,18 @@
# .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
+ -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 -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
+LIBGCC = stmp-multilib
+INSTALL_LIBGCC = install-multilib