diff mbox

RFA: MN10300: Fix typo store_movm pattern

Message ID 87ppnboy7t.fsf@redhat.com
State New
Headers show

Commit Message

Nick Clifton Jan. 29, 2014, 10:53 a.m. UTC
Hi Alex, Hi Jeff,

  There is a typo in the MN10300 store_movm pattern.  It calls
  mn10300_store_multiple_operation to generate a bit mask of registers
  to be pushed, which it then passes to mn10300_print_reg_list.  But
  mn10300_store_multiple_operation is actually a predicate function
  (defined in predicates.md).  The function that should have been called
  is mn10300_store_multiple_operation_p.

  The patch below is the obvious fix for the typo, but I am wondering
  whether it would be better to rename the two functions.  Eg:

    mn10300_store_multiple_operation   -> mn10300_store_multiple_operation_p
    mn10300_store_multiple_operation_p -> mn10300_store_multiple_regs

Cheers
  Nick

gcc/ChangeLog
2014-01-29  Nick Clifton  <nickc@redhat.com>

	* config/mn10300/mn10300.md (store_movm): Fix typo.

Comments

Jeff Law Jan. 29, 2014, 5:11 p.m. UTC | #1
On 01/29/14 03:53, Nick Clifton wrote:
> Hi Alex, Hi Jeff,
>
>    There is a typo in the MN10300 store_movm pattern.  It calls
>    mn10300_store_multiple_operation to generate a bit mask of registers
>    to be pushed, which it then passes to mn10300_print_reg_list.  But
>    mn10300_store_multiple_operation is actually a predicate function
>    (defined in predicates.md).  The function that should have been called
>    is mn10300_store_multiple_operation_p.
>
>    The patch below is the obvious fix for the typo, but I am wondering
>    whether it would be better to rename the two functions.  Eg:
>
>      mn10300_store_multiple_operation   -> mn10300_store_multiple_operation_p
>      mn10300_store_multiple_operation_p -> mn10300_store_multiple_regs
Agreed, the naming seems awfully confusing right now.  Feel free to go 
forward with fixing that :-)

jeff
Nick Clifton Jan. 30, 2014, 4:20 p.m. UTC | #2
Hi Jeff,

> Agreed, the naming seems awfully confusing right now.  Feel free to go
> forward with fixing that :-)

Done - thanks!

Cheers
   Nick
diff mbox

Patch

Index: gcc/config/mn10300/mn10300.md
===================================================================
--- gcc/config/mn10300/mn10300.md	(revision 207224)
+++ gcc/config/mn10300/mn10300.md	(working copy)
@@ -2059,8 +2059,7 @@ 
 {
   fputs ("\tmovm ", asm_out_file);
   mn10300_print_reg_list (asm_out_file,
-                          mn10300_store_multiple_operation (operands[0],
-						            VOIDmode));
+                          mn10300_store_multiple_operation_p (operands[0]));
   fprintf (asm_out_file, ",(sp)\n");
   return "";
 }