Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Apr 2005 21:12:49 GMT
From:      Olivier Houchard <cognet@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 74614 for review
Message-ID:  <200504062112.j36LCngY082389@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=74614

Change 74614 by cognet@cognet on 2005/04/06 21:12:08

	Attempt to get more love from gcc. I don't think this is the right
	fix, and I should poke gcc people about that, but it seems to make
	an arm -O/-O2 world usable.
	Approved by:	mux (mentor)

Affected files ...

.. //depot/projects/arm/contrib-arm.diff#3 edit

Differences ...

==== //depot/projects/arm/contrib-arm.diff#3 (text+ko) ====

@@ -13,6 +13,53 @@
 +
 +unset STACK_ADDR
 +unset EMBEDDED
+Index: contrib/gcc/config/arm/arm.md
+===================================================================
+RCS file: /home/ncvs/src/contrib/gcc/config/arm/arm.md,v
+retrieving revision 1.1.1.6
+diff -u -p -r1.1.1.6 arm.md
+--- contrib/gcc/config/arm/arm.md	28 Jul 2004 03:11:35 -0000	1.1.1.6
++++ contrib/gcc/config/arm/arm.md	6 Apr 2005 20:06:06 -0000
+@@ -8834,12 +8834,12 @@
+ 	ldm[2] = operands[4];
+       }
+     if (GET_CODE (XEXP (operands[2], 0)) != REG)
+-      val1 = INTVAL (XEXP (XEXP (operands[2], 0), 1));
++	val1 = INTVAL (XEXP (XEXP (operands[2], 0), 1));
+     if (GET_CODE (XEXP (operands[3], 0)) != REG)
+-      val2 = INTVAL (XEXP (XEXP (operands[3], 0), 1));
++        val2 = INTVAL (XEXP (XEXP (operands[3], 0), 1));
+     arith[0] = operands[0];
+     arith[3] = operands[1];
+-    if (val1 < val2)
++    if (val1 <= val2)
+       {
+ 	arith[1] = ldm[1];
+ 	arith[2] = ldm[2];
+@@ -8869,7 +8869,7 @@
+ 	else
+ 	  output_asm_insn (\"ldm%?ia\\t%0, {%1, %2}\", ldm);
+       }
+-    else
++    else if (val2)
+       {
+ 	ldm[0] = XEXP (operands[2], 0);
+ 	if (val1 < val2)
+@@ -8877,6 +8877,14 @@
+ 	else
+ 	  output_asm_insn (\"ldm%?da\\t%0, {%1, %2}\", ldm);
+       }
++   else {
++	ldm[0] = operands[0];
++	ldm[1] = XEXP(operands[2], 0);
++	output_asm_insn(\"ldr\\t%0, [%1]\", ldm);
++	ldm[0] = operands[4];
++	ldm[1] = XEXP(operands[3], 0);
++	output_asm_insn(\"ldr\\t%0, [%1]\", ldm);
++   }
+     output_asm_insn (\"%I3%?\\t%0, %1, %2\", arith);
+     return \"\";
+   }"
 Index: contrib/gcc/config/arm/freebsd.h
 ===================================================================
 RCS file: /home/ncvs/src/contrib/gcc/config/arm/freebsd.h,v



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200504062112.j36LCngY082389>