diff options
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 13 | ||||
-rw-r--r-- | gas/config/obj-coff.c | 4 | ||||
-rw-r--r-- | gas/config/tc-i386.c | 35 |
3 files changed, 46 insertions, 6 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 6e2ad00..886a99b 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,10 @@ +2001-06-10 Alan Modra <amodra@bigpond.net.au> + + * config/obj-coff.c (obj_coff_section): Formatting fix. + + * config/tc-i386.c (md_assemble): Accept branch hints as ",pt" and + ",pn". + 2001-06-08 H.J. Lu <hjl@gnu.org> * config/tc-mips.c (warn_nops): New variable. Set to 0 to @@ -149,9 +156,9 @@ 2000-05-24 Tom Rix <trix@redhat.com> - * config/obj-coff.c : (add_lineno) xcoff allows negative line + * config/obj-coff.c (add_lineno): xcoff allows negative line numbers - * config/tc-ppc.c (ppc_stabx) : fix generated symbol + * config/tc-ppc.c (ppc_stabx): fix generated symbol 2001-05-24 Alan Modra <amodra@one.net.au> @@ -932,7 +939,7 @@ 2001-02-16 matthew green <mrg@redhat.com> - * gas/cgen.c (gas_cgen_md_apply_fix3): Support BFD_RELOC_64. + * cgen.c (gas_cgen_md_apply_fix3): Support BFD_RELOC_64. 2001-02-13 Jim Wilson <wilson@redhat.com> diff --git a/gas/config/obj-coff.c b/gas/config/obj-coff.c index 84706cf..8de8c62 100644 --- a/gas/config/obj-coff.c +++ b/gas/config/obj-coff.c @@ -1493,8 +1493,8 @@ obj_coff_section (ignore) { /* This section's attributes have already been set. Warn if the attributes don't match. */ - flagword matchflags = SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_CODE - | SEC_DATA | SEC_SHARED | SEC_NEVER_LOAD; + flagword matchflags = (SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_CODE + | SEC_DATA | SEC_SHARED | SEC_NEVER_LOAD); if ((flags ^ oldflags) & matchflags) as_warn (_("Ignoring changed section attributes for %s"), name); } diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index c235413..75c0878 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -1269,7 +1269,8 @@ md_assemble (line) } if (!is_space_char (*l) && *l != END_OF_INSN - && *l != PREFIX_SEPARATOR) + && *l != PREFIX_SEPARATOR + && *l != ',') { as_bad (_("invalid character %s in mnemonic"), output_invalid (*l)); @@ -1360,6 +1361,38 @@ md_assemble (line) } } + if (current_templates->start->opcode_modifier & (Jump | JumpByte)) + { + /* Check for a branch hint. We allow ",pt" and ",pn" for + predict taken and predict not taken respectively. + I'm not sure that branch hints actually do anything on loop + and jcxz insns (JumpByte) for current Pentium4 chips. They + may work in the future and it doesn't hurt to accept them + now. */ + if (l[0] == ',' && l[1] == 'p') + { + if (l[2] == 't') + { + if (! add_prefix (DS_PREFIX_OPCODE)) + return; + l += 3; + } + else if (l[2] == 'n') + { + if (! add_prefix (CS_PREFIX_OPCODE)) + return; + l += 3; + } + } + } + /* Any other comma loses. */ + if (*l == ',') + { + as_bad (_("invalid character %s in mnemonic"), + output_invalid (*l)); + return; + } + /* Check if instruction is supported on specified architecture. */ if (cpu_arch_flags != 0) { |