Commit 9fb374d6 by Anthony Green Committed by Anthony Green

Enable building with g++.

From-SVN: r149114
parent b30bfd40
2009-06-30 Anthony Green <green@moxielogic.com>
Clean up moxie port for --enable-build-with-cxx.
* config/moxie/moxie.c (moxie_function_value): First two
parameters are const_tree, not tree.
* config/moxie/moxie.h (enum reg_class): Rename CC_REG to CC_REGS.
(REG_CLASS_NAMES): Ditto.
(REGNO_REG_CLASS): Ditto.
* config/moxie/moxie-protos.h (moxie_override_options): Declare.
(moxie_function_value): Fix constyness of arguments.
2009-06-30 Eric Botcazou <ebotcazou@adacore.com> 2009-06-30 Eric Botcazou <ebotcazou@adacore.com>
* cgraphunit.c (cgraph_finalize_compilation_unit): Call * cgraphunit.c (cgraph_finalize_compilation_unit): Call
......
...@@ -17,12 +17,15 @@ You should have received a copy of the GNU General Public License ...@@ -17,12 +17,15 @@ You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */ <http://www.gnu.org/licenses/>. */
extern void moxie_override_options (void);
extern void moxie_expand_prologue (void); extern void moxie_expand_prologue (void);
extern void moxie_expand_epilogue (void); extern void moxie_expand_epilogue (void);
extern int moxie_initial_elimination_offset (int, int); extern int moxie_initial_elimination_offset (int, int);
extern rtx moxie_function_value (tree, tree, bool ATTRIBUTE_UNUSED); extern rtx moxie_function_value (const_tree, const_tree,
bool ATTRIBUTE_UNUSED);
extern void moxie_print_operand (FILE *, rtx, int); extern void moxie_print_operand (FILE *, rtx, int);
extern void moxie_print_operand_address (FILE *, rtx); extern void moxie_print_operand_address (FILE *, rtx);
#ifdef RTX_CODE #ifdef RTX_CODE
extern rtx moxie_function_arg (CUMULATIVE_ARGS, enum machine_mode, tree, int); extern rtx moxie_function_arg (CUMULATIVE_ARGS,
enum machine_mode, tree, int);
#endif /* RTX_CODE */ #endif /* RTX_CODE */
...@@ -72,8 +72,8 @@ moxie_return_in_memory (const_tree type, const_tree fntype ATTRIBUTE_UNUSED) ...@@ -72,8 +72,8 @@ moxie_return_in_memory (const_tree type, const_tree fntype ATTRIBUTE_UNUSED)
We always return values in register $r0 for moxie. */ We always return values in register $r0 for moxie. */
rtx rtx
moxie_function_value (tree valtype, moxie_function_value (const_tree valtype,
tree fntype_or_decl ATTRIBUTE_UNUSED, const_tree fntype_or_decl ATTRIBUTE_UNUSED,
bool outgoing ATTRIBUTE_UNUSED) bool outgoing ATTRIBUTE_UNUSED)
{ {
return gen_rtx_REG (TYPE_MODE (valtype), MOXIE_R0); return gen_rtx_REG (TYPE_MODE (valtype), MOXIE_R0);
......
...@@ -127,7 +127,7 @@ enum reg_class ...@@ -127,7 +127,7 @@ enum reg_class
NO_REGS, NO_REGS,
GENERAL_REGS, GENERAL_REGS,
SPECIAL_REGS, SPECIAL_REGS,
CC_REG, CC_REGS,
ALL_REGS, ALL_REGS,
LIM_REG_CLASSES LIM_REG_CLASSES
}; };
...@@ -156,7 +156,7 @@ enum reg_class ...@@ -156,7 +156,7 @@ enum reg_class
"NO_REGS", \ "NO_REGS", \
"GENERAL_REGS", \ "GENERAL_REGS", \
"SPECIAL_REGS", \ "SPECIAL_REGS", \
"CC_REG", \ "CC_REGS", \
"ALL_REGS" } "ALL_REGS" }
#define FIXED_REGISTERS { 1, 1, 0, 0, \ #define FIXED_REGISTERS { 1, 1, 0, 0, \
...@@ -183,7 +183,7 @@ enum reg_class ...@@ -183,7 +183,7 @@ enum reg_class
/* A C expression whose value is a register class containing hard /* A C expression whose value is a register class containing hard
register REGNO. */ register REGNO. */
#define REGNO_REG_CLASS(R) ((R < MOXIE_PC) ? GENERAL_REGS : \ #define REGNO_REG_CLASS(R) ((R < MOXIE_PC) ? GENERAL_REGS : \
(R == MOXIE_CC ? CC_REG : SPECIAL_REGS)) (R == MOXIE_CC ? CC_REGS : SPECIAL_REGS))
/* A C expression for the number of consecutive hard registers, /* A C expression for the number of consecutive hard registers,
starting at register number REGNO, required to hold a value of mode starting at register number REGNO, required to hold a value of mode
......
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