This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [cygwin] testsuite failure: FAIL: i386 displacement (Intel mode)


On Mon, Sep 14, 2009 at 9:05 PM, Christian Joensson
<christian.joensson@gmail.com> wrote:

> /usr/local/src/trunk/objdir-binutils/gas/testsuite/../../binutils/objdump
> ?-dw -Mintel dump.o
> Executing on host: sh -c
> {/usr/local/src/trunk/objdir-binutils/gas/testsuite/../../binutils/objdump
> ?-dw -Mintel dump.o >dump.out 2>gas.stderr} ?/dev/null ?(timeout =
> 300)
> spawn [open ...]
>
> regexp_diff match failure
> regexp "^[ ? ? ?]*[a-f0-9]+: ? ?8b 98 00 00 00 80 ? ? ? mov ? ?ebx,DWORD PTR
> \[eax-0x80000000\]$"
> line ? " ? 6: ? 8b 98 00 00 00 80 ? ? ? mov ? ?ebx,DWORD PTR [eax--0x80000000]"
> regexp_diff match failure
> regexp "^[ ? ? ?]*[a-f0-9]+: ? ?8b 98 00 00 00 80 ? ? ? mov ? ?ebx,DWORD PTR
> \[eax-0x80000000\]$"
> line ? " ? c: ? 8b 98 00 00 00 80 ? ? ? mov ? ?ebx,DWORD PTR [eax--0x80000000]"
> FAIL: i386 displacement (Intel mode)
>

The problem is when disp == -disp, we added extra '-'. This patch
fixed it.

-- 
H.J.
---

2009-09-15  H.J. Lu  <hongjiu.lu@intel.com>

	* i386-dis.c (OP_E_memory): Don't print '-' in Intel mode if
	disp == -disp.

Index: i386-dis.c
===================================================================
--- i386-dis.c	(revision 6828)
+++ i386-dis.c	(working copy)
@@ -11107,7 +11107,7 @@ OP_E_memory (int bytemode, int sizeflag)
 		  *obufp++ = '+';
 		  *obufp = '\0';
 		}
-	      else if (modrm.mod != 1)
+	      else if (modrm.mod != 1 && disp != -disp)
 		{
 		  *obufp++ = '-';
 		  *obufp = '\0';


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]