OSDN Git Service

Enable building with g++.
authorgreen <green@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 30 Jun 2009 18:59:41 +0000 (18:59 +0000)
committergreen <green@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 30 Jun 2009 18:59:41 +0000 (18:59 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@149114 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/moxie/moxie-protos.h
gcc/config/moxie/moxie.c
gcc/config/moxie/moxie.h

index d55f4b8..5bd94cf 100644 (file)
@@ -1,3 +1,14 @@
+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>
 
        * cgraphunit.c (cgraph_finalize_compilation_unit): Call
index d475aac..17bb4fc 100644 (file)
@@ -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
 <http://www.gnu.org/licenses/>.  */
 
+extern void  moxie_override_options (void);
 extern void  moxie_expand_prologue (void);
 extern void  moxie_expand_epilogue (void);
 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_address (FILE *, rtx);
 #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 */
index 3991cee..0ed8ad1 100644 (file)
@@ -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.  */
 
 rtx
-moxie_function_value (tree valtype, 
-                     tree fntype_or_decl ATTRIBUTE_UNUSED,
+moxie_function_value (const_tree valtype, 
+                     const_tree fntype_or_decl ATTRIBUTE_UNUSED,
                      bool outgoing ATTRIBUTE_UNUSED)
 {
   return gen_rtx_REG (TYPE_MODE (valtype), MOXIE_R0);
index 01cf9d2..bf3d7e3 100644 (file)
@@ -127,7 +127,7 @@ enum reg_class
   NO_REGS,
   GENERAL_REGS,
   SPECIAL_REGS,
-  CC_REG,
+  CC_REGS,
   ALL_REGS,
   LIM_REG_CLASSES
 };
@@ -156,7 +156,7 @@ enum reg_class
     "NO_REGS", \
     "GENERAL_REGS", \
     "SPECIAL_REGS", \
-    "CC_REG", \
+    "CC_REGS", \
     "ALL_REGS" }
 
 #define FIXED_REGISTERS     { 1, 1, 0, 0, \
@@ -183,7 +183,7 @@ enum reg_class
 /* A C expression whose value is a register class containing hard
    register REGNO.  */
 #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,
    starting at register number REGNO, required to hold a value of mode