diff options
author | Zack Weinberg <zack@gcc.gnu.org> | 2003-10-06 22:47:32 +0000 |
---|---|---|
committer | Zack Weinberg <zack@gcc.gnu.org> | 2003-10-06 22:47:32 +0000 |
commit | 70a01792d85cdeb0baefdccc840444735f8cd396 (patch) | |
tree | 972d12bd6146ca789109687592f05e46952b0f67 | |
parent | ba9b12d1d29019dc0f200cbfaea484e7a3762481 (diff) | |
download | gcc-70a01792d85cdeb0baefdccc840444735f8cd396.zip gcc-70a01792d85cdeb0baefdccc840444735f8cd396.tar.gz gcc-70a01792d85cdeb0baefdccc840444735f8cd396.tar.bz2 |
real.h (REAL_MODE_FORMAT): New macro.
* real.h (REAL_MODE_FORMAT): New macro.
* c-cppbuiltin.c, optabs.c, real.c, config/alpha/alpha.c
* config/c4x/c4x.c, config/i370/i370.c, config/i386/freebsd.h
* config/i386/i386.c, config/i960/i960.c, config/ia64/ia64.c
* config/m68k/m68k.c, config/mips/mips.c, config/rs6000/rs6000.c
* config/vax/vax.c: Use REAL_MODE_FORMAT instead of referring
directly to real_format_for_mode array, wherever possible.
From-SVN: r72168
-rw-r--r-- | gcc/ChangeLog | 16 | ||||
-rw-r--r-- | gcc/c-cppbuiltin.c | 2 | ||||
-rw-r--r-- | gcc/config/alpha/alpha.c | 6 | ||||
-rw-r--r-- | gcc/config/c4x/c4x.c | 4 | ||||
-rw-r--r-- | gcc/config/i370/i370.c | 4 | ||||
-rw-r--r-- | gcc/config/i386/freebsd.h | 4 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 4 | ||||
-rw-r--r-- | gcc/config/i960/i960.c | 2 | ||||
-rw-r--r-- | gcc/config/ia64/ia64.c | 2 | ||||
-rw-r--r-- | gcc/config/m68k/m68k.c | 2 | ||||
-rw-r--r-- | gcc/config/mips/mips.c | 8 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.c | 2 | ||||
-rw-r--r-- | gcc/config/vax/vax.c | 5 | ||||
-rw-r--r-- | gcc/optabs.c | 4 | ||||
-rw-r--r-- | gcc/real.c | 12 | ||||
-rw-r--r-- | gcc/real.h | 1 |
16 files changed, 44 insertions, 34 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6a6dc5d..a60682c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,10 +1,20 @@ +2003-10-06 Zack Weinberg <zack@codesourcery.com> + + * real.h (REAL_MODE_FORMAT): New macro. + * c-cppbuiltin.c, optabs.c, real.c, config/alpha/alpha.c + * config/c4x/c4x.c, config/i370/i370.c, config/i386/freebsd.h + * config/i386/i386.c, config/i960/i960.c, config/ia64/ia64.c + * config/m68k/m68k.c, config/mips/mips.c, config/rs6000/rs6000.c + * config/vax/vax.c: Use REAL_MODE_FORMAT instead of referring + directly to real_format_for_mode array, wherever possible. + 2003-10-06 Devang Patel <dpatel@apple.com> * dwarf2out.c (is_main_source): Remove variable. (dwarf2out_start_source_file): Do not check is_main_source. Do not reset is_main_source. (dwarf2out_init): Do not initialize is_main_source. - + 2003-10-06 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> * fixinc/inclhack.def (stdio_va_list): Removed _ap fix. @@ -103,7 +113,7 @@ 2003-10-05 Andrew Pinski <apinski@apple.com> - * config/darwin.c (machopic_non_lazy_ptr_name): + * config/darwin.c (machopic_non_lazy_ptr_name): Change strcat to memcpy and add length together. (machopic_stub_name): Likewise. @@ -191,7 +201,7 @@ * gengtype-lex.l: Recognize typedef of functions without PARAMS macro. 2003-10-04 Nathanael Nerode <neroden@gcc.gnu.org> - + * config/v850/v850-c.c, config/v850/v850-protos.h, config/v850/v850.c: Convert to ISO C90 function declarations and definitions. diff --git a/gcc/c-cppbuiltin.c b/gcc/c-cppbuiltin.c index 879d731..19a9cf4 100644 --- a/gcc/c-cppbuiltin.c +++ b/gcc/c-cppbuiltin.c @@ -85,7 +85,7 @@ builtin_define_float_constants (const char *name_prefix, const char *fp_suffix, int dig, min_10_exp, max_10_exp; int decimal_dig; - fmt = real_format_for_mode[TYPE_MODE (type) - QFmode]; + fmt = REAL_MODE_FORMAT (TYPE_MODE (type)); /* The radix of the exponent representation. */ if (type == float_type_node) diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c index 2340358..f7998cc 100644 --- a/gcc/config/alpha/alpha.c +++ b/gcc/config/alpha/alpha.c @@ -472,9 +472,9 @@ override_options (void) /* Tell the compiler when we're using VAX floating point. */ if (TARGET_FLOAT_VAX) { - real_format_for_mode[SFmode - QFmode] = &vax_f_format; - real_format_for_mode[DFmode - QFmode] = &vax_g_format; - real_format_for_mode[TFmode - QFmode] = NULL; + REAL_MODE_FORMAT (SFmode) = &vax_f_format; + REAL_MODE_FORMAT (DFmode) = &vax_g_format; + REAL_MODE_FORMAT (TFmode) = NULL; } } diff --git a/gcc/config/c4x/c4x.c b/gcc/config/c4x/c4x.c index ef58602..a50cbb8 100644 --- a/gcc/config/c4x/c4x.c +++ b/gcc/config/c4x/c4x.c @@ -317,8 +317,8 @@ c4x_override_options (void) /* We're C4X floating point, not IEEE floating point. */ memset (real_format_for_mode, 0, sizeof real_format_for_mode); - real_format_for_mode[QFmode - QFmode] = &c4x_single_format; - real_format_for_mode[HFmode - QFmode] = &c4x_extended_format; + REAL_MODE_FORMAT (QFmode) = &c4x_single_format; + REAL_MODE_FORMAT (HFmode) = &c4x_extended_format; } diff --git a/gcc/config/i370/i370.c b/gcc/config/i370/i370.c index eae8e34..0dfa3c4 100644 --- a/gcc/config/i370/i370.c +++ b/gcc/config/i370/i370.c @@ -213,8 +213,8 @@ override_options () { /* We're 370 floating point, not IEEE floating point. */ memset (real_format_for_mode, 0, sizeof real_format_for_mode); - real_format_for_mode[SFmode - QFmode] = &i370_single_format; - real_format_for_mode[DFmode - QFmode] = &i370_double_format; + REAL_MODE_FORMAT (SFmode) = &i370_single_format; + REAL_MODE_FORMAT (DFmode) = &i370_double_format; } /* ===================================================== */ diff --git a/gcc/config/i386/freebsd.h b/gcc/config/i386/freebsd.h index fb0438b..7396a47 100644 --- a/gcc/config/i386/freebsd.h +++ b/gcc/config/i386/freebsd.h @@ -137,9 +137,9 @@ Boston, MA 02111-1307, USA. */ #define SUBTARGET_OVERRIDE_OPTIONS \ do { \ if (!TARGET_64BIT) { \ - real_format_for_mode[XFmode - QFmode] \ + REAL_MODE_FORMAT (XFmode) \ = &ieee_extended_intel_96_round_53_format; \ - real_format_for_mode[TFmode - QFmode] \ + REAL_MODE_FORMAT (TFmode) \ = &ieee_extended_intel_96_round_53_format; \ } \ } while (0) diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 6ca6ee2..1c606df 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -1113,8 +1113,8 @@ override_options (void) /* By default our XFmode is the 80-bit extended format. If we have use TFmode instead, it's also the 80-bit format, but with padding. */ - real_format_for_mode[XFmode - QFmode] = &ieee_extended_intel_96_format; - real_format_for_mode[TFmode - QFmode] = &ieee_extended_intel_128_format; + REAL_MODE_FORMAT (XFmode) = &ieee_extended_intel_96_format; + REAL_MODE_FORMAT (TFmode) = &ieee_extended_intel_128_format; /* Set the default values for switches whose default depends on TARGET_64BIT in case they weren't overwritten by command line options. */ diff --git a/gcc/config/i960/i960.c b/gcc/config/i960/i960.c index 88ac99e..f62693a 100644 --- a/gcc/config/i960/i960.c +++ b/gcc/config/i960/i960.c @@ -169,7 +169,7 @@ i960_initialize () } /* Tell the compiler which flavor of TFmode we're using. */ - real_format_for_mode[TFmode - QFmode] = &ieee_extended_intel_128_format; + REAL_MODE_FORMAT (TFmode) = &ieee_extended_intel_128_format; } /* Return true if OP can be used as the source of an fp move insn. */ diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c index b10b9e9..b632d8b 100644 --- a/gcc/config/ia64/ia64.c +++ b/gcc/config/ia64/ia64.c @@ -4509,7 +4509,7 @@ ia64_override_options (void) /* Tell the compiler which flavor of TFmode we're using. */ if (INTEL_EXTENDED_IEEE_FORMAT) - real_format_for_mode[TFmode - QFmode] = &ieee_extended_intel_128_format; + REAL_MODE_FORMAT (TFmode) = &ieee_extended_intel_128_format; } static enum attr_itanium_class ia64_safe_itanium_class (rtx); diff --git a/gcc/config/m68k/m68k.c b/gcc/config/m68k/m68k.c index a20e129..105f241 100644 --- a/gcc/config/m68k/m68k.c +++ b/gcc/config/m68k/m68k.c @@ -212,7 +212,7 @@ override_options (void) SUBTARGET_OVERRIDE_OPTIONS; /* Tell the compiler which flavor of XFmode we're using. */ - real_format_for_mode[XFmode - QFmode] = &ieee_extended_motorola_format; + REAL_MODE_FORMAT (XFmode) = &ieee_extended_motorola_format; } /* Structure describing stack frame layout. */ diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c index 6c9d5ec..9478ec1 100644 --- a/gcc/config/mips/mips.c +++ b/gcc/config/mips/mips.c @@ -4859,12 +4859,12 @@ override_options (void) flag_delayed_branch = 0; } - real_format_for_mode[SFmode - QFmode] = &mips_single_format; - real_format_for_mode[DFmode - QFmode] = &mips_double_format; + REAL_MODE_FORMAT (SFmode) = &mips_single_format; + REAL_MODE_FORMAT (DFmode) = &mips_double_format; #ifdef MIPS_TFMODE_FORMAT - real_format_for_mode[TFmode - QFmode] = &MIPS_TFMODE_FORMAT; + REAL_MODE_FORMAT (TFmode) = &MIPS_TFMODE_FORMAT; #else - real_format_for_mode[TFmode - QFmode] = &mips_quad_format; + REAL_MODE_FORMAT (TFmode) = &mips_quad_format; #endif mips_print_operand_punct['?'] = 1; diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 1f037d9..4316b23 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -845,7 +845,7 @@ rs6000_override_options (const char *default_cpu) if (TARGET_LONG_DOUBLE_128 && (DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_DARWIN)) - real_format_for_mode[TFmode - QFmode] = &ibm_extended_format; + REAL_MODE_FORMAT (TFmode) = &ibm_extended_format; /* Allocate an alias set for register saves & restores from stack. */ rs6000_sr_alias_set = new_alias_set (); diff --git a/gcc/config/vax/vax.c b/gcc/config/vax/vax.c index 4f8ffb0..a4ec091 100644 --- a/gcc/config/vax/vax.c +++ b/gcc/config/vax/vax.c @@ -86,9 +86,8 @@ override_options (void) { /* We're VAX floating point, not IEEE floating point. */ memset (real_format_for_mode, 0, sizeof real_format_for_mode); - real_format_for_mode[SFmode - QFmode] = &vax_f_format; - real_format_for_mode[DFmode - QFmode] - = (TARGET_G_FLOAT ? &vax_g_format : &vax_d_format); + REAL_MODE_FORMAT (SFmode) = &vax_f_format; + REAL_MODE_FORMAT (DFmode) = (TARGET_G_FLOAT ? &vax_g_format : &vax_d_format); } /* Generate the assembly code for function entry. FILE is a stdio diff --git a/gcc/optabs.c b/gcc/optabs.c index 7f8affc..f05b999 100644 --- a/gcc/optabs.c +++ b/gcc/optabs.c @@ -2582,7 +2582,7 @@ expand_unop (enum machine_mode mode, optab unoptab, rtx op0, rtx target, if (unoptab->code == NEG && class == MODE_FLOAT && GET_MODE_BITSIZE (mode) <= 2 * HOST_BITS_PER_WIDE_INT) { - const struct real_format *fmt = real_format_for_mode[mode - QFmode]; + const struct real_format *fmt = REAL_MODE_FORMAT (mode); enum machine_mode imode = int_mode_for_mode (mode); int bitpos = (fmt != 0) ? fmt->signbit : -1; @@ -2756,7 +2756,7 @@ expand_abs_nojump (enum machine_mode mode, rtx op0, rtx target, if (GET_MODE_CLASS (mode) == MODE_FLOAT && GET_MODE_BITSIZE (mode) <= 2 * HOST_BITS_PER_WIDE_INT) { - const struct real_format *fmt = real_format_for_mode[mode - QFmode]; + const struct real_format *fmt = REAL_MODE_FORMAT (mode); enum machine_mode imode = int_mode_for_mode (mode); int bitpos = (fmt != 0) ? fmt->signbit : -1; @@ -2105,7 +2105,7 @@ real_nan (REAL_VALUE_TYPE *r, const char *str, int quiet, { const struct real_format *fmt; - fmt = real_format_for_mode[mode - QFmode]; + fmt = REAL_MODE_FORMAT (mode); if (fmt == NULL) abort (); @@ -2195,7 +2195,7 @@ real_maxval (REAL_VALUE_TYPE *r, int sign, enum machine_mode mode) const struct real_format *fmt; int np2; - fmt = real_format_for_mode[mode - QFmode]; + fmt = REAL_MODE_FORMAT (mode); if (fmt == NULL) abort (); @@ -2368,7 +2368,7 @@ real_convert (REAL_VALUE_TYPE *r, enum machine_mode mode, { const struct real_format *fmt; - fmt = real_format_for_mode[mode - QFmode]; + fmt = REAL_MODE_FORMAT (mode); if (fmt == NULL) abort (); @@ -2430,7 +2430,7 @@ real_to_target (long *buf, const REAL_VALUE_TYPE *r, enum machine_mode mode) { const struct real_format *fmt; - fmt = real_format_for_mode[mode - QFmode]; + fmt = REAL_MODE_FORMAT (mode); if (fmt == NULL) abort (); @@ -2455,7 +2455,7 @@ real_from_target (REAL_VALUE_TYPE *r, const long *buf, enum machine_mode mode) { const struct real_format *fmt; - fmt = real_format_for_mode[mode - QFmode]; + fmt = REAL_MODE_FORMAT (mode); if (fmt == NULL) abort (); @@ -2470,7 +2470,7 @@ significand_size (enum machine_mode mode) { const struct real_format *fmt; - fmt = real_format_for_mode[mode - QFmode]; + fmt = REAL_MODE_FORMAT (mode); if (fmt == NULL) return 0; @@ -145,6 +145,7 @@ struct real_format Indexed by MODE - QFmode. */ extern const struct real_format *real_format_for_mode[TFmode - QFmode + 1]; +#define REAL_MODE_FORMAT(MODE) (real_format_for_mode[(MODE) - QFmode]) /* Declare functions in real.c. */ |