]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
emit-rtl.c (gen_reg_rtx): Simplify mapping of Complex type to component type using...
authorSteve Ellcey <sje@cup.hp.com>
Wed, 20 Nov 2002 21:52:59 +0000 (21:52 +0000)
committerSteve Ellcey <sje@gcc.gnu.org>
Wed, 20 Nov 2002 21:52:59 +0000 (21:52 +0000)
* emit-rtl.c (gen_reg_rtx): Simplify mapping of Complex type
to component type using GET_MODE_INNER.
* expr.c (emit_move_insn_1): Ditto.
* optabs.c (expand_binop): Ditto.
(expand_unop): Ditto.
(expand_complex_abs): Ditto.

From-SVN: r59317

gcc/ChangeLog
gcc/emit-rtl.c
gcc/expr.c
gcc/optabs.c

index 34903808fc9145ad5a2c08de51f1e88caaf96529..9dad96190236cc6f32c85391a436dc572843cf0b 100644 (file)
@@ -1,3 +1,12 @@
+2002-11-20  Steve Ellcey  <sje@cup.hp.com>
+
+       * emit-rtl.c (gen_reg_rtx): Simplify mapping of Complex type
+       to component type using GET_MODE_INNER.
+       * expr.c (emit_move_insn_1): Ditto.
+       * optabs.c (expand_binop): Ditto.
+       (expand_unop): Ditto.
+       (expand_complex_abs): Ditto.
+
 2002-11-20  Douglas B Rupp  <rupp@gnat.com>
 
        * hwint.h (HAVE___INT64): Fix typo (was HAVE__INT64).
index 2cf410706d8993d431c5bd858773ff192f773ec1..0d9be17fe94f6ff5f8cbaf96c70b2c5ca0f8b839 100644 (file)
@@ -802,12 +802,7 @@ gen_reg_rtx (mode)
         which makes much better code.  Besides, allocating DCmode
         pseudos overstrains reload on some machines like the 386.  */
       rtx realpart, imagpart;
-      int size = GET_MODE_UNIT_SIZE (mode);
-      enum machine_mode partmode
-       = mode_for_size (size * BITS_PER_UNIT,
-                        (GET_MODE_CLASS (mode) == MODE_COMPLEX_FLOAT
-                         ? MODE_FLOAT : MODE_INT),
-                        0);
+      enum machine_mode partmode = GET_MODE_INNER (mode);
 
       realpart = gen_reg_rtx (partmode);
       imagpart = gen_reg_rtx (partmode);
index a185311fcadd3ace28805983c43e5d5905180063..8dd9a8678b5b39e018b044f8eba75a3a2a0b9d42 100644 (file)
@@ -3152,11 +3152,7 @@ emit_move_insn_1 (x, y)
 
   /* Expand complex moves by moving real part and imag part, if possible.  */
   else if ((class == MODE_COMPLEX_FLOAT || class == MODE_COMPLEX_INT)
-          && BLKmode != (submode = mode_for_size ((GET_MODE_UNIT_SIZE (mode)
-                                                   * BITS_PER_UNIT),
-                                                  (class == MODE_COMPLEX_INT
-                                                   ? MODE_INT : MODE_FLOAT),
-                                                  0))
+          && BLKmode != (submode = GET_MODE_INNER (mode))
           && (mov_optab->handlers[(int) submode].insn_code
               != CODE_FOR_nothing))
     {
index 1551ff8e806ce6bd5dfb50b5d23d06214793ab9b..9da95e1de72116343c1a5be33a9bcf6740039726 100644 (file)
@@ -1531,10 +1531,7 @@ expand_binop (mode, binoptab, op0, op1, target, unsignedp, methods)
       int ok = 0;
 
       /* Find the correct mode for the real and imaginary parts */
-      enum machine_mode submode
-       = mode_for_size (GET_MODE_UNIT_SIZE (mode) * BITS_PER_UNIT,
-                        class == MODE_COMPLEX_INT ? MODE_INT : MODE_FLOAT,
-                        0);
+      enum machine_mode submode = GET_MODE_INNER(mode);
 
       if (submode == BLKmode)
        abort ();
@@ -2484,10 +2481,7 @@ expand_unop (mode, unoptab, op0, target, unsignedp)
       rtx seq;
 
       /* Find the correct mode for the real and imaginary parts */
-      enum machine_mode submode
-       = mode_for_size (GET_MODE_UNIT_SIZE (mode) * BITS_PER_UNIT,
-                        class == MODE_COMPLEX_INT ? MODE_INT : MODE_FLOAT,
-                        0);
+      enum machine_mode submode = GET_MODE_INNER (mode);
 
       if (submode == BLKmode)
        abort ();
@@ -2731,10 +2725,7 @@ expand_complex_abs (mode, op0, target, unsignedp)
   optab this_abs_optab;
 
   /* Find the correct mode for the real and imaginary parts.  */
-  enum machine_mode submode
-    = mode_for_size (GET_MODE_UNIT_SIZE (mode) * BITS_PER_UNIT,
-                    class == MODE_COMPLEX_INT ? MODE_INT : MODE_FLOAT,
-                    0);
+  enum machine_mode submode = GET_MODE_INNER (mode);
 
   if (submode == BLKmode)
     abort ();