aboutsummaryrefslogtreecommitdiff
path: root/gcc/read-rtl.c
diff options
context:
space:
mode:
authorGabriel Dos Reis <gdr@cs.tamu.edu>2005-06-09 17:41:37 +0000
committerGabriel Dos Reis <gdr@gcc.gnu.org>2005-06-09 17:41:37 +0000
commit8562f05c95361a5a232e19ca6871c9cf6dcc4749 (patch)
treeb3762385888427b63671b9ef7c72ac900943b344 /gcc/read-rtl.c
parentc8d3810f9388b4670b8a5c2d3d82f293c5a6fde7 (diff)
downloadgcc-8562f05c95361a5a232e19ca6871c9cf6dcc4749.zip
gcc-8562f05c95361a5a232e19ca6871c9cf6dcc4749.tar.gz
gcc-8562f05c95361a5a232e19ca6871c9cf6dcc4749.tar.bz2
machmode.h (to_machine_mode): New.
* machmode.h (to_machine_mode): New. * rtl.h (to_rtx_code): Likewise. * read-rtl.c (apply_mode_macro): Convert mode to machine_mode. (print_c_condition): Convert return value of htab_find(). (apply_code_macro): Add explicit cast when convertin to enums. (apply_mode_maps): Likewise. (check_code_macro): Likewise. (read_rtx_1): Likewise. From-SVN: r100804
Diffstat (limited to 'gcc/read-rtl.c')
-rw-r--r--gcc/read-rtl.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/gcc/read-rtl.c b/gcc/read-rtl.c
index efd1dd4..1312fc0 100644
--- a/gcc/read-rtl.c
+++ b/gcc/read-rtl.c
@@ -243,7 +243,7 @@ uses_mode_macro_p (rtx x, int mode)
static void
apply_mode_macro (rtx x, int mode)
{
- PUT_MODE (x, mode);
+ PUT_MODE (x, to_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, code);
+ PUT_CODE (x, to_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, find_mode (v->string, infile));
+ PUT_MODE (x, to_machine_mode (find_mode (v->string, infile)));
else
*unknown = pm->string;
return;
@@ -798,7 +798,7 @@ join_c_conditions (const char *cond1, const char *cond2)
void
print_c_condition (const char *cond)
{
- const void **halves = htab_find (joined_conditions, &cond);
+ const char **halves = (const char **) htab_find (joined_conditions, &cond);
if (halves != 0)
{
printf ("(");
@@ -1311,7 +1311,7 @@ check_code_macro (struct mapping *macro, FILE *infile)
struct map_value *v;
enum rtx_code bellwether;
- bellwether = macro->values->number;
+ bellwether = to_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 = find_macro (&codes, tmp_char, infile);
+ real_code = to_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, mode);
+ PUT_MODE (return_rtx, to_machine_mode (mode));
if (GET_MODE (return_rtx) != mode)
fatal_with_file_and_line (infile, "mode too large");
}