diff options
author | Alan Modra <amodra@gmail.com> | 2007-04-21 06:54:57 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2007-04-21 06:54:57 +0000 |
commit | db55703487ec04ac06156ab76ea068055e494dde (patch) | |
tree | 6fde7e7c055a968a4805d584e9bf0a897237c1a5 /gas | |
parent | c43a438d5eb0a2e19397a4c0fb51ce3a68ed1503 (diff) | |
download | gdb-db55703487ec04ac06156ab76ea068055e494dde.zip gdb-db55703487ec04ac06156ab76ea068055e494dde.tar.gz gdb-db55703487ec04ac06156ab76ea068055e494dde.tar.bz2 |
gas/
* expr.c (expr): Assert on rankarg, not rank which can be unsigned.
* read.c (read_a_source_file): Remove buffer_limit[-1] assertion.
Don't skip over NUL char.
(pseudo_set): Set X_op for registers to O_register.
* symbols.c (symbol_clone): Remove assertion that sym is defined.
(resolve_symbol_value): Resolve O_register symbols.
* config/tc-i386.c (parse_real_register): Don't use i386_float_regtab.
Instead find st(0) by hash lookup.
* config/tc-ppc.c (ppc_macro): Warning fix.
opcodes/
* i386-opc.c (i386_float_regtab, i386_float_regtab_size): Delete.
Move contents to..
(i386_regtab): ..here.
* i386-opc.h (i386_float_regtab, i386_float_regtab_size): Delete.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 10 | ||||
-rw-r--r-- | gas/config/tc-i386.c | 6 | ||||
-rw-r--r-- | gas/config/tc-ppc.c | 4 | ||||
-rw-r--r-- | gas/expr.c | 4 | ||||
-rw-r--r-- | gas/read.c | 6 | ||||
-rw-r--r-- | gas/symbols.c | 8 |
6 files changed, 24 insertions, 14 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 9c2f7f1..f573cfb 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,5 +1,15 @@ 2007-04-21 Alan Modra <amodra@bigpond.net.au> + * expr.c (expr): Assert on rankarg, not rank which can be unsigned. + * read.c (read_a_source_file): Remove buffer_limit[-1] assertion. + Don't skip over NUL char. + (pseudo_set): Set X_op for registers to O_register. + * symbols.c (symbol_clone): Remove assertion that sym is defined. + (resolve_symbol_value): Resolve O_register symbols. + * config/tc-i386.c (parse_real_register): Don't use i386_float_regtab. + Instead find st(0) by hash lookup. + * config/tc-ppc.c (ppc_macro): Warning fix. + * as.h (ENABLE_CHECKING): Default define to 0. (know): Assert if ENABLE_CHECKING. (struct relax_type): Remove superfluous declaration. diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index 0b60387..bc0945c 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -5804,14 +5804,16 @@ parse_real_register (char *reg_string, char **end_op) ++s; if (*s >= '0' && *s <= '7') { - r = &i386_float_regtab[*s - '0']; + int fpr = *s - '0'; ++s; if (is_space_char (*s)) ++s; if (*s == ')') { *end_op = s + 1; - return r; + r = hash_find (reg_hash, "st(0)"); + know (r); + return r + fpr; } } /* We have "%st(" then garbage. */ diff --git a/gas/config/tc-ppc.c b/gas/config/tc-ppc.c index 1755363..978f0f3 100644 --- a/gas/config/tc-ppc.c +++ b/gas/config/tc-ppc.c @@ -2816,7 +2816,7 @@ ppc_macro (str, macro) char *s; unsigned int len; const char *format; - int arg; + unsigned int arg; char *send; char *complete; @@ -2854,7 +2854,7 @@ ppc_macro (str, macro) else { arg = strtol (format + 1, &send, 10); - know (send != format && arg >= 0 && arg < count); + know (send != format && arg < count); len += strlen (operands[arg]); format = send; } @@ -1,6 +1,6 @@ /* expr.c -operands, expressions- Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, - 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 + 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -1636,7 +1636,7 @@ expr (int rankarg, /* Larger # is higher rank. */ operatorT op_right; int op_chars; - know (rank >= 0); + know (rankarg >= 0); /* Save the value of dot for the fixup code. */ if (rank == 0) @@ -607,8 +607,6 @@ read_a_source_file (char *name) last_eol = NULL; #endif - know (buffer_limit[-1] == '\n'); /* Must have a sentinel. */ - while (input_line_pointer < buffer_limit) { /* We have more of this buffer to parse. */ @@ -705,8 +703,7 @@ read_a_source_file (char *name) If you must pass stuff, please pass a tree!) */ if ((c = *input_line_pointer++) == '\t' || c == ' ' - || c == '\f' - || c == 0) + || c == '\f') c = *input_line_pointer++; know (c != ' '); /* No further leading whitespace. */ @@ -3491,6 +3488,7 @@ pseudo_set (symbolS *symbolP) S_SET_SEGMENT (symbolP, reg_section); S_SET_VALUE (symbolP, (valueT) exp.X_add_number); set_zero_frag (symbolP); + symbol_get_value_expression (symbolP)->X_op = O_register; break; case O_symbol: diff --git a/gas/symbols.c b/gas/symbols.c index 2e098f1..816395f 100644 --- a/gas/symbols.c +++ b/gas/symbols.c @@ -1,6 +1,6 @@ /* symbols.c -symbol table- Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, - 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 + 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -563,8 +563,6 @@ symbol_clone (symbolS *orgsymP, int replace) orgsymP = local_symbol_convert ((struct local_symbol *) orgsymP); bsymorg = orgsymP->bsym; - know (S_IS_DEFINED (orgsymP)); - newsymP = obstack_alloc (¬es, sizeof (*newsymP)); *newsymP = *orgsymP; bsymnew = bfd_make_empty_symbol (bfd_asymbol_bfd (bsymorg)); @@ -1123,6 +1121,9 @@ resolve_symbol_value (symbolS *symp) final_val += symp->sy_frag->fr_address / OCTETS_PER_BYTE; if (final_seg == expr_section) final_seg = absolute_section; + /* Fall through. */ + + case O_register: resolved = 1; break; @@ -1400,7 +1401,6 @@ resolve_symbol_value (symbolS *symp) && symbol_resolved_p (op_symbol)); break; - case O_register: case O_big: case O_illegal: /* Give an error (below) if not in expr_section. We don't |