Commit 4d449554 by Jim Wilson

*** empty log message ***

From-SVN: r1022
parent 795068a4
...@@ -329,7 +329,8 @@ normal_comp_operator (op, mode) ...@@ -329,7 +329,8 @@ normal_comp_operator (op, mode)
if (GET_RTX_CLASS (code) != '<') if (GET_RTX_CLASS (code) != '<')
return 0; return 0;
if (GET_MODE (XEXP (op, 0)) == CCFPmode) if (GET_MODE (XEXP (op, 0)) == CCFPmode
|| GET_MODE (XEXP (op, 0)) == CCFPEmode)
return 1; return 1;
return (code != NE && code != EQ && code != GEU && code != LTU); return (code != NE && code != EQ && code != GEU && code != LTU);
...@@ -1915,8 +1916,9 @@ output_scc_insn (operands, insn) ...@@ -1915,8 +1916,9 @@ output_scc_insn (operands, insn)
it can easily be got. */ it can easily be got. */
/* Modes for condition codes. */ /* Modes for condition codes. */
#define C_MODES \ #define C_MODES \
((1 << (int) CCmode) | (1 << (int) CC_NOOVmode) | (1 << (int) CCFPmode)) ((1 << (int) CCmode) | (1 << (int) CC_NOOVmode) \
| (1 << (int) CCFPmode) | (1 << (int) CCFPEmode))
/* Modes for single-word (and smaller) quantities. */ /* Modes for single-word (and smaller) quantities. */
#define S_MODES \ #define S_MODES \
...@@ -2282,32 +2284,33 @@ output_cbranch (op, label, reversed, annul, noop) ...@@ -2282,32 +2284,33 @@ output_cbranch (op, label, reversed, annul, noop)
Because there is currently no concept of pre-delay slots, we can fix Because there is currently no concept of pre-delay slots, we can fix
this only by always emitting a nop before a floating point branch. */ this only by always emitting a nop before a floating point branch. */
if (mode == CCFPmode) if (mode == CCFPmode || mode == CCFPEmode)
strcpy (string, "nop\n\t"); strcpy (string, "nop\n\t");
/* If not floating-point or if EQ or NE, we can just reverse the code. */ /* If not floating-point or if EQ or NE, we can just reverse the code. */
if (reversed && (mode != CCFPmode || code == EQ || code == NE)) if (reversed
&& ((mode != CCFPmode && mode != CCFPEmode) || code == EQ || code == NE))
code = reverse_condition (code), reversed = 0; code = reverse_condition (code), reversed = 0;
/* Start by writing the branch condition. */ /* Start by writing the branch condition. */
switch (code) switch (code)
{ {
case NE: case NE:
if (mode == CCFPmode) if (mode == CCFPmode || mode == CCFPEmode)
strcat (string, "fbne"); strcat (string, "fbne");
else else
strcpy (string, "bne"); strcpy (string, "bne");
break; break;
case EQ: case EQ:
if (mode == CCFPmode) if (mode == CCFPmode || mode == CCFPEmode)
strcat (string, "fbe"); strcat (string, "fbe");
else else
strcpy (string, "be"); strcpy (string, "be");
break; break;
case GE: case GE:
if (mode == CCFPmode) if (mode == CCFPmode || mode == CCFPEmode)
{ {
if (reversed) if (reversed)
strcat (string, "fbul"); strcat (string, "fbul");
...@@ -2321,7 +2324,7 @@ output_cbranch (op, label, reversed, annul, noop) ...@@ -2321,7 +2324,7 @@ output_cbranch (op, label, reversed, annul, noop)
break; break;
case GT: case GT:
if (mode == CCFPmode) if (mode == CCFPmode || mode == CCFPEmode)
{ {
if (reversed) if (reversed)
strcat (string, "fbule"); strcat (string, "fbule");
...@@ -2333,7 +2336,7 @@ output_cbranch (op, label, reversed, annul, noop) ...@@ -2333,7 +2336,7 @@ output_cbranch (op, label, reversed, annul, noop)
break; break;
case LE: case LE:
if (mode == CCFPmode) if (mode == CCFPmode || mode == CCFPEmode)
{ {
if (reversed) if (reversed)
strcat (string, "fbug"); strcat (string, "fbug");
...@@ -2345,7 +2348,7 @@ output_cbranch (op, label, reversed, annul, noop) ...@@ -2345,7 +2348,7 @@ output_cbranch (op, label, reversed, annul, noop)
break; break;
case LT: case LT:
if (mode == CCFPmode) if (mode == CCFPmode || mode == CCFPEmode)
{ {
if (reversed) if (reversed)
strcat (string, "fbuge"); strcat (string, "fbuge");
......
...@@ -1236,23 +1236,26 @@ extern struct rtx_def *legitimize_pic_address (); ...@@ -1236,23 +1236,26 @@ extern struct rtx_def *legitimize_pic_address ();
subtract insn is used to set the condition code. Different branches are subtract insn is used to set the condition code. Different branches are
used in this case for some operations. used in this case for some operations.
We also have a mode to indicate that the relevant condition code is We also have two modes to indicate that the relevant condition code is
in the floating-point condition code. This really should be a separate in the floating-point condition code register. One for comparisons which
register, but we don't want to go to 65 registers. */ will generate an exception if the result is unordered (CCFPEmode) and
#define EXTRA_CC_MODES CC_NOOVmode, CCFPmode one for comparisons which will never trap (CCFPmode). This really should
be a separate register, but we don't want to go to 65 registers. */
#define EXTRA_CC_MODES CC_NOOVmode, CCFPmode, CCFPEmode
/* Define the names for the modes specified above. */ /* Define the names for the modes specified above. */
#define EXTRA_CC_NAMES "CC_NOOV", "CCFP" #define EXTRA_CC_NAMES "CC_NOOV", "CCFP", "CCFPE"
/* Given a comparison code (EQ, NE, etc.) and the first operand of a COMPARE, /* Given a comparison code (EQ, NE, etc.) and the first operand of a COMPARE,
return the mode to be used for the comparison. For floating-point, CCFPmode return the mode to be used for the comparison. For floating-point,
should be used. CC_NOOVmode should be used when the first operand is a CCFP[E]mode is 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 PLUS, MINUS, or NEG. CCmode should be used when no special processing is
needed. */ needed. */
#define SELECT_CC_MODE(OP,X) \ #define SELECT_CC_MODE(OP,X) \
(GET_MODE_CLASS (GET_MODE (X)) == MODE_FLOAT ? CCFPmode \ (GET_MODE_CLASS (GET_MODE (X)) == MODE_FLOAT \
: (GET_CODE (X) == PLUS || GET_CODE (X) == MINUS || GET_CODE (X) == NEG) \ ? ((OP == EQ || OP == NE) ? CCFPmode : CCFPEmode) \
? CC_NOOVmode : CCmode) : ((GET_CODE (X) == PLUS || GET_CODE (X) == MINUS || GET_CODE (X) == NEG) \
? CC_NOOVmode : CCmode))
/* A function address in a call instruction /* A function address in a call instruction
is a byte address (for indexing purposes) is a byte address (for indexing purposes)
......
...@@ -367,11 +367,35 @@ ...@@ -367,11 +367,35 @@
[(set_attr "type" "compare")]) [(set_attr "type" "compare")])
(define_insn "" (define_insn ""
[(set (reg:CCFPE 0)
(compare:CCFPE (match_operand:DF 0 "register_operand" "f")
(match_operand:DF 1 "register_operand" "f")))]
""
"fcmped %0,%1"
[(set_attr "type" "fpcmp")])
(define_insn ""
[(set (reg:CCFPE 0)
(compare:CCFPE (match_operand:SF 0 "register_operand" "f")
(match_operand:SF 1 "register_operand" "f")))]
""
"fcmpes %0,%1"
[(set_attr "type" "fpcmp")])
(define_insn ""
[(set (reg:CCFPE 0)
(compare:CCFPE (match_operand:TF 0 "register_operand" "f")
(match_operand:TF 1 "register_operand" "f")))]
""
"fcmpeq %0,%1"
[(set_attr "type" "fpcmp")])
(define_insn ""
[(set (reg:CCFP 0) [(set (reg:CCFP 0)
(compare:CCFP (match_operand:DF 0 "register_operand" "f") (compare:CCFP (match_operand:DF 0 "register_operand" "f")
(match_operand:DF 1 "register_operand" "f")))] (match_operand:DF 1 "register_operand" "f")))]
"" ""
"fcmped %0,%1" "fcmpd %0,%1"
[(set_attr "type" "fpcmp")]) [(set_attr "type" "fpcmp")])
(define_insn "" (define_insn ""
...@@ -379,7 +403,7 @@ ...@@ -379,7 +403,7 @@
(compare:CCFP (match_operand:SF 0 "register_operand" "f") (compare:CCFP (match_operand:SF 0 "register_operand" "f")
(match_operand:SF 1 "register_operand" "f")))] (match_operand:SF 1 "register_operand" "f")))]
"" ""
"fcmpes %0,%1" "fcmps %0,%1"
[(set_attr "type" "fpcmp")]) [(set_attr "type" "fpcmp")])
(define_insn "" (define_insn ""
...@@ -387,7 +411,7 @@ ...@@ -387,7 +411,7 @@
(compare:CCFP (match_operand:TF 0 "register_operand" "f") (compare:CCFP (match_operand:TF 0 "register_operand" "f")
(match_operand:TF 1 "register_operand" "f")))] (match_operand:TF 1 "register_operand" "f")))]
"" ""
"fcmpeq %0,%1" "fcmpq %0,%1"
[(set_attr "type" "fpcmp")]) [(set_attr "type" "fpcmp")])
;; The SEQ and SNE patterns are special because they can be done ;; The SEQ and SNE patterns are special because they can be done
......
...@@ -599,6 +599,42 @@ if [ -r ${LIB}/$file ]; then ...@@ -599,6 +599,42 @@ if [ -r ${LIB}/$file ]; then
fi fi
fi fi
# Fix non-ANSI memcpy declaration that conflicts with gcc's builtin
# declaration on Sun OS 4.x. We must only fix this on Sun OS 4.x, because
# many other systems have similar text but correct versions of the file.
# To ensure only Sun's is fixed, we grep for a likely unique string.
file=memory.h
if egrep '/\* @\(#\)memory.h 1.4 88/08/19 SMI; from S5R2 1.2 \*/' $file > /dev/null; then
if [ -r $file ] && [ ! -r ${LIB}/$file ]; then
cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file"
chmod +w ${LIB}/$file 2>/dev/null
fi
if [ -r ${LIB}/$file ]; then
echo Replacing $file
cat > ${LIB}/$file << EOF
/* This file was generated by fixincludes */
#ifndef __memory_h__
#define __memory_h__
#ifdef __STDC__
extern void *memccpy();
extern void *memchr();
extern void *memcpy();
extern void *memset();
#else
extern char *memccpy();
extern char *memchr();
extern char *memcpy();
extern char *memset();
#endif /* __STDC__ */
extern int memcmp();
#endif __memory_h__
EOF
fi
fi
echo 'Removing unneeded directories:' echo 'Removing unneeded directories:'
cd $LIB cd $LIB
files=`find . -type d -print | sort -r` files=`find . -type d -print | sort -r`
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment