From 22cbf2e74af43dfe9ff6f8e141ffc5f8c8b679ed Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Tue, 19 Jul 2005 04:11:19 +0000 Subject: [PATCH] gas/testsuite/ 2005-07-18 H.J. Lu * gas/i386/i386.exp: Add suffix. * gas/i386/suffix.d: New file. * gas/i386/suffix.s: Likewise. opcodes/ 2005-07-18 H.J. Lu * i386-dis.c (PNI_Fixup): Update comment. (VMX_Fixup): Properly handle the suffix check. --- gas/testsuite/ChangeLog | 7 +++++++ gas/testsuite/gas/i386/i386.exp | 1 + gas/testsuite/gas/i386/suffix.d | 15 +++++++++++++++ gas/testsuite/gas/i386/suffix.s | 13 +++++++++++++ opcodes/ChangeLog | 5 +++++ opcodes/i386-dis.c | 6 +++--- 6 files changed, 44 insertions(+), 3 deletions(-) create mode 100644 gas/testsuite/gas/i386/suffix.d create mode 100644 gas/testsuite/gas/i386/suffix.s diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index fffbdf91a6..6added28d2 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2005-07-18 H.J. Lu + + * gas/i386/i386.exp: Add suffix. + + * gas/i386/suffix.d: New file. + * gas/i386/suffix.s: Likewise. + 2005-07-18 John David Anglin * gas/hppa/basic/fp_comp.s: Add level 1.1 directive. diff --git a/gas/testsuite/gas/i386/i386.exp b/gas/testsuite/gas/i386/i386.exp index 8cafb0ad07..6e0340db0a 100644 --- a/gas/testsuite/gas/i386/i386.exp +++ b/gas/testsuite/gas/i386/i386.exp @@ -61,6 +61,7 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_32_check]] run_dump_test "prescott" run_dump_test "sib" run_dump_test "vmx" + run_dump_test "suffix" if {![istarget "*-*-aix*"] && (![is_elf_format] || [istarget "*-*-linux*"] diff --git a/gas/testsuite/gas/i386/suffix.d b/gas/testsuite/gas/i386/suffix.d new file mode 100644 index 0000000000..fa57bb7e26 --- /dev/null +++ b/gas/testsuite/gas/i386/suffix.d @@ -0,0 +1,15 @@ +#objdump: -dw -Msuffix +#name: i386 suffix + +.*: +file format .* + +Disassembly of section .text: + +0+000 : + 0: 0f 01 c8 [ ]*monitor %eax,%ecx,%edx + 3: 0f 01 c9 [ ]*mwait %eax,%ecx + 6: 0f 01 c1 [ ]*vmcall + 9: 0f 01 c2 [ ]*vmlaunch + c: 0f 01 c3 [ ]*vmresume + f: 0f 01 c4 [ ]*vmxoff + ... diff --git a/gas/testsuite/gas/i386/suffix.s b/gas/testsuite/gas/i386/suffix.s new file mode 100644 index 0000000000..2ce1c3dcd8 --- /dev/null +++ b/gas/testsuite/gas/i386/suffix.s @@ -0,0 +1,13 @@ +# Disassembling with -Msuffix. + + .text +foo: + monitor + mwait + + vmcall + vmlaunch + vmresume + vmxoff + + .p2align 4,0 diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index b9c82c7857..4bfb6790c3 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,8 @@ +2005-07-18 H.J. Lu + + * i386-dis.c (PNI_Fixup): Update comment. + (VMX_Fixup): Properly handle the suffix check. + 2005-07-16 John David Anglin * hppa-dis.c (print_insn_hppa): Add space after 'w' in wide-mode diff --git a/opcodes/i386-dis.c b/opcodes/i386-dis.c index 692562d990..ae16759c28 100644 --- a/opcodes/i386-dis.c +++ b/opcodes/i386-dis.c @@ -4419,7 +4419,7 @@ PNI_Fixup (int extrachar ATTRIBUTE_UNUSED, int sizeflag) /* Override "sidt". */ char *p = obuf + strlen (obuf) - 4; - /* We might have a suffix. */ + /* We might have a suffix when disassembling with -Msuffix. */ if (*p == 'i') --p; @@ -4617,8 +4617,8 @@ VMX_Fixup (int extrachar ATTRIBUTE_UNUSED, int sizeflag) /* Override "sgdt". */ char *p = obuf + strlen (obuf) - 4; - /* We might have a suffix. */ - if (*p == 'i') + /* We might have a suffix when disassembling with -Msuffix. */ + if (*p == 'g') --p; switch (rm)