summaryrefslogtreecommitdiffstats
path: root/gcc/rtlanal.c
diff options
context:
space:
mode:
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1997-11-02 21:19:36 +0000
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1997-11-02 21:19:36 +0000
commit0dbd1c7442aeabc3e63daf6f70f8fb136f0cf38e (patch)
tree46fe768360493f03f7282d07762e7b26c292aabd /gcc/rtlanal.c
parent638d2d6c66cb82345c84b92a46ebf9445c56204c (diff)
downloadppe42-gcc-0dbd1c7442aeabc3e63daf6f70f8fb136f0cf38e.tar.gz
ppe42-gcc-0dbd1c7442aeabc3e63daf6f70f8fb136f0cf38e.zip
Update mainline egcs to gcc2 snapshot 971021.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@16278 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/rtlanal.c')
-rw-r--r--gcc/rtlanal.c61
1 files changed, 49 insertions, 12 deletions
diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c
index c8b21b847c4..d311652d2ef 100644
--- a/gcc/rtlanal.c
+++ b/gcc/rtlanal.c
@@ -1,5 +1,5 @@
/* Analyze RTL for C-Compiler
- Copyright (C) 1987, 88, 9-5, 1996 Free Software Foundation, Inc.
+ Copyright (C) 1987, 88, 92-96, 1997 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -20,10 +20,10 @@ Boston, MA 02111-1307, USA. */
#include "config.h"
+#include <stdio.h>
#include "rtl.h"
-void note_stores ();
-int reg_set_p ();
+static int rtx_addr_can_trap_p PROTO((rtx));
/* Forward declarations */
@@ -109,6 +109,9 @@ rtx_varies_p (x)
/* The operand 0 of a LO_SUM is considered constant
(in fact is it related specifically to operand 1). */
return rtx_varies_p (XEXP (x, 1));
+
+ default:
+ break;
}
fmt = GET_RTX_FORMAT (code);
@@ -121,7 +124,7 @@ rtx_varies_p (x)
/* Return 0 if the use of X as an address in a MEM can cause a trap. */
-int
+static int
rtx_addr_can_trap_p (x)
register rtx x;
{
@@ -153,6 +156,9 @@ rtx_addr_can_trap_p (x)
case LO_SUM:
return rtx_addr_can_trap_p (XEXP (x, 1));
+
+ default:
+ break;
}
/* If it isn't one of the case above, it can cause a trap. */
@@ -278,6 +284,9 @@ reg_mentioned_p (reg, in)
case CONST_DOUBLE:
/* These are kept unique for a given value. */
return 0;
+
+ default:
+ break;
}
if (GET_CODE (reg) == code && rtx_equal_p (reg, in))
@@ -368,13 +377,13 @@ reg_referenced_p (x, body)
+ (UNITS_PER_WORD - 1)) / UNITS_PER_WORD)))
&& reg_overlap_mentioned_p (x, SET_DEST (body)))
return 1;
- break;
+ return 0;
case ASM_OPERANDS:
for (i = ASM_OPERANDS_INPUT_LENGTH (body) - 1; i >= 0; i--)
if (reg_overlap_mentioned_p (x, ASM_OPERANDS_INPUT (body, i)))
return 1;
- break;
+ return 0;
case CALL:
case USE:
@@ -389,10 +398,11 @@ reg_referenced_p (x, body)
for (i = XVECLEN (body, 0) - 1; i >= 0; i--)
if (reg_referenced_p (x, XVECEXP (body, 0, i)))
return 1;
- break;
+ return 0;
+
+ default:
+ return 0;
}
-
- return 0;
}
/* Nonzero if register REG is referenced in an insn between
@@ -443,7 +453,7 @@ static int reg_set_flag;
static void
reg_set_p_1 (x, pat)
- rtx x;
+ rtx x, pat;
{
/* We don't want to return 1 if X is a MEM that contains a register
within REG_SET_REG. */
@@ -521,6 +531,9 @@ modified_between_p (x, start, end)
case REG:
return reg_set_between_p (x, start, end);
+
+ default:
+ break;
}
fmt = GET_RTX_FORMAT (code);
@@ -573,6 +586,9 @@ modified_in_p (x, insn)
case REG:
return reg_set_p (x, insn);
+
+ default:
+ break;
}
fmt = GET_RTX_FORMAT (code);
@@ -753,6 +769,9 @@ refers_to_regno_p (regno, endregno, x, loc)
return 0;
x = SET_SRC (x);
goto repeat;
+
+ default:
+ break;
}
/* X does not match, so try its subexpressions. */
@@ -1408,6 +1427,9 @@ volatile_insn_p (x)
case ASM_OPERANDS:
if (MEM_VOLATILE_P (x))
return 1;
+
+ default:
+ break;
}
/* Recursively scan the operands of this expression. */
@@ -1471,6 +1493,9 @@ volatile_refs_p (x)
case ASM_OPERANDS:
if (MEM_VOLATILE_P (x))
return 1;
+
+ default:
+ break;
}
/* Recursively scan the operands of this expression. */
@@ -1543,6 +1568,9 @@ side_effects_p (x)
case ASM_OPERANDS:
if (MEM_VOLATILE_P (x))
return 1;
+
+ default:
+ break;
}
/* Recursively scan the operands of this expression. */
@@ -1611,16 +1639,20 @@ may_trap_p (x)
case MOD:
case UDIV:
case UMOD:
- if (! CONSTANT_P (XEXP (x, 1)))
+ if (! CONSTANT_P (XEXP (x, 1))
+ || GET_MODE_CLASS (GET_MODE (x)) == MODE_FLOAT)
return 1;
/* This was const0_rtx, but by not using that,
we can link this file into other programs. */
if (GET_CODE (XEXP (x, 1)) == CONST_INT && INTVAL (XEXP (x, 1)) == 0)
return 1;
+ break;
+
case EXPR_LIST:
/* An EXPR_LIST is used to represent a function call. This
certainly may trap. */
return 1;
+
default:
/* Any floating arithmetic may trap. */
if (GET_MODE_CLASS (GET_MODE (x)) == MODE_FLOAT)
@@ -1679,6 +1711,9 @@ inequality_comparisons_p (x)
case GE:
case GEU:
return 1;
+
+ default:
+ break;
}
len = GET_RTX_LENGTH (code);
@@ -1834,6 +1869,9 @@ replace_regs (x, reg_map, nregs, replace_dest)
SET_SRC (x) = replace_regs (SET_SRC (x), reg_map, nregs, 0);
return x;
+
+ default:
+ break;
}
fmt = GET_RTX_FORMAT (code);
@@ -1852,7 +1890,6 @@ replace_regs (x, reg_map, nregs, replace_dest)
return x;
}
-
/* Return 1 if X, the SRC_SRC of SET of (pc) contain a REG or MEM that is
not in the constant pool and not in the condition of an IF_THEN_ELSE. */
OpenPOWER on IntegriCloud