This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: PATCH: Add Intel VMX instructions
On Tue, Jul 19, 2005 at 11:11:20AM +0930, Alan Modra wrote:
> On Mon, Jul 18, 2005 at 02:04:55AM -0600, Jan Beulich wrote:
> > In VMX_Fixup:
> >
> > >+ /* We might have a suffix. */
> > >+ if (*p == 'i')
> > >+ --p;
> >
> > I think this needs to be
> >
> > /* We might have a suffix. */
> > if (*p == 'g')
> > --p;
>
> No, but you could change the comment to
>
> /* We might have a suffix, ie. "sidtw" or "sidtl" in obuf,
> in which case we need to back up one more char. */
>
This is the patch I checked in.
H.J.
---
gas/testsuite/
2005-07-18 H.J. Lu <hongjiu.lu@intel.com>
* gas/i386/i386.exp: Add suffix.
* gas/i386/suffix.d: New file.
* gas/i386/suffix.s: Likewise.
opcodes/
2005-07-18 H.J. Lu <hongjiu.lu@intel.com>
* i386-dis.c (PNI_Fixup): Update comment.
(VMX_Fixup): Properly handle the suffix check.
--- binutils/gas/testsuite/gas/i386/i386.exp.suffix 2005-07-18 08:52:04.000000000 -0700
+++ binutils/gas/testsuite/gas/i386/i386.exp 2005-07-18 19:53:02.000000000 -0700
@@ -61,6 +61,7 @@ if [expr ([istarget "i*86-*-*"] || [ist
run_dump_test "prescott"
run_dump_test "sib"
run_dump_test "vmx"
+ run_dump_test "suffix"
if {![istarget "*-*-aix*"]
&& (![is_elf_format] || [istarget "*-*-linux*"]
--- binutils/gas/testsuite/gas/i386/suffix.d.suffix 2005-07-18 20:03:44.000000000 -0700
+++ binutils/gas/testsuite/gas/i386/suffix.d 2005-07-18 20:02:53.000000000 -0700
@@ -0,0 +1,15 @@
+#objdump: -dw -Msuffix
+#name: i386 suffix
+
+.*: +file format .*
+
+Disassembly of section .text:
+
+0+000 <foo>:
+ 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
+ ...
--- binutils/gas/testsuite/gas/i386/suffix.s.suffix 2005-07-18 20:03:47.000000000 -0700
+++ binutils/gas/testsuite/gas/i386/suffix.s 2005-07-18 19:58:02.000000000 -0700
@@ -0,0 +1,13 @@
+# Disassembling with -Msuffix.
+
+ .text
+foo:
+ monitor
+ mwait
+
+ vmcall
+ vmlaunch
+ vmresume
+ vmxoff
+
+ .p2align 4,0
--- binutils/opcodes/i386-dis.c.suffix 2005-07-15 07:24:19.000000000 -0700
+++ binutils/opcodes/i386-dis.c 2005-07-18 20:00:01.000000000 -0700
@@ -4419,7 +4419,7 @@ PNI_Fixup (int extrachar ATTRIBUTE_UNUSE
/* 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_UNUSE
/* 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)