rtl.h (to_rtx_code): Remove.
authorGabriel Dos Reis <gdr@integrable-solutions.net>
Sat, 11 Jun 2005 22:30:16 +0000 (22:30 +0000)
committerGabriel Dos Reis <gdr@gcc.gnu.org>
Sat, 11 Jun 2005 22:30:16 +0000 (22:30 +0000)
        * rtl.h (to_rtx_code): Remove.
        * machmode.h (to_machine_mode): Likewise.
        * read-rtl.c (apply_mode_macro): Replace to_machine_mode with
        explicit cast.
        (apply_mode_maps): Likewise.
        (read_rtx_1): Likewise.
        (apply_code_macro): Replace to to_rtx_code with explicit cast.
        (check_code_macro): Likewise.
        (read_rtx_1): Likewise.

From-SVN: r100846

gcc/ChangeLog
gcc/machmode.h
gcc/read-rtl.c
gcc/rtl.h

index 01d52497b58a56a2618b0aa9036cd443ebf07656..4957e961f02786a3b34aae91c29ac954974bc89f 100644 (file)
@@ -1,3 +1,15 @@
+2005-06-11  Gabriel Dos Reis  <gdr@integrable-solutions.net>
+
+       * rtl.h (to_rtx_code): Remove.
+       * machmode.h (to_machine_mode): Likewise.
+       * read-rtl.c (apply_mode_macro): Replace to_machine_mode with
+       explicit cast.
+       (apply_mode_maps): Likewise.
+       (read_rtx_1): Likewise.
+       (apply_code_macro): Replace to to_rtx_code with explicit cast.
+       (check_code_macro): Likewise.
+       (read_rtx_1): Likewise.
+
 2005-06-11  Gabriel Dos Reis  <gdr@integrable-solutions.net>
 
        * c-typeck.c (convert_for_assignment): Avoid checking
index f8ff132372909671fa35edf0a3db9cd857f3816f..10016f86ac7089f116ef2af6e2556350239d1dda 100644 (file)
@@ -25,10 +25,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 /* Make an enum class that gives all the machine modes.  */
 #include "insn-modes.h"
 
-/* Given MODE as integer value, get the corresponding enum machine_mode
-   enumeration value.  */
-#define to_machine_mode(MODE)  ((enum machine_mode) (MODE))
-
 /* Get the name of mode MODE as a string.  */
 
 extern const char * const mode_name[NUM_MACHINE_MODES];
index 1312fc06d14b64db20feb8bb64878ab7eca263e3..1fa0896fd74cc33ac62cd3d0329f1d111ec5a3ea 100644 (file)
@@ -243,7 +243,7 @@ uses_mode_macro_p (rtx x, int mode)
 static void
 apply_mode_macro (rtx x, int mode)
 {
-  PUT_MODE (x, to_machine_mode (mode));
+  PUT_MODE (x, (enum machine_mode) mode);
 }
 
 /* Implementations of the macro_group callbacks for codes.  */
@@ -269,7 +269,7 @@ uses_code_macro_p (rtx x, int code)
 static void
 apply_code_macro (rtx x, int code)
 {
-  PUT_CODE (x, to_rtx_code (code));
+  PUT_CODE (x, (enum rtx_code) code);
 }
 
 /* Map a code or mode attribute string P to the underlying string for
@@ -363,7 +363,7 @@ apply_mode_maps (rtx x, struct map_value *mode_maps, struct mapping *macro,
 
          v = map_attr_string (pm->string, macro, value);
          if (v)
-           PUT_MODE (x, to_machine_mode (find_mode (v->string, infile)));
+           PUT_MODE (x, (enum machine_mode) find_mode (v->string, infile));
          else
            *unknown = pm->string;
          return;
@@ -1311,7 +1311,7 @@ check_code_macro (struct mapping *macro, FILE *infile)
   struct map_value *v;
   enum rtx_code bellwether;
 
-  bellwether = to_rtx_code (macro->values->number);
+  bellwether = (enum rtx_code) macro->values->number;
   for (v = macro->values->next; v != 0; v = v->next)
     if (strcmp (GET_RTX_FORMAT (bellwether), GET_RTX_FORMAT (v->number)) != 0)
       fatal_with_file_and_line (infile, "code macro `%s' combines "
@@ -1449,7 +1449,7 @@ read_rtx_1 (FILE *infile, struct map_value **mode_maps)
       check_code_macro (read_mapping (&codes, codes.macros, infile), infile);
       goto again;
     }
-  real_code = to_rtx_code (find_macro (&codes, tmp_char, infile));
+  real_code = (enum rtx_code) find_macro (&codes, tmp_char, infile);
   bellwether_code = BELLWETHER_CODE (real_code);
 
   /* If we end up with an insn expression then we free this space below.  */
@@ -1470,7 +1470,7 @@ read_rtx_1 (FILE *infile, struct map_value **mode_maps)
        mode = find_macro (&modes, tmp_char, infile);
       else
        mode = mode_attr_index (mode_maps, tmp_char);
-      PUT_MODE (return_rtx, to_machine_mode (mode));
+      PUT_MODE (return_rtx, (enum machine_mode) mode);
       if (GET_MODE (return_rtx) != mode)
        fatal_with_file_and_line (infile, "mode too large");
     }
index bbd1c62a421f851d6016e80a82f6a3a614212c73..69091ab36d06cddf8d264d7a645a06e340b30cbd 100644 (file)
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -51,8 +51,6 @@ enum rtx_code  {
 #define NUM_RTX_CODE ((int) LAST_AND_UNUSED_RTX_CODE)
                                /* The cast here, saves many elsewhere.  */
 
-#define to_rtx_code(CODE)    ((enum rtx_code) (CODE))
-
 /* Register Transfer Language EXPRESSIONS CODE CLASSES */
 
 enum rtx_class  {