This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] some small fixes
- To: <gcc-patches at gcc dot gnu dot org>
- Subject: [PATCH] some small fixes
- From: Roman Zippel <zippel at linux-m68k dot org>
- Date: Sat, 2 Jun 2001 17:27:58 +0200 (CEST)
Hi,
I'm currently trying to get gcc for linux-m68k working again. I can
crosscompile again, but bootstrap fails at the 3rd stage.
Here are some small patches to get at least that far:
* dwarf2out.c: define default for ACCUMULATE_OUTGOING_ARGS
* emit-rtl.c (init_emit_once): add CCmode to CC0
* predict.c (expected_value_to_br_prob): simplify_rtx returns
const_true_rtx or const0_rtx
The first patch is only needed for 3.0, the other two for 3.0 and 3.1.
The first and third patch fix the problems mentioned in c/1795. I'm not
sure whether the second patch is really the correct fix, but without it
simplify_relational_operation() aborts for something like "(eq (cc0)
(symbol_ref:SI ..))" during simplify_rtx().
Finally the following patch for regclass.c is also needed for 3.0:
----------------------------
revision 1.119
date: 2001/05/09 13:40:49; author: aoliva; state: Exp; lines: +6 -1
* regclass.c (scan_one_insn): Update REG_N_REFS when optimizing
handling of two-address insns.
----------------------------
bye, Roman
Index: gcc/dwarf2out.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/dwarf2out.c,v
retrieving revision 1.242.2.19
diff -u -r1.242.2.19 dwarf2out.c
--- dwarf2out.c 2001/05/31 01:12:56 1.242.2.19
+++ dwarf2out.c 2001/06/02 15:00:38
@@ -57,6 +57,10 @@
#include "md5.h"
#include "tm_p.h"
+#ifndef ACCUMULATE_OUTGOING_ARGS
+#define ACCUMULATE_OUTGOING_ARGS 0
+#endif
+
/* DWARF2 Abbreviation Glossary:
CFA = Canonical Frame Address
a fixed address on the stack which identifies a call frame.
Index: gcc/emit-rtl.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/emit-rtl.c,v
retrieving revision 1.162.2.4
diff -u -r1.162.2.4 emit-rtl.c
--- emit-rtl.c 2001/05/14 17:49:55 1.162.2.4
+++ emit-rtl.c 2001/06/02 15:00:42
@@ -4109,7 +4109,7 @@
is in a union and some compilers can't initialize unions. */
pc_rtx = gen_rtx (PC, VOIDmode);
- cc0_rtx = gen_rtx (CC0, VOIDmode);
+ cc0_rtx = gen_rtx (CC0, CCmode);
stack_pointer_rtx = gen_raw_REG (Pmode, STACK_POINTER_REGNUM);
frame_pointer_rtx = gen_raw_REG (Pmode, FRAME_POINTER_REGNUM);
if (hard_frame_pointer_rtx == 0)
Index: gcc/predict.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/predict.c,v
retrieving revision 1.15.4.1
diff -u -r1.15.4.1 predict.c
--- predict.c 2001/05/12 20:32:37 1.15.4.1
+++ predict.c 2001/06/02 15:00:47
@@ -295,7 +295,7 @@
cond = simplify_rtx (cond);
/* Turn the condition into a scaled branch probability. */
- if (cond == const1_rtx)
+ if (cond == const_true_rtx)
cond = GEN_INT (PROB_VERY_LIKELY);
else if (cond == const0_rtx)
cond = GEN_INT (PROB_VERY_UNLIKELY);