This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] arc backend patches. Mainline.


Hi Giovanni,

As a matter of fact, you should always post patches for mainline first. Our
policy says that we always fix bugs on mainline and then, if and only if the
bug can be proven to be a regression, we (try to) backport them to the release
branches.

Are these bugs regressions? A regression is defined as a bug which appeared in
a later version of GCC, and was not present before. Usually we check up to GCC
2.95.

These bugs are regressions , they did not enable mainline / 3.4 to be built correctly even though 2.95 would build fine.


Ran the testsuite for mainline 20041510.


You must mention which target you built. I assume arc-elf? Was it a cross? On
which host?

Target : arc-elf32 Host : i686-linux-gnu



I cannot approve it, but the ChangeLog is wrongly formatted. Please, see a ChangeLog entry for any other patch and strictly copy the formatting including:

- The way the date is written (YYYY-MM-DD including the hypens)
- The number of spaces between date and name and name and e-mails.
- They way the entry is formatted, how the file names ad function names are
indicated.
- The single tabulation of indent.
- The way the PR number is written (no # sign)

Also, do not merge the patch together. Please send the patches separately like
you did for 3.4. You can still send them in a single mail, but then attacch
different files, each one which a patch and its ChangeLog.

Apologies , reworking the patches and sending them again attached below.


cheers
Ramana


--- Ramana Radhakrishnan codito ergo sum (www.codito.com)

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>


	 * arc.h (REGNO_OK_FOR_BASE_P,REGNO_OK_FOR_INDEX_P,
	  REG_OK_FOR_BASE, REG_OK_FOR_INDEX)  Fix for
	  PR17317 .  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

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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]