Browse Source

* config/atof-vax.c (atof_vax_sizeof): Change return type to unsigned.

(md_atof): Make number_of_chars unsigned.  Revert last change.
	* config/tc-or32.c (md_apply_fix): Delete bogus assertions.
	* config/tc-sh.c (sh_optimize_expr): Only define for OBJ_ELF.
	* config/tc-sh.h (md_optimize_expr): Likewise.
	* config/tc-sh64.c (shmedia_md_pcrel_from_section): Delete bogus
	assertion.
	* config/tc-xtensa.c (convert_frag_immed_finish_loop): Likewise.
binutils-2_18-branch
Alan Modra 20 years ago
parent
commit
541d2ffd36
  1. 11
      gas/ChangeLog
  2. 8
      gas/config/atof-vax.c
  3. 6
      gas/config/tc-or32.c
  4. 4
      gas/config/tc-sh.c
  5. 2
      gas/config/tc-sh.h
  6. 2
      gas/config/tc-sh64.c
  7. 5
      gas/config/tc-xtensa.c

11
gas/ChangeLog

@ -1,3 +1,14 @@
2007-04-21 Alan Modra <amodra@bigpond.net.au>
* config/atof-vax.c (atof_vax_sizeof): Change return type to unsigned.
(md_atof): Make number_of_chars unsigned. Revert last change.
* config/tc-or32.c (md_apply_fix): Delete bogus assertions.
* config/tc-sh.c (sh_optimize_expr): Only define for OBJ_ELF.
* config/tc-sh.h (md_optimize_expr): Likewise.
* config/tc-sh64.c (shmedia_md_pcrel_from_section): Delete bogus
assertion.
* config/tc-xtensa.c (convert_frag_immed_finish_loop): Likewise.
2007-04-21 Nick Clifton <nickc@redhat.com>
* config/atof-vax.c (md_atof): Fix comparison inside know().

8
gas/config/atof-vax.c

@ -1,5 +1,5 @@
/* atof_vax.c - turn a Flonum into a VAX floating point number
Copyright 1987, 1992, 1993, 1995, 1997, 1999, 2000, 2005
Copyright 1987, 1992, 1993, 1995, 1997, 1999, 2000, 2005, 2007
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@ -35,7 +35,7 @@ int flonum_gen2vax (int, FLONUM_TYPE *, LITTLENUM_TYPE *);
/* Number of chars in flonum type 'letter'. */
static int
static unsigned int
atof_vax_sizeof (int letter)
{
int return_value;
@ -395,7 +395,7 @@ md_atof (int what_statement_type,
{
LITTLENUM_TYPE words[MAXIMUM_NUMBER_OF_LITTLENUMS];
char kind_of_float;
int number_of_chars;
unsigned int number_of_chars;
LITTLENUM_TYPE *littlenumP;
switch (what_statement_type)
@ -435,7 +435,7 @@ md_atof (int what_statement_type,
a little-endian machine, be very careful about
converting words to chars. */
number_of_chars = atof_vax_sizeof (kind_of_float);
know (number_of_chars <= (int)(MAXIMUM_NUMBER_OF_LITTLENUMS * sizeof (LITTLENUM_TYPE)));
know (number_of_chars <= MAXIMUM_NUMBER_OF_LITTLENUMS * sizeof (LITTLENUM_TYPE));
limit = words + (number_of_chars / sizeof (LITTLENUM_TYPE));
for (littlenumP = words; littlenumP < limit; littlenumP++)
{

6
gas/config/tc-or32.c

@ -1,5 +1,6 @@
/* Assembly backend for the OpenRISC 1000.
Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
Copyright (C) 2002, 2003, 2005, 2007
Free Software Foundation, Inc.
Contributed by Damjan Lampret <lampret@opencores.org>.
Modified bu Johan Rydberg, <johan.rydberg@netinsight.se>.
Based upon a29k port.
@ -616,9 +617,6 @@ md_apply_fix (fixS * fixP, valueT * val, segT seg ATTRIBUTE_UNUSED)
fixP->fx_addnumber = t_val; /* Remember value for emit_reloc. */
know (fixP->fx_size == 4);
know (fixP->fx_r_type < BFD_RELOC_NONE);
switch (fixP->fx_r_type)
{
case BFD_RELOC_32: /* XXXXXXXX pattern in a word. */

4
gas/config/tc-sh.c

@ -886,7 +886,6 @@ align_test_frag_offset_fixed_p (const fragS *frag1, const fragS *frag2,
return FALSE;
}
#endif /* OBJ_ELF */
/* Optimize a difference of symbols which have rs_align_test frag if
possible. */
@ -894,7 +893,6 @@ align_test_frag_offset_fixed_p (const fragS *frag1, const fragS *frag2,
int
sh_optimize_expr (expressionS *l, operatorT op, expressionS *r)
{
#ifdef OBJ_ELF
bfd_vma frag_off;
if (op == O_subtract
@ -915,9 +913,9 @@ sh_optimize_expr (expressionS *l, operatorT op, expressionS *r)
l->X_add_symbol = 0;
return 1;
}
#endif /* OBJ_ELF */
return 0;
}
#endif /* OBJ_ELF */
/* This function is called once, at assembler startup time. This should
set up all the tables, etc that the MD part of the assembler needs. */

2
gas/config/tc-sh.h

@ -47,8 +47,10 @@ extern void sh_cons_align (int);
/* We need to optimize expr with taking account of rs_align_test
frags. */
#ifdef OBJ_ELF
#define md_optimize_expr(l,o,r) sh_optimize_expr (l, o, r)
extern int sh_optimize_expr (expressionS *, operatorT, expressionS *);
#endif
/* When relaxing, we need to generate relocations for alignment
directives. */

2
gas/config/tc-sh64.c

@ -3035,8 +3035,6 @@ sh64_target_mach (void)
valueT
shmedia_md_pcrel_from_section (struct fix *fixP, segT sec ATTRIBUTE_UNUSED)
{
know (fixP->fx_frag->fr_type == rs_machine_dependent);
/* Use the ISA for the instruction to decide which offset to use. We
can glean it from the fisup type. */
switch (fixP->fx_r_type)

5
gas/config/tc-xtensa.c

@ -9513,11 +9513,6 @@ convert_frag_immed_finish_loop (segT segP, fragS *fragP, TInsn *tinsn)
target = 0;
}
know (symbolP);
know (symbolP->sy_frag);
know (!(S_GET_SEGMENT (symbolP) == absolute_section)
|| symbol_get_frag (symbolP) == &zero_address_frag);
loop_length = target - (fragP->fr_address + fragP->fr_fix);
loop_length_hi = loop_length & ~0x0ff;
loop_length_lo = loop_length & 0x0ff;

Loading…
Cancel
Save