summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormiod <miod@openbsd.org>2013-06-04 19:00:56 +0000
committermiod <miod@openbsd.org>2013-06-04 19:00:56 +0000
commitc17904473e70385addae1db0f68ded58a24598a0 (patch)
tree4a8b177c3ff2333ce8b71bde6f1a0efcf092eb92
parentmake pf_change_ap() usable without a port. if the port pointer is NULL, (diff)
downloadwireguard-openbsd-c17904473e70385addae1db0f68ded58a24598a0.tar.xz
wireguard-openbsd-c17904473e70385addae1db0f68ded58a24598a0.zip
classify_integer(): test whether the value can be built using the `set'
instruction, before testing whether it can be built with `or.u'; this allows further optimization. condition_value(): handle ORDERED and UNORDERED condition codes. print_operand(): remove support for no longer used `w' qualifier.
-rw-r--r--gnu/gcc/gcc/config/m88k/m88k.c53
-rw-r--r--gnu/usr.bin/gcc/gcc/config/m88k/m88k.c55
2 files changed, 67 insertions, 41 deletions
diff --git a/gnu/gcc/gcc/config/m88k/m88k.c b/gnu/gcc/gcc/config/m88k/m88k.c
index 4701a9cbe27..fa9925c9083 100644
--- a/gnu/gcc/gcc/config/m88k/m88k.c
+++ b/gnu/gcc/gcc/config/m88k/m88k.c
@@ -164,10 +164,10 @@ classify_integer (enum machine_mode mode, int value)
return m88k_or_lo16;
else if (mode == QImode)
return m88k_or_lo8;
- else if ((value & 0xffff) == 0)
- return m88k_oru_hi16;
else if (integer_ok_for_set (value))
return m88k_set;
+ else if ((value & 0xffff) == 0)
+ return m88k_oru_hi16;
else
return m88k_oru_or;
}
@@ -179,17 +179,32 @@ condition_value (rtx condition)
{
switch (GET_CODE (condition))
{
- case EQ: return 2;
- case NE: return 3;
- case GT: return 4;
- case LE: return 5;
- case LT: return 6;
- case GE: return 7;
- case GTU: return 8;
- case LEU: return 9;
- case LTU: return 10;
- case GEU: return 11;
- default: gcc_unreachable ();
+ case UNORDERED:
+ return 0;
+ case ORDERED:
+ return 1;
+ case EQ:
+ return 2;
+ case NE:
+ return 3;
+ case GT:
+ return 4;
+ case LE:
+ return 5;
+ case LT:
+ return 6;
+ case GE:
+ return 7;
+ case GTU:
+ return 8;
+ case LEU:
+ return 9;
+ case LTU:
+ return 10;
+ case GEU:
+ return 11;
+ default:
+ gcc_unreachable ();
}
}
@@ -2235,12 +2250,6 @@ print_operand (FILE *file, rtx x, int code)
fprintf (file, "%d", value & 0xff);
return;
- case 'w': /* print the integer constant (X == 32 ? 0 : 32 - X) */
- if (xc != CONST_INT)
- output_operand_lossage ("invalid %%o value");
- fprintf (file, "%d", value == 32 ? 0 : 32 - value);
- return;
-
case 'p': /* print the logarithm of the integer constant */
if (xc != CONST_INT
|| (value = exact_log2 (value)) < 0)
@@ -2336,7 +2345,11 @@ print_operand (FILE *file, rtx x, int code)
fputs (m88k_register_prefix, file);
fputs ("gt0", file);
return;
- case LE: fputs ("0xe", file); return;
+ case LE:
+ if (0) /* SVR4 */
+ fputs (m88k_register_prefix, file);
+ fputs ("le0", file);
+ return;
case LT: fputs ("0x4", file); return;
case GE: fputs ("0xb", file); return;
default: output_operand_lossage ("invalid %%D value");
diff --git a/gnu/usr.bin/gcc/gcc/config/m88k/m88k.c b/gnu/usr.bin/gcc/gcc/config/m88k/m88k.c
index 24c41b7300f..7c745deedb7 100644
--- a/gnu/usr.bin/gcc/gcc/config/m88k/m88k.c
+++ b/gnu/usr.bin/gcc/gcc/config/m88k/m88k.c
@@ -60,7 +60,7 @@ rtx m88k_compare_op1; /* cmpsi operand 1 */
enum processor_type m88k_cpu; /* target cpu */
-static void m88k_frame_related PARAMS ((rtx, rtx, int));
+static void m88k_frame_related PARAMS ((rtx, rtx, HOST_WIDE_INT));
static void m88k_maybe_dead PARAMS ((rtx));
static void m88k_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT));
static int m88k_adjust_cost PARAMS ((rtx, rtx, rtx, int));
@@ -105,10 +105,10 @@ classify_integer (mode, value)
return m88k_or_lo16;
else if (mode == QImode)
return m88k_or_lo8;
- else if ((value & 0xffff) == 0)
- return m88k_oru_hi16;
else if (integer_ok_for_set (value))
return m88k_set;
+ else if ((value & 0xffff) == 0)
+ return m88k_oru_hi16;
else
return m88k_oru_or;
}
@@ -121,17 +121,32 @@ condition_value (condition)
{
switch (GET_CODE (condition))
{
- case EQ: return 2;
- case NE: return 3;
- case GT: return 4;
- case LE: return 5;
- case LT: return 6;
- case GE: return 7;
- case GTU: return 8;
- case LEU: return 9;
- case LTU: return 10;
- case GEU: return 11;
- default: abort ();
+ case UNORDERED:
+ return 0;
+ case ORDERED:
+ return 1;
+ case EQ:
+ return 2;
+ case NE:
+ return 3;
+ case GT:
+ return 4;
+ case LE:
+ return 5;
+ case LT:
+ return 6;
+ case GE:
+ return 7;
+ case GTU:
+ return 8;
+ case LEU:
+ return 9;
+ case LTU:
+ return 10;
+ case GEU:
+ return 11;
+ default:
+ abort ();
}
}
@@ -2818,12 +2833,6 @@ print_operand (file, x, code)
fprintf (file, "%d", value & 0xff);
return;
- case 'w': /* print the integer constant (X == 32 ? 0 : 32 - X) */
- if (xc != CONST_INT)
- output_operand_lossage ("invalid %%o value");
- fprintf (file, "%d", value == 32 ? 0 : 32 - value);
- return;
-
case 'p': /* print the logarithm of the integer constant */
if (xc != CONST_INT
|| (value = exact_log2 (value)) < 0)
@@ -2919,7 +2928,11 @@ print_operand (file, x, code)
fputs (m88k_register_prefix, file);
fputs ("gt0", file);
return;
- case LE: fputs ("0xe", file); return;
+ case LE:
+ if (0) /* SVR4 */
+ fputs (m88k_register_prefix, file);
+ fputs ("le0", file);
+ return;
case LT: fputs ("0x4", file); return;
case GE: fputs ("0xb", file); return;
default: output_operand_lossage ("invalid %%D value");