diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2004-04-06 10:21:50 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2004-04-06 10:21:50 +0000 |
commit | 099b7a05f2a3d685b23f53565c930a72ca60fffc (patch) | |
tree | dce32eef4e5d89a625ff9562210a31b8aa515ee3 /gnu | |
parent | 5bfb495f857af848988b9cbbb35a593fe4e5bdeb (diff) |
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...
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/egcs/gcc/config/m88k/m88k.md | 12 |
1 files changed, 6 insertions, 6 deletions
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)); }") |