This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [cygwin] testsuite failure: FAIL: i386 displacement (Intel mode)
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Christian Joensson <christian dot joensson at gmail dot com>
- Cc: binutils <binutils at sourceware dot org>
- Date: Tue, 15 Sep 2009 10:53:03 -0700
- Subject: Re: [cygwin] testsuite failure: FAIL: i386 displacement (Intel mode)
- References: <5460e3330909142105q50bb8e0dk4bd6812ec1fa70a4@mail.gmail.com>
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';