Commit 9ce71c6f by Bernd Schmidt Committed by Bernd Schmidt

arm.c: Verify modes on operands in predicates

From-SVN: r30088
parent 3a2ea258
Tue Oct 19 18:42:58 1999 Bernd Schmidt <bernds@cygnus.co.uk>
* arm.c (fpu_rhs_operand): Verify modes.
(fpu_add_operand): Likewise.
(di_operand): Likewise.
(soft_df_operand): Likewise.
Tue Oct 19 15:26:11 1999 Richard Earnshaw (rearnsha@arm.com) Tue Oct 19 15:26:11 1999 Richard Earnshaw (rearnsha@arm.com)
* arm.c (arm_return_in_memory): APCS rules state that the elements * arm.c (arm_return_in_memory): APCS rules state that the elements
......
...@@ -2213,8 +2213,12 @@ fpu_rhs_operand (op, mode) ...@@ -2213,8 +2213,12 @@ fpu_rhs_operand (op, mode)
{ {
if (s_register_operand (op, mode)) if (s_register_operand (op, mode))
return TRUE; return TRUE;
else if (GET_CODE (op) == CONST_DOUBLE)
return (const_double_rtx_ok_for_fpu (op)); if (GET_MODE (op) != mode && mode != VOIDmode)
return FALSE;
if (GET_CODE (op) == CONST_DOUBLE)
return const_double_rtx_ok_for_fpu (op);
return FALSE; return FALSE;
} }
...@@ -2226,7 +2230,11 @@ fpu_add_operand (op, mode) ...@@ -2226,7 +2230,11 @@ fpu_add_operand (op, mode)
{ {
if (s_register_operand (op, mode)) if (s_register_operand (op, mode))
return TRUE; return TRUE;
else if (GET_CODE (op) == CONST_DOUBLE)
if (GET_MODE (op) != mode && mode != VOIDmode)
return FALSE;
if (GET_CODE (op) == CONST_DOUBLE)
return (const_double_rtx_ok_for_fpu (op) return (const_double_rtx_ok_for_fpu (op)
|| neg_const_double_rtx_ok_for_fpu (op)); || neg_const_double_rtx_ok_for_fpu (op));
...@@ -2261,6 +2269,9 @@ di_operand (op, mode) ...@@ -2261,6 +2269,9 @@ di_operand (op, mode)
if (s_register_operand (op, mode)) if (s_register_operand (op, mode))
return TRUE; return TRUE;
if (mode != VOIDmode && GET_MODE (op) != VOIDmode && GET_MODE (op) != DImode)
return FALSE;
if (GET_CODE (op) == SUBREG) if (GET_CODE (op) == SUBREG)
op = SUBREG_REG (op); op = SUBREG_REG (op);
...@@ -2291,9 +2302,12 @@ soft_df_operand (op, mode) ...@@ -2291,9 +2302,12 @@ soft_df_operand (op, mode)
if (s_register_operand (op, mode)) if (s_register_operand (op, mode))
return TRUE; return TRUE;
if (mode != VOIDmode && GET_MODE (op) != mode)
return FALSE;
if (GET_CODE (op) == SUBREG) if (GET_CODE (op) == SUBREG)
op = SUBREG_REG (op); op = SUBREG_REG (op);
switch (GET_CODE (op)) switch (GET_CODE (op))
{ {
case CONST_DOUBLE: case CONST_DOUBLE:
......
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