diff options
Diffstat (limited to 'gcc/config/crx')
-rw-r--r-- | gcc/config/crx/crx.c | 17 | ||||
-rw-r--r-- | gcc/config/crx/crx.h | 10 |
2 files changed, 17 insertions, 10 deletions
diff --git a/gcc/config/crx/crx.c b/gcc/config/crx/crx.c index e8b750c..8ae552f 100644 --- a/gcc/config/crx/crx.c +++ b/gcc/config/crx/crx.c @@ -1,6 +1,6 @@ /* Output routines for GCC for CRX. Copyright (C) 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, - 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 + 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. This file is part of GCC. @@ -130,6 +130,7 @@ static bool crx_return_in_memory (const_tree type, const_tree fntype ATTRIBUTE_U static int crx_address_cost (rtx, bool); static bool crx_legitimate_address_p (enum machine_mode, rtx, bool); static bool crx_can_eliminate (const int, const int); +static void crx_option_optimization (int, int); /*****************************************************************************/ /* RTL VALIDITY */ @@ -174,6 +175,10 @@ static const struct attribute_spec crx_attribute_table[] = { {NULL, 0, 0, false, false, false, NULL} }; +/* Option handling. */ + +#undef TARGET_OPTION_OPTIMIZATION +#define TARGET_OPTION_OPTIMIZATION crx_option_optimization /* Initialize 'targetm' variable which contains pointers to functions and data * relating to the target machine. */ @@ -1442,3 +1447,13 @@ crx_expand_epilogue (void) else emit_jump_insn (gen_pop_and_popret_return (GEN_INT (sum_regs))); } + +/* Implement TARGET_OPTION_OPTIMIZATION. */ +static void +crx_option_optimization (int level, int size) +{ + /* Put each function in its own section so that PAGE-instruction + relaxation can do its best. */ + if (level || size) + flag_function_sections = 1; +} diff --git a/gcc/config/crx/crx.h b/gcc/config/crx/crx.h index a6260f4..d4bf274 100644 --- a/gcc/config/crx/crx.h +++ b/gcc/config/crx/crx.h @@ -1,6 +1,6 @@ /* Definitions of target machine for GNU compiler, for CRX. Copyright (C) 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, - 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 + 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. This file is part of GCC. @@ -54,14 +54,6 @@ do { \ #define TARGET_VERSION fputs (" (CRX/ELF)", stderr); -/* Put each function in its own section so that PAGE-instruction - * relaxation can do its best. */ -#define OPTIMIZATION_OPTIONS(LEVEL, SIZEFLAG) \ - do { \ - if ((LEVEL) || (SIZEFLAG)) \ - flag_function_sections = 1; \ - } while (0) - /* Show we can debug even without a frame pointer. */ #define CAN_DEBUG_WITHOUT_FP |