Remove two Ada opcodes
authorTom Tromey <tom@tromey.com>
Mon, 8 Mar 2021 14:27:57 +0000 (07:27 -0700)
committerTom Tromey <tom@tromey.com>
Mon, 8 Mar 2021 14:28:41 +0000 (07:28 -0700)
The OP_ATR_MIN and OP_ATR_MAX constants aren't truly needed.
Internally, they are converted to BINOP_MIN and BINOP_MAX.  This patch
removes them in favor of simple reuse.

gdb/ChangeLog
2021-03-08  Tom Tromey  <tom@tromey.com>

* std-operator.def (OP_ATR_MIN, OP_ATR_MAX): Remove.
* ada-lang.c (ada_binop_minmax): Update.
* ada-exp.h (ada_binop_min_operation, ada_binop_max_operation):
Use BINOP_MIN and BINOP_MAX.

gdb/ChangeLog
gdb/ada-exp.h
gdb/ada-lang.c
gdb/std-operator.def

index c9328defa922f902a8edfbe941ca0362af68f396..541bd5f8191b079713be6c843ae5d0e9005f7f30 100644 (file)
@@ -1,3 +1,10 @@
+2021-03-08  Tom Tromey  <tom@tromey.com>
+
+       * std-operator.def (OP_ATR_MIN, OP_ATR_MAX): Remove.
+       * ada-lang.c (ada_binop_minmax): Update.
+       * ada-exp.h (ada_binop_min_operation, ada_binop_max_operation):
+       Use BINOP_MIN and BINOP_MAX.
+
 2021-03-08  Tom Tromey  <tom@tromey.com>
 
        * value.h (evaluate_subexp_with_coercion): Don't declare.
index 1ae0cbc354663767608ffda4bc3ff3ccb6d8ad80..0b6f1f22e79caef649756e30e587ccdb0fd5c195 100644 (file)
@@ -213,8 +213,8 @@ using ada_binop_div_operation = binop_operation<BINOP_DIV, ada_mult_binop>;
 using ada_binop_rem_operation = binop_operation<BINOP_REM, ada_mult_binop>;
 using ada_binop_mod_operation = binop_operation<BINOP_MOD, ada_mult_binop>;
 
-using ada_binop_min_operation = binop_operation<OP_ATR_MIN, ada_binop_minmax>;
-using ada_binop_max_operation = binop_operation<OP_ATR_MAX, ada_binop_minmax>;
+using ada_binop_min_operation = binop_operation<BINOP_MIN, ada_binop_minmax>;
+using ada_binop_max_operation = binop_operation<BINOP_MAX, ada_binop_minmax>;
 
 using ada_binop_exp_operation = binop_operation<BINOP_EXP, ada_binop_exp>;
 
index db7eba377cf37a9be1835ae17dfd5f1a525ede09..926e8c78557671ec96e5110bee7eac1990efcdd6 100644 (file)
@@ -10096,8 +10096,7 @@ ada_binop_minmax (struct type *expect_type,
   else
     {
       binop_promote (exp->language_defn, exp->gdbarch, &arg1, &arg2);
-      return value_binop (arg1, arg2,
-                         op == OP_ATR_MIN ? BINOP_MIN : BINOP_MAX);
+      return value_binop (arg1, arg2, op);
     }
 }
 
index 99b5d90381ae0152682b99ffe7e35e5b56dec111..c1d30918e0a130a7470a93c980acdf9c42d52133 100644 (file)
@@ -359,8 +359,6 @@ OP (OP_ATR_FIRST)
 OP (OP_ATR_LAST)
 OP (OP_ATR_LENGTH)
 OP (OP_ATR_IMAGE)
-OP (OP_ATR_MAX)
-OP (OP_ATR_MIN)
 OP (OP_ATR_MODULUS)
 OP (OP_ATR_POS)
 OP (OP_ATR_SIZE)
This page took 0.035222 seconds and 4 git commands to generate.