aboutsummaryrefslogtreecommitdiff
path: root/opcodes
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2012-08-06 22:08:25 +0000
committerRoland McGrath <roland@gnu.org>2012-08-06 22:08:25 +0000
commitde88229846525b2afb4a8b85b7f60f3246d3e90d (patch)
tree8f49a4873e0368cd8c47340ce3c8f43b3bb6c4b4 /opcodes
parent99262e37efe7767e8d07aabdddf793dadc14c3ce (diff)
downloadbinutils-de88229846525b2afb4a8b85b7f60f3246d3e90d.zip
binutils-de88229846525b2afb4a8b85b7f60f3246d3e90d.tar.gz
binutils-de88229846525b2afb4a8b85b7f60f3246d3e90d.tar.bz2
gas/testsuite/
* gas/i386/x86-64-stack.s: Add cases for push segment register. * gas/i386/x86-64-stack.d: Updated. * gas/i386/x86-64-stack-suffix.d: Updated. * gas/i386/x86-64-stack-intel.d: Updated. * gas/i386/ilp32/x86-64-stack.d: Updated. * gas/i386/ilp32/x86-64-stack-suffix.d: Updated. * gas/i386/ilp32/x86-64-stack-intel.d: Updated. opcodes/ * i386-dis.c (print_insn): Print spaces between multiple excess prefixes. Return actual number of excess prefixes consumed, not always one. * i386-dis.c (OP_REG): Ignore REX_B for segment register cases.
Diffstat (limited to 'opcodes')
-rw-r--r--opcodes/ChangeLog8
-rw-r--r--opcodes/i386-dis.c18
2 files changed, 20 insertions, 6 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index c90599b..25d53fc 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,4 +1,12 @@
2012-08-06 Roland McGrath <mcgrathr@google.com>
+
+ * i386-dis.c (print_insn): Print spaces between multiple excess
+ prefixes. Return actual number of excess prefixes consumed,
+ not always one.
+
+ * i386-dis.c (OP_REG): Ignore REX_B for segment register cases.
+
+2012-08-06 Roland McGrath <mcgrathr@google.com>
Victor Khimenko <khim@google.com>
H.J. Lu <hongjiu.lu@intel.com>
diff --git a/opcodes/i386-dis.c b/opcodes/i386-dis.c
index 43d7ac3..da5ede5 100644
--- a/opcodes/i386-dis.c
+++ b/opcodes/i386-dis.c
@@ -11450,9 +11450,10 @@ print_insn (bfd_vma pc, disassemble_info *info)
for (i = 0;
i < (int) ARRAY_SIZE (all_prefixes) && all_prefixes[i];
i++)
- (*info->fprintf_func) (info->stream, "%s",
+ (*info->fprintf_func) (info->stream, "%s%s",
+ i == 0 ? "" : " ",
prefix_name (all_prefixes[i], sizeflag));
- return 1;
+ return i;
}
insn_codep = codep;
@@ -13471,6 +13472,15 @@ OP_REG (int code, int sizeflag)
{
const char *s;
int add;
+
+ switch (code)
+ {
+ case es_reg: case ss_reg: case cs_reg:
+ case ds_reg: case fs_reg: case gs_reg:
+ oappend (names_seg[code - es_reg]);
+ return;
+ }
+
USED_REX (REX_B);
if (rex & REX_B)
add = 8;
@@ -13483,10 +13493,6 @@ OP_REG (int code, int sizeflag)
case sp_reg: case bp_reg: case si_reg: case di_reg:
s = names16[code - ax_reg + add];
break;
- case es_reg: case ss_reg: case cs_reg:
- case ds_reg: case fs_reg: case gs_reg:
- s = names_seg[code - es_reg + add];
- break;
case al_reg: case ah_reg: case cl_reg: case ch_reg:
case dl_reg: case dh_reg: case bl_reg: case bh_reg:
USED_REX (0);