From 099b7a05f2a3d685b23f53565c930a72ca60fffc Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Tue, 6 Apr 2004 10:21:50 +0000 Subject: When optimizing a logical arithmetic operation, which operands are both comparisons using different operators, make sure to generate an insn with the correct mode. This means that constructs like if (c != -1 & i < 9999) and if ((i<=7) | (value != 0)) as found in transfig and teTeX, respectively, will now compile with optimization. Note the single & or | in these constructs - this kind is rare enough for this bug to have remained unnoticed until now... --- gnu/egcs/gcc/config/m88k/m88k.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'gnu/egcs') diff --git a/gnu/egcs/gcc/config/m88k/m88k.md b/gnu/egcs/gcc/config/m88k/m88k.md index 3549dd22b07..11a782dc8e1 100644 --- a/gnu/egcs/gcc/config/m88k/m88k.md +++ b/gnu/egcs/gcc/config/m88k/m88k.md @@ -445,7 +445,7 @@ int cv1 = condition_value (operands[1]); int cv2 = condition_value (operands[3]); - operands[4] = gen_rtx (ROTATE, CCmode, operands[4], + operands[4] = gen_rtx (ROTATE, CCEVENmode, operands[4], GEN_INT (((cv2 & ~1) - (cv1 & ~1)) & 0x1f)); /* Reverse the condition if needed. */ if ((cv1 & 1) != (cv2 & 1)) @@ -478,7 +478,7 @@ int cv1 = condition_value (operands[1]); int cv2 = condition_value (operands[3]); - operands[4] = gen_rtx (ROTATE, CCmode, operands[4], + operands[4] = gen_rtx (ROTATE, CCEVENmode, operands[4], GEN_INT ((cv2 - cv1) & 0x1f)); }") @@ -509,7 +509,7 @@ int cv1 = condition_value (operands[1]); int cv2 = condition_value (operands[3]); - operands[2] = gen_rtx (ROTATE, CCmode, operands[2], + operands[2] = gen_rtx (ROTATE, CCEVENmode, operands[2], GEN_INT (((cv1 & ~1) - (cv2 & ~1)) & 0x1f)); }") @@ -597,7 +597,7 @@ /* Make the condition pairs line up by rotating the compare word. */ int cv1 = condition_value (operands[1]); int cv2 = condition_value (operands[3]); - operands[4] = gen_rtx (ROTATE, CCmode, operands[4], + operands[4] = gen_rtx (ROTATE, CCEVENmode, operands[4], GEN_INT (((cv2 & ~1) - (cv1 & ~1)) & 0x1f)); /* Reverse the condition if needed. */ if ((cv1 & 1) != (cv2 & 1)) @@ -629,7 +629,7 @@ /* Make the condition pairs line up by rotating the compare word. */ int cv1 = condition_value (operands[1]); int cv2 = condition_value (operands[3]); - operands[4] = gen_rtx (ROTATE, CCmode, operands[4], + operands[4] = gen_rtx (ROTATE, CCEVENmode, operands[4], GEN_INT ((cv2 - cv1) & 0x1f)); }") @@ -659,7 +659,7 @@ /* Make the condition pairs line up by rotating the compare word. */ int cv1 = condition_value (operands[1]); int cv2 = condition_value (operands[3]); - operands[2] = gen_rtx (ROTATE, CCmode, operands[2], + operands[2] = gen_rtx (ROTATE, CCEVENmode, operands[2], GEN_INT (((cv1 & ~1) - (cv2 & ~1)) & 0x1f)); }") -- cgit v1.2.3