diff options
Diffstat (limited to 'gcc/config/sh/sh.h')
-rw-r--r-- | gcc/config/sh/sh.h | 88 |
1 files changed, 10 insertions, 78 deletions
diff --git a/gcc/config/sh/sh.h b/gcc/config/sh/sh.h index 8720fb77728..71e202a87dd 100644 --- a/gcc/config/sh/sh.h +++ b/gcc/config/sh/sh.h @@ -1,6 +1,6 @@ /* Definitions of target machine for GNU compiler for Renesas / SuperH SH. Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, - 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. + 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Contributed by Steve Chamberlain (sac@cygnus.com). Improved by Jim Wilson (wilson@cygnus.com). @@ -545,35 +545,35 @@ do { \ = !flag_signaling_nans && TARGET_SH2E && ! TARGET_IEEE; \ if (TARGET_SH2E && !flag_finite_math_only) \ target_flags |= MASK_IEEE; \ - sh_cpu = CPU_SH1; \ + sh_cpu = PROCESSOR_SH1; \ assembler_dialect = 0; \ if (TARGET_SH2) \ - sh_cpu = CPU_SH2; \ + sh_cpu = PROCESSOR_SH2; \ if (TARGET_SH2E) \ - sh_cpu = CPU_SH2E; \ + sh_cpu = PROCESSOR_SH2E; \ if (TARGET_SH2A) \ { \ - sh_cpu = CPU_SH2A; \ + sh_cpu = PROCESSOR_SH2A; \ if (TARGET_SH2A_DOUBLE) \ target_flags |= MASK_FMOVD; \ } \ if (TARGET_SH3) \ - sh_cpu = CPU_SH3; \ + sh_cpu = PROCESSOR_SH3; \ if (TARGET_SH3E) \ - sh_cpu = CPU_SH3E; \ + sh_cpu = PROCESSOR_SH3E; \ if (TARGET_SH4) \ { \ assembler_dialect = 1; \ - sh_cpu = CPU_SH4; \ + sh_cpu = PROCESSOR_SH4; \ } \ if (TARGET_SH4A_ARCH) \ { \ assembler_dialect = 1; \ - sh_cpu = CPU_SH4A; \ + sh_cpu = PROCESSOR_SH4A; \ } \ if (TARGET_SH5) \ { \ - sh_cpu = CPU_SH5; \ + sh_cpu = PROCESSOR_SH5; \ target_flags |= MASK_ALIGN_DOUBLE; \ if (TARGET_SHMEDIA_FPU) \ target_flags |= MASK_FMOVD; \ @@ -1262,12 +1262,6 @@ extern char sh_additional_register_names[ADDREGNAMES_SIZE] \ #define GOT_SYMBOL_NAME "*_GLOBAL_OFFSET_TABLE_" -/* Value should be nonzero if functions must have frame pointers. - Zero means the frame pointer need not be set up (and parms may be accessed - via the stack pointer) in functions that seem suitable. */ - -#define FRAME_POINTER_REQUIRED 0 - /* Definitions for register eliminations. We have three registers that can be eliminated on the SH. First, the @@ -2450,68 +2444,6 @@ struct sh_args { } \ } -/* Try machine-dependent ways of modifying an illegitimate address - to be legitimate. If we find one, return the new, valid address. - This macro is used in only one place: `memory_address' in explow.c. - - OLDX is the address as it was before break_out_memory_refs was called. - In some cases it is useful to look at this to decide what needs to be done. - - MODE and WIN are passed so that this macro can use - GO_IF_LEGITIMATE_ADDRESS. - - It is always safe for this macro to do nothing. It exists to recognize - opportunities to optimize the output. - - For the SH, if X is almost suitable for indexing, but the offset is - out of range, convert it into a normal form so that cse has a chance - of reducing the number of address registers used. */ - -#define LEGITIMIZE_ADDRESS(X,OLDX,MODE,WIN) \ -{ \ - if (flag_pic) \ - (X) = legitimize_pic_address (OLDX, MODE, NULL_RTX); \ - if (GET_CODE (X) == PLUS \ - && (GET_MODE_SIZE (MODE) == 4 \ - || GET_MODE_SIZE (MODE) == 8) \ - && GET_CODE (XEXP ((X), 1)) == CONST_INT \ - && BASE_REGISTER_RTX_P (XEXP ((X), 0)) \ - && ! TARGET_SHMEDIA \ - && ! ((TARGET_SH4 || TARGET_SH2A_DOUBLE) && (MODE) == DFmode) \ - && ! (TARGET_SH2E && (MODE) == SFmode)) \ - { \ - rtx index_rtx = XEXP ((X), 1); \ - HOST_WIDE_INT offset = INTVAL (index_rtx), offset_base; \ - rtx sum; \ - \ - GO_IF_LEGITIMATE_INDEX ((MODE), index_rtx, WIN); \ - /* On rare occasions, we might get an unaligned pointer \ - that is indexed in a way to give an aligned address. \ - Therefore, keep the lower two bits in offset_base. */ \ - /* Instead of offset_base 128..131 use 124..127, so that \ - simple add suffices. */ \ - if (offset > 127) \ - { \ - offset_base = ((offset + 4) & ~60) - 4; \ - } \ - else \ - offset_base = offset & ~60; \ - /* Sometimes the normal form does not suit DImode. We \ - could avoid that by using smaller ranges, but that \ - would give less optimized code when SImode is \ - prevalent. */ \ - if (GET_MODE_SIZE (MODE) + offset - offset_base <= 64) \ - { \ - sum = expand_binop (Pmode, add_optab, XEXP ((X), 0), \ - GEN_INT (offset_base), NULL_RTX, 0, \ - OPTAB_LIB_WIDEN); \ - \ - (X) = gen_rtx_PLUS (Pmode, sum, GEN_INT (offset - offset_base)); \ - goto WIN; \ - } \ - } \ -} - /* A C compound statement that attempts to replace X, which is an address that needs reloading, with a valid memory address for an operand of mode MODE. WIN is a C statement label elsewhere in the code. |