diff options
author | Ben Elliston <bje@au.ibm.com> | 2005-01-21 05:54:38 +0000 |
---|---|---|
committer | Ben Elliston <bje@au.ibm.com> | 2005-01-21 05:54:38 +0000 |
commit | 59c871b45790452b5643de68629dea986f7ffee0 (patch) | |
tree | 2fc7cff38ea2d40bee0b44fa255d421ed3f0f57c /gas | |
parent | 84e43642e3e9729371f4a62b8b1cb5f15008017c (diff) | |
download | gdb-59c871b45790452b5643de68629dea986f7ffee0.zip gdb-59c871b45790452b5643de68629dea986f7ffee0.tar.gz gdb-59c871b45790452b5643de68629dea986f7ffee0.tar.bz2 |
* as.h: Remove #if 0'd code.
* atof-generic.c (atof_generic): Likewise.
* ecoff.c (ecoff_directive_frame): Likewise.
* frags.h (FRAG_APPEND_1_CHAR): Likewise.
* itbl-ops.c (itbl_add_reg): Likewise.
* listing.c (calc_hex): Likewise.
* read.c (MASK_CHAR): Likewise.
* subsegs.c (subsegs_print_statistics): Likewise.
* symbols.c (indent): Likewise.
* write.c (write_relocs): Likewise.
(write_object_file): Likewise.
(relax_frag): Likewise.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 15 | ||||
-rw-r--r-- | gas/as.h | 17 | ||||
-rw-r--r-- | gas/atof-generic.c | 14 | ||||
-rw-r--r-- | gas/ecoff.c | 6 | ||||
-rw-r--r-- | gas/frags.h | 14 | ||||
-rw-r--r-- | gas/itbl-ops.c | 12 | ||||
-rw-r--r-- | gas/listing.c | 4 | ||||
-rw-r--r-- | gas/read.c | 6 | ||||
-rw-r--r-- | gas/subsegs.c | 21 | ||||
-rw-r--r-- | gas/symbols.c | 10 | ||||
-rw-r--r-- | gas/write.c | 29 |
11 files changed, 26 insertions, 122 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index ca40e8a..8b9aa3f 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,18 @@ +2005-01-21 Ben Elliston <bje@au.ibm.com> + + * as.h: Remove #if 0'd code. + * atof-generic.c (atof_generic): Likewise. + * ecoff.c (ecoff_directive_frame): Likewise. + * frags.h (FRAG_APPEND_1_CHAR): Likewise. + * itbl-ops.c (itbl_add_reg): Likewise. + * listing.c (calc_hex): Likewise. + * read.c (MASK_CHAR): Likewise. + * subsegs.c (subsegs_print_statistics): Likewise. + * symbols.c (indent): Likewise. + * write.c (write_relocs): Likewise. + (write_object_file): Likewise. + (relax_frag): Likewise. + 2005-01-20 Nick Clifton <nickc@redhat.com> * as.c (std_longopts): Add an entry for "--a" in order to prevent @@ -104,27 +104,10 @@ extern void *alloca (); #if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 6) #define __PRETTY_FUNCTION__ ((char*)0) #endif -#if 0 - -/* Handle lossage with assert.h. */ -#ifndef BROKEN_ASSERT -#include <assert.h> -#else /* BROKEN_ASSERT */ -#ifndef NDEBUG -#define assert(p) ((p) ? 0 : (as_assert (__FILE__, __LINE__, __PRETTY_FUNCTION__), 0)) -#else -#define assert(p) ((p), 0) -#endif -#endif /* BROKEN_ASSERT */ - -#else - #define assert(P) ((P) ? 0 : (as_assert (__FILE__, __LINE__, __PRETTY_FUNCTION__), 0)) #undef abort #define abort() as_abort (__FILE__, __LINE__, __PRETTY_FUNCTION__) -#endif - /* Now GNU header files... */ #include "ansidecl.h" #ifdef BFD_ASSEMBLER diff --git a/gas/atof-generic.c b/gas/atof-generic.c index 8c599b5..113a0bc 100644 --- a/gas/atof-generic.c +++ b/gas/atof-generic.c @@ -324,19 +324,10 @@ atof_generic (/* return pointer to just AFTER number we read. */ + 1); /* Number of destination littlenums. */ /* Includes guard bits (two littlenums worth) */ -#if 0 /* The integer version below is very close, and it doesn't - require floating point support (which is currently buggy on - the Alpha). */ - maximum_useful_digits = (((double) (precision - 2)) - * ((double) (LITTLENUM_NUMBER_OF_BITS)) - / (LOG_TO_BASE_2_OF_10)) - + 2; /* 2 :: guard digits. */ -#else maximum_useful_digits = (((precision - 2)) * ( (LITTLENUM_NUMBER_OF_BITS)) * 1000000 / 3321928) + 2; /* 2 :: guard digits. */ -#endif if (number_of_digits_available > maximum_useful_digits) { @@ -353,13 +344,8 @@ atof_generic (/* return pointer to just AFTER number we read. */ decimal_exponent += ((long) number_of_digits_before_decimal - (long) number_of_digits_to_use); -#if 0 - more_than_enough_bits_for_digits - = ((((double) number_of_digits_to_use) * LOG_TO_BASE_2_OF_10) + 1); -#else more_than_enough_bits_for_digits = (number_of_digits_to_use * 3321928 / 1000000 + 1); -#endif more_than_enough_littlenums_for_digits = (more_than_enough_bits_for_digits diff --git a/gas/ecoff.c b/gas/ecoff.c index d8ad019..1103be2 100644 --- a/gas/ecoff.c +++ b/gas/ecoff.c @@ -3185,14 +3185,10 @@ ecoff_directive_frame (int ignore ATTRIBUTE_UNUSED) cur_proc_ptr->pdr.pcreg = tc_get_register (0); -#if 0 /* Alpha-OSF1 adds "the offset of saved $a0 from $sp", according to Sandro. I don't yet know where this value should be stored, if - anywhere. */ - demand_empty_rest_of_line (); -#else + anywhere. Don't call demand_empty_rest_of_line (). */ s_ignore (42); -#endif } /* Parse .mask directives. */ diff --git a/gas/frags.h b/gas/frags.h index a3bd522..70da242 100644 --- a/gas/frags.h +++ b/gas/frags.h @@ -119,22 +119,8 @@ COMMON fragS zero_address_frag; /* For local common (N_BSS segment) fixups. */ COMMON fragS bss_address_frag; -#if 0 -/* A macro to speed up appending exactly 1 char to current frag. */ -/* JF changed < 1 to <= 1 to avoid a race condition. */ -#define FRAG_APPEND_1_CHAR(datum) \ -{ \ - if (obstack_room (&frags) <= 1) \ - { \ - frag_wane (frag_now); \ - frag_new (0); \ - } \ - obstack_1grow (&frags, datum); \ -} -#else extern void frag_append_1_char (int); #define FRAG_APPEND_1_CHAR(X) frag_append_1_char (X) -#endif void frag_init (void); fragS *frag_alloc (struct obstack *); diff --git a/gas/itbl-ops.c b/gas/itbl-ops.c index 089bff4..6498a0f 100644 --- a/gas/itbl-ops.c +++ b/gas/itbl-ops.c @@ -204,18 +204,6 @@ struct itbl_entry * itbl_add_reg (int yyprocessor, int yytype, char *regname, int regnum) { -#if 0 -#include "as.h" -#include "symbols.h" - /* Since register names don't have a prefix, we put them in the symbol table so - they can't be used as symbols. This also simplifies argument parsing as - we can let gas parse registers for us. The recorded register number is - regnum. */ - /* Use symbol_create here instead of symbol_new so we don't try to - output registers into the object file's symbol table. */ - symbol_table_insert (symbol_create (regname, reg_section, - regnum, &zero_address_frag)); -#endif return alloc_entry (get_processor (yyprocessor), get_type (yytype), regname, (unsigned long) regnum); } diff --git a/gas/listing.c b/gas/listing.c index aa22c5e..aaf6bf7 100644 --- a/gas/listing.c +++ b/gas/listing.c @@ -613,10 +613,6 @@ calc_hex (list_info_type *list) sprintf (data_buffer + data_buffer_size, "%02X", (frag_ptr->fr_literal[var_rep_idx]) & 0xff); -#if 0 - data_buffer[data_buffer_size++] = '*'; - data_buffer[data_buffer_size++] = '*'; -#endif data_buffer_size += 2; var_rep_idx++; @@ -20,14 +20,10 @@ along with GAS; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#if 0 -/* If your chars aren't 8 bits, you will change this a bit. +/* If your chars aren't 8 bits, you will change this a bit (eg. to 0xFF). But then, GNU isn't spozed to run on your machine anyway. (RMS is so shortsighted sometimes.) */ -#define MASK_CHAR (0xFF) -#else #define MASK_CHAR ((int)(unsigned char) -1) -#endif /* This is the largest known floating point format (for now). It will grow when we do 4361 style flonums. */ diff --git a/gas/subsegs.c b/gas/subsegs.c index 8b0679c..c63f301 100644 --- a/gas/subsegs.c +++ b/gas/subsegs.c @@ -616,27 +616,6 @@ subsegs_print_statistics (FILE *file) for (fragp = frchp->frch_root; fragp; fragp = fragp->fr_next) { -#if 0 - switch (fragp->fr_type) - { - case rs_fill: - fprintf (file, "f"); break; - case rs_align: - fprintf (file, "a"); break; - case rs_align_code: - fprintf (file, "c"); break; - case rs_org: - fprintf (file, "o"); break; - case rs_machine_dependent: - fprintf (file, "m"); break; - case rs_space: - fprintf (file, "s"); break; - case 0: - fprintf (file, "0"); break; - default: - fprintf (file, "?"); break; - } -#endif count++; } fprintf (file, "\n"); diff --git a/gas/symbols.c b/gas/symbols.c index 04e239a..3ea11ab 100644 --- a/gas/symbols.c +++ b/gas/symbols.c @@ -2370,16 +2370,6 @@ int indent_level; Available for modification inside a gdb session. */ int max_indent_level = 8; -#if 0 - -static void -indent (void) -{ - printf ("%*s", indent_level * 4, ""); -} - -#endif - void print_symbol_value_1 (FILE *file, symbolS *sym) { diff --git a/gas/write.c b/gas/write.c index f9a543a..320e359 100644 --- a/gas/write.c +++ b/gas/write.c @@ -942,12 +942,12 @@ write_relocs (bfd *abfd, asection *sec, PTR xxx ATTRIBUTE_UNUSED) continue; } -#if 0 - /* This test is triggered inappropriately for the SH. */ - if (fixp->fx_where + fixp->fx_size - > fixp->fx_frag->fr_fix + fixp->fx_frag->fr_offset) - abort (); -#endif + /* + This test is triggered inappropriately for the SH: + if (fixp->fx_where + fixp->fx_size + > fixp->fx_frag->fr_fix + fixp->fx_frag->fr_offset) + abort (); + */ s = bfd_install_relocation (stdoutput, reloc, fixp->fx_frag->fr_literal, @@ -1929,13 +1929,6 @@ write_object_file (void) if (S_IS_DEFINED (symp) == 0 && S_GET_VALUE (symp) != 0) S_SET_SEGMENT (symp, bfd_com_section_ptr); -#if 0 - printf ("symbol `%s'\n\t@%x: value=%d flags=%x seg=%s\n", - S_GET_NAME (symp), symp, - S_GET_VALUE (symp), - symbol_get_bfdsym (symp)->flags, - segment_name (S_GET_SEGMENT (symp))); -#endif #ifdef obj_frob_symbol obj_frob_symbol (symp, punt); @@ -2083,14 +2076,10 @@ relax_frag (segT segment, fragS *fragP, long stretch) #ifdef TC_PCREL_ADJUST /* Currently only the ns32k family needs this. */ aim += TC_PCREL_ADJUST (fragP); -/* #else */ - /* This machine doesn't want to use pcrel_adjust. - In that case, pcrel_adjust should be zero. */ -#if 0 - assert (fragP->fr_targ.ns32k.pcrel_adjust == 0); -#endif #endif -#ifdef md_prepare_relax_scan /* formerly called M68K_AIM_KLUDGE */ + +#ifdef md_prepare_relax_scan + /* Formerly called M68K_AIM_KLUDGE. */ md_prepare_relax_scan (fragP, address, aim, this_state, this_type); #endif |