| Submitter | Joseph S. Myers |
|---|---|
| Date | Sept. 14, 2010, 11:34 p.m. |
| Message ID | <Pine.LNX.4.64.1009142333240.11898@digraph.polyomino.org.uk> |
| Download | mbox | patch |
| Permalink | /patch/64769/ |
| State | New |
| Headers | show |
Comments
Hi. From: "Joseph S. Myers" <joseph@codesourcery.com> Sent: Wednesday, September 15, 2010 3:34 AM > The pdp11 back end has its own register_move_cost function that > conflicts with the target-independent one added a few months ago. > This patch fixes build of cc1 for this target by renaming the target's > function to pdp11_register_move_cost. > > Tested with building cc1 for cross to pdp11-none. OK to commit? > Better to hookize REGISTER_MOVE_COST and MEMORY_MOVE_COST macros and use equivalent TARGET_REGISTER_MOVE_COST and TARGET_MEMORY_MOVE_COST target hooks. Anatoly.
Looks good. paul On Sep 14, 2010, at 7:34 PM, Joseph S. Myers wrote: > The pdp11 back end has its own register_move_cost function that > conflicts with the target-independent one added a few months ago. > This patch fixes build of cc1 for this target by renaming the target's > function to pdp11_register_move_cost. > > Tested with building cc1 for cross to pdp11-none. OK to commit?
Patch
Index: config/pdp11/pdp11-protos.h =================================================================== --- config/pdp11/pdp11-protos.h (revision 164260) +++ config/pdp11/pdp11-protos.h (working copy) @@ -1,5 +1,6 @@ /* Definitions of target machine for GNU compiler, for the pdp-11 - Copyright (C) 2000, 2003, 2004, 2007 Free Software Foundation, Inc. + Copyright (C) 2000, 2003, 2004, 2007, 2009, 2010 + Free Software Foundation, Inc. Contributed by Michael K. Gschwind (mike@vlsivie.tuwien.ac.at). This file is part of GCC. @@ -34,7 +35,7 @@ extern const char *output_block_move (rtx *); extern const char *output_jump (enum rtx_code, int, int); extern void print_operand_address (FILE *, rtx); -extern int register_move_cost (enum reg_class, enum reg_class); +extern int pdp11_register_move_cost (enum reg_class, enum reg_class); #endif /* RTX_CODE */ extern void output_ascii (FILE *, const char *, int); Index: config/pdp11/pdp11.c =================================================================== --- config/pdp11/pdp11.c (revision 164260) +++ config/pdp11/pdp11.c (working copy) @@ -1070,7 +1070,7 @@ -- as we do here with 22 -- or not ? */ int -register_move_cost(enum reg_class c1, enum reg_class c2) +pdp11_register_move_cost (enum reg_class c1, enum reg_class c2) { return move_costs[(int)c1][(int)c2]; } Index: config/pdp11/pdp11.h =================================================================== --- config/pdp11/pdp11.h (revision 164260) +++ config/pdp11/pdp11.h (working copy) @@ -764,7 +764,7 @@ /* cost of moving one register class to another */ #define REGISTER_MOVE_COST(MODE, CLASS1, CLASS2) \ - register_move_cost (CLASS1, CLASS2) + pdp11_register_move_cost (CLASS1, CLASS2) /* Tell emit-rtl.c how to initialize special values on a per-function base. */ extern int optimize;