diff options
author | Alan Modra <amodra@gmail.com> | 2001-06-10 14:07:12 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2001-06-10 14:07:12 +0000 |
commit | 5dd0794dca6376164c29977156282afc59b16388 (patch) | |
tree | 73cfc0079f3bd1a6c7c1d7329c380f1e12a16f04 /gas/config | |
parent | b6a71ccaa16fe88ce84b5fbe4dffab340e92d6bd (diff) | |
download | gdb-5dd0794dca6376164c29977156282afc59b16388.zip gdb-5dd0794dca6376164c29977156282afc59b16388.tar.gz gdb-5dd0794dca6376164c29977156282afc59b16388.tar.bz2 |
Branch hints for Pentium4 as insn modifiers, and some minor tweaks
to formatting.
Diffstat (limited to 'gas/config')
-rw-r--r-- | gas/config/obj-coff.c | 4 | ||||
-rw-r--r-- | gas/config/tc-i386.c | 35 |
2 files changed, 36 insertions, 3 deletions
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) { |