On 11/04/2015 01:54 PM, Julian Brown wrote:
That's not all targets by any means, but may be enough to warrant a
change in the interface. I propose that:

* The output_address function should have a machine_mode argument
   added. Bare addresses (e.g. the 'a' case in final.c) should pass
   "VOIDmode" for this argument.

* Other callers of output_address -- actually all in backends -- can
   pass the machine mode for the memory access in question.

* The TARGET_PRINT_OPERAND_ADDRESS hook shall also have a machine_mode
   argument added. The legacy PRINT_OPERAND_ADDRESS hook can be left
   alone. (The documentation for the operand-printing hooks needs fixing
   too, incidentally.)

I think this approach seems fine.

 static void
-mcore_print_operand_address (FILE * stream, rtx x)
+mcore_print_operand_address (FILE * stream, machine_mode mode ATTRIBUTE_UNUSED,
+                            rtx x)

So apparently we're settling on writing the unused arg as just "machine_mode" without a name. Please change everywhere.

@@ -1754,7 +1754,7 @@ mmix_print_operand_punct_valid_p (unsign
 /* TARGET_PRINT_OPERAND_ADDRESS.  */

 static void
-mmix_print_operand_address (FILE *stream, rtx x)
+mmix_print_operand_address (FILE *stream, machine_mode mode, rtx x)
 {
   if (REG_P (x))
     {

The arg appears to be unused - I'd expect to see a warning here.

Other thank that it looks OK. I'm not going to require that you test every target, but it would be good to have the full set built to cc1 before and after, and please be on the lookout for fallout.


Bernd

Reply via email to