Commit 33521f7d by Eric Christopher Committed by Eric Christopher

builtins.c (apply_args_size): Use reg_raw_mode.

2004-03-17  Eric Christopher  <echristo@redhat.com>

	* builtins.c (apply_args_size): Use reg_raw_mode.
	(apply_result_size): Ditto.

From-SVN: r79609
parent 86881a7b
2004-03-17 Eric Christopher <echristo@redhat.com>
* builtins.c (apply_args_size): Use reg_raw_mode.
(apply_result_size): Ditto.
2004-03-17 Ralf Corsepius <corsepiu@faw.uni-ulm.de> 2004-03-17 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
PR target/14620 PR target/14620
......
...@@ -904,42 +904,8 @@ apply_args_size (void) ...@@ -904,42 +904,8 @@ apply_args_size (void)
for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++) for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)
if (FUNCTION_ARG_REGNO_P (regno)) if (FUNCTION_ARG_REGNO_P (regno))
{ {
/* Search for the proper mode for copying this register's mode = reg_raw_mode[regno];
value. I'm not sure this is right, but it works so far. */
enum machine_mode best_mode = VOIDmode;
for (mode = GET_CLASS_NARROWEST_MODE (MODE_INT);
mode != VOIDmode;
mode = GET_MODE_WIDER_MODE (mode))
if (HARD_REGNO_MODE_OK (regno, mode)
&& hard_regno_nregs[regno][mode] == 1)
best_mode = mode;
if (best_mode == VOIDmode)
for (mode = GET_CLASS_NARROWEST_MODE (MODE_FLOAT);
mode != VOIDmode;
mode = GET_MODE_WIDER_MODE (mode))
if (HARD_REGNO_MODE_OK (regno, mode)
&& have_insn_for (SET, mode))
best_mode = mode;
if (best_mode == VOIDmode)
for (mode = GET_CLASS_NARROWEST_MODE (MODE_VECTOR_FLOAT);
mode != VOIDmode;
mode = GET_MODE_WIDER_MODE (mode))
if (HARD_REGNO_MODE_OK (regno, mode)
&& have_insn_for (SET, mode))
best_mode = mode;
if (best_mode == VOIDmode)
for (mode = GET_CLASS_NARROWEST_MODE (MODE_VECTOR_INT);
mode != VOIDmode;
mode = GET_MODE_WIDER_MODE (mode))
if (HARD_REGNO_MODE_OK (regno, mode)
&& have_insn_for (SET, mode))
best_mode = mode;
mode = best_mode;
if (mode == VOIDmode) if (mode == VOIDmode)
abort (); abort ();
...@@ -977,41 +943,8 @@ apply_result_size (void) ...@@ -977,41 +943,8 @@ apply_result_size (void)
for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++) for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)
if (FUNCTION_VALUE_REGNO_P (regno)) if (FUNCTION_VALUE_REGNO_P (regno))
{ {
/* Search for the proper mode for copying this register's mode = reg_raw_mode[regno];
value. I'm not sure this is right, but it works so far. */
enum machine_mode best_mode = VOIDmode;
for (mode = GET_CLASS_NARROWEST_MODE (MODE_INT);
mode != TImode;
mode = GET_MODE_WIDER_MODE (mode))
if (HARD_REGNO_MODE_OK (regno, mode))
best_mode = mode;
if (best_mode == VOIDmode)
for (mode = GET_CLASS_NARROWEST_MODE (MODE_FLOAT);
mode != VOIDmode;
mode = GET_MODE_WIDER_MODE (mode))
if (HARD_REGNO_MODE_OK (regno, mode)
&& have_insn_for (SET, mode))
best_mode = mode;
if (best_mode == VOIDmode)
for (mode = GET_CLASS_NARROWEST_MODE (MODE_VECTOR_FLOAT);
mode != VOIDmode;
mode = GET_MODE_WIDER_MODE (mode))
if (HARD_REGNO_MODE_OK (regno, mode)
&& have_insn_for (SET, mode))
best_mode = mode;
if (best_mode == VOIDmode)
for (mode = GET_CLASS_NARROWEST_MODE (MODE_VECTOR_INT);
mode != VOIDmode;
mode = GET_MODE_WIDER_MODE (mode))
if (HARD_REGNO_MODE_OK (regno, mode)
&& have_insn_for (SET, mode))
best_mode = mode;
mode = best_mode;
if (mode == VOIDmode) if (mode == VOIDmode)
abort (); abort ();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment