aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1992-06-18 15:50:09 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1992-06-18 15:50:09 -0400
commitb565a3163d3682380536a2e6b0ebac6f59fa9a5e (patch)
treee8baf2e87bc967cacab1ed9fdb07f2ad0a3bbd72
parent7c0891a18faee70439f8fbe903f499f198af43c3 (diff)
downloadgcc-b565a3163d3682380536a2e6b0ebac6f59fa9a5e.zip
gcc-b565a3163d3682380536a2e6b0ebac6f59fa9a5e.tar.gz
gcc-b565a3163d3682380536a2e6b0ebac6f59fa9a5e.tar.bz2
*** empty log message ***
From-SVN: r1213
-rw-r--r--gcc/config/i386/i386.h2
-rw-r--r--gcc/config/pa/pa.c2
-rw-r--r--gcc/config/pa/pa.h2
-rw-r--r--gcc/config/rs6000/rs6000.h2
-rw-r--r--gcc/integrate.c5
-rw-r--r--gcc/loop.c34
-rw-r--r--gcc/protoize.c9
7 files changed, 33 insertions, 23 deletions
diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h
index 69ea279..847cf3e 100644
--- a/gcc/config/i386/i386.h
+++ b/gcc/config/i386/i386.h
@@ -1170,7 +1170,7 @@ while (0)
For floating-point equality comparisons, CCFPEQmode should be used.
VOIDmode should be used in all other cases. */
-#define SELECT_CC_MODE(OP,X) \
+#define SELECT_CC_MODE(OP,X,Y) \
(GET_MODE_CLASS (GET_MODE (X)) == MODE_FLOAT \
&& ((OP) == EQ || (OP) == NE) ? CCFPEQmode : CCmode)
diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c
index 653edd2..1d0a3c5 100644
--- a/gcc/config/pa/pa.c
+++ b/gcc/config/pa/pa.c
@@ -1631,7 +1631,7 @@ gen_compare_reg (code, x, y)
enum rtx_code code;
rtx x, y;
{
- enum machine_mode mode = SELECT_CC_MODE (code, x);
+ enum machine_mode mode = SELECT_CC_MODE (code, x, y);
rtx cc_reg = gen_rtx (REG, mode, 0);
emit_insn (gen_rtx (SET, VOIDmode, cc_reg,
diff --git a/gcc/config/pa/pa.h b/gcc/config/pa/pa.h
index d3a1357..ee28c2d 100644
--- a/gcc/config/pa/pa.h
+++ b/gcc/config/pa/pa.h
@@ -1288,7 +1288,7 @@ while (0)
should be used. CC_NOOVmode should be used when the first operand is a
PLUS, MINUS, or NEG. CCmode should be used when no special processing is
needed. */
-#define SELECT_CC_MODE(OP,X) \
+#define SELECT_CC_MODE(OP,X,Y) \
(GET_MODE_CLASS (GET_MODE (X)) == MODE_FLOAT ? CCFPmode : CCmode) \
/* A function address in a call instruction
diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h
index 094d4db..8b44a9a 100644
--- a/gcc/config/rs6000/rs6000.h
+++ b/gcc/config/rs6000/rs6000.h
@@ -1268,7 +1268,7 @@ struct rs6000_args {int words, fregno, nargs_prototype; };
CCEQmode should be used when we are doing an inequality comparison on
the result of a comparison. CCmode should be used in all other cases. */
-#define SELECT_CC_MODE(OP,X) \
+#define SELECT_CC_MODE(OP,X,Y) \
(GET_MODE_CLASS (GET_MODE (X)) == MODE_FLOAT ? CCFPmode \
: (OP) == GTU || (OP) == LTU || (OP) == GEU || (OP) == LEU ? CCUNSmode \
: (((OP) == EQ || (OP) == NE) && GET_RTX_CLASS (GET_CODE (X)) == '<' \
diff --git a/gcc/integrate.c b/gcc/integrate.c
index a10f483..367d76f 100644
--- a/gcc/integrate.c
+++ b/gcc/integrate.c
@@ -2376,6 +2376,11 @@ subst_constants (loc, insn, map)
op_mode = GET_MODE (XEXP (x, 1));
new = simplify_relational_operation (code, op_mode,
XEXP (x, 0), XEXP (x, 1));
+#ifdef FLOAT_STORE_FLAG_VALUE
+ if (new != 0 && GET_MODE_CLASS (GET_MODE (x)) == MODE_FLOAT)
+ new = ((new == const0_rtx) ? CONST0_RTX (GET_MODE (x))
+ : immed_real_const_1 (FLOAT_STORE_FLAG_VALUE, GET_MODE (x)));
+#endif
break;
}
diff --git a/gcc/loop.c b/gcc/loop.c
index 24dff2d..c3007c8 100644
--- a/gcc/loop.c
+++ b/gcc/loop.c
@@ -6254,18 +6254,32 @@ get_condition (jump, earliest)
enum machine_mode inner_mode = GET_MODE (SET_SRC (set));
if ((GET_CODE (SET_SRC (set)) == COMPARE
- || ((code == NE
- || (code == LT
- && GET_MODE_BITSIZE (inner_mode) <= HOST_BITS_PER_INT
- && (STORE_FLAG_VALUE
- & (1 << (GET_MODE_BITSIZE (inner_mode) - 1)))))
+ || (((code == NE
+ || (code == LT
+ && GET_MODE_CLASS (inner_mode) == MODE_INT
+ && GET_MODE_BITSIZE (inner_mode) <= HOST_BITS_PER_INT
+ && (STORE_FLAG_VALUE
+ & (1 << (GET_MODE_BITSIZE (inner_mode) - 1))))
+#ifdef FLOAT_STORE_FLAG_VALUE
+ || (code == LT
+ && GET_MODE_CLASS (inner_mode) == MODE_FLOAT
+ && FLOAT_STORE_FLAG_VALUE < 0)
+#endif
+ ))
&& GET_RTX_CLASS (GET_CODE (SET_SRC (set))) == '<')))
x = SET_SRC (set);
- else if ((code == EQ
- || (code == GE
- && GET_MODE_BITSIZE (inner_mode) <= HOST_BITS_PER_INT
- && (STORE_FLAG_VALUE
- & (1 << (GET_MODE_BITSIZE (inner_mode) - 1)))))
+ else if (((code == EQ
+ || (code == GE
+ && GET_MODE_BITSIZE (inner_mode) <= HOST_BITS_PER_INT
+ && GET_MODE_CLASS (inner_mode) == MODE_INT
+ && (STORE_FLAG_VALUE
+ & (1 << (GET_MODE_BITSIZE (inner_mode) - 1))))
+#ifdef FLOAT_STORE_FLAG_VALUE
+ || (code == GE
+ && GET_MODE_CLASS (inner_mode) == MODE_FLOAT
+ && FLOAT_STORE_FLAG_VALUE < 0)
+#eneif
+ ))
&& GET_RTX_CLASS (GET_CODE (SET_SRC (set))) == '<')
{
/* We might have reversed a LT to get a GE here. But this wasn't
diff --git a/gcc/protoize.c b/gcc/protoize.c
index 0850924..53ae866 100644
--- a/gcc/protoize.c
+++ b/gcc/protoize.c
@@ -194,15 +194,6 @@ extern char * strrchr ();
#define STRINGIFY(STRING) "STRING"
#endif
-/* POSIX systems will not have definitions for WIFEXITED or WEXITSTATUS.
- Define them correctly and so that they work for all environments. */
-
-#undef WIFEXITED
-#define WIFEXITED(status_word) ((*((int *)&status_word) & 0xff) == 0x00)
-
-#undef WEXITSTATUS
-#define WEXITSTATUS(status_word) ((*((int *)&status_word) & 0xff00) >> 8)
-
/* Define a default place to find the SYSCALLS.X file. */
#ifndef STD_PROTO_DIR