From: Richard Henderson Date: Sat, 8 Sep 2001 01:12:00 +0000 (+0000) Subject: * config/tc-alpha.c (alpha_reloc_op_tag): Replace need_seq with X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ec8fcf4a1d0f323abdbd2ce21e3c91615eb6c1c1;p=binutils-gdb.git * config/tc-alpha.c (alpha_reloc_op_tag): Replace need_seq with require_seq and allow_seq. Let !literal omit the sequence number. (tokenize_arguments): Reject sequence numbers of !allow_seq. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index d55b2012087..0c27bef53b3 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,9 @@ +2001-09-07 Richard Henderson + + * config/tc-alpha.c (alpha_reloc_op_tag): Replace need_seq with + require_seq and allow_seq. Let !literal omit the sequence number. + (tokenize_arguments): Reject sequence numbers of !allow_seq. + 2001-09-08 Jakub Jelinek * config/tc-sparc.c (md_apply_fix3): Handle relocs against SEC_MERGE diff --git a/gas/config/tc-alpha.c b/gas/config/tc-alpha.c index 9c629231b00..834186a4925 100644 --- a/gas/config/tc-alpha.c +++ b/gas/config/tc-alpha.c @@ -479,25 +479,26 @@ static int alpha_flag_show_after_trunc = 0; /* -H */ ? (abort (), 0) \ : (int) (op) - (int) O_literal) ]) -#define DEF(NAME, RELOC, NEED_SEQ) \ - { #NAME, sizeof(#NAME)-1, O_##NAME, RELOC, NEED_SEQ } +#define DEF(NAME, RELOC, REQ, ALLOW) \ + { #NAME, sizeof(#NAME)-1, O_##NAME, RELOC, REQ, ALLOW} static const struct alpha_reloc_op_tag { const char *name; /* string to lookup */ size_t length; /* size of the string */ operatorT op; /* which operator to use */ bfd_reloc_code_real_type reloc; /* relocation before frob */ - unsigned int need_seq : 1; /* require a sequence number */ + unsigned int require_seq : 1; /* require a sequence number */ + unsigned int allow_seq : 1; /* allow a sequence number */ } alpha_reloc_op[] = { - DEF(literal, BFD_RELOC_ALPHA_ELF_LITERAL, 1), - DEF(lituse_addr, DUMMY_RELOC_LITUSE_ADDR, 1), - DEF(lituse_base, DUMMY_RELOC_LITUSE_BASE, 1), - DEF(lituse_bytoff, DUMMY_RELOC_LITUSE_BYTOFF, 1), - DEF(lituse_jsr, DUMMY_RELOC_LITUSE_JSR, 1), - DEF(gpdisp, BFD_RELOC_ALPHA_GPDISP, 1), - DEF(gprelhigh, BFD_RELOC_ALPHA_GPREL_HI16, 0), - DEF(gprellow, BFD_RELOC_ALPHA_GPREL_LO16, 0), - DEF(gprel, BFD_RELOC_GPREL16, 0) + DEF(literal, BFD_RELOC_ALPHA_ELF_LITERAL, 0, 1), + DEF(lituse_addr, DUMMY_RELOC_LITUSE_ADDR, 1, 1), + DEF(lituse_base, DUMMY_RELOC_LITUSE_BASE, 1, 1), + DEF(lituse_bytoff, DUMMY_RELOC_LITUSE_BYTOFF, 1, 1), + DEF(lituse_jsr, DUMMY_RELOC_LITUSE_JSR, 1, 1), + DEF(gpdisp, BFD_RELOC_ALPHA_GPDISP, 1, 1), + DEF(gprelhigh, BFD_RELOC_ALPHA_GPREL_HI16, 0, 0), + DEF(gprellow, BFD_RELOC_ALPHA_GPREL_LO16, 0, 0), + DEF(gprel, BFD_RELOC_GPREL16, 0, 0) }; #undef DEF @@ -1874,29 +1875,32 @@ tokenize_arguments (str, tok, ntok) SKIP_WHITESPACE (); if (*input_line_pointer != '!') { - if (r->need_seq) + if (r->require_seq) { - as_bad (_("No !sequence-number after !%s"), - input_line_pointer); + as_bad (_("no sequence number after !%s"), p); goto err_report; } - tok->X_op = r->op; tok->X_add_number = 0; - reloc_found_p = 1; - ++tok; - break; } + else + { + if (! r->allow_seq) + { + as_bad (_("!%s does not use a sequence number"), p); + goto err_report; + } - input_line_pointer++; + input_line_pointer++; - /* Parse !sequence_number */ - expression (tok); - if (tok->X_op != O_constant || tok->X_add_number <= 0) - { - as_bad (_("Bad sequence number: !%s!%s"), - r->name, input_line_pointer); - goto err_report; + /* Parse !sequence_number */ + expression (tok); + if (tok->X_op != O_constant || tok->X_add_number <= 0) + { + as_bad (_("Bad sequence number: !%s!%s"), + r->name, input_line_pointer); + goto err_report; + } } tok->X_op = r->op;