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: PATCH: PR gas/10704: as segfault in memory lookup intel syntax


On Wed, Oct 7, 2009 at 10:18 PM, Alan Modra <amodra@bigpond.net.au> wrote:
> On Wed, Oct 07, 2009 at 01:01:06PM -0700, H.J. Lu wrote:
>> + ? ? PR gas/10704
>> + ? ? * gas/i386/intelok.s: Add 2 new tests.
>> + ? ? * gas/i386/intelok.d: Updated.
>
> Breaks on non-ELF x86 targets.
>

I checked in this patch.

Thanks.

-- 
H.J.
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index 101a420..a7cadf0 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,12 @@
+2009-10-08  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR gas/10704
+       * gas/i386/intelok.s: Move 2 PIC tests to ...
+       * gas/i386/intelpic.s: Here.
+
+       * gas/i386/intelok.d: Updated.
+       * gas/i386/intelpic.d: Likewise.
+
 2009-10-07  H.J. Lu  <hongjiu.lu@intel.com>

        PR gas/10704
diff --git a/gas/testsuite/gas/i386/intelok.d b/gas/testsuite/gas/i386/intelok.d
index e471c2e..7a958d5 100644
--- a/gas/testsuite/gas/i386/intelok.d
+++ b/gas/testsuite/gas/i386/intelok.d
@@ -204,6 +204,4 @@ Disassembly of section .text:
 [      ]*[0-9a-f]+:    ea 03 00 00 00 05 00[   ]+l?jmp[        ]+0x5[,:]0x3
 [      ]*[0-9a-f]+:    ff 15 00 00 00 00[      ]+call[
]+DWORD PTR (ds:)?(0x)?0
 [      ]*[0-9a-f]+:    66 ff 25 00 00 00 00[   ]+jmp[  ]+WORD PTR (ds:)?(0x)?0
-[      ]*[a-f0-9]+:    ff 24 85 3c 05 00 00    jmp    DWORD PTR
\[eax\*4\+0x53c\]
-[      ]*[a-f0-9]+:    8d 83 4a 05 00 00       lea    eax,\[ebx\+0x54a\]
 #pass
diff --git a/gas/testsuite/gas/i386/intelok.s b/gas/testsuite/gas/i386/intelok.s
index 169fc45..6883301 100644
--- a/gas/testsuite/gas/i386/intelok.s
+++ b/gas/testsuite/gas/i386/intelok.s
@@ -215,8 +215,3 @@ start:
        jmp     5:[3]
        call    dword ptr xtrn
        jmp     word ptr xtrn
-
-.L11:
-        jmp     DWORD PTR[ .L11  + eax * 4 ]
-.LC0:
-        lea     eax, DWORD PTR[ .LC0@GOTOFF + ebx ]
diff --git a/gas/testsuite/gas/i386/intelpic.d
b/gas/testsuite/gas/i386/intelpic.d
index 4a689ec..e1eea01 100644
--- a/gas/testsuite/gas/i386/intelpic.d
+++ b/gas/testsuite/gas/i386/intelpic.d
@@ -6,11 +6,12 @@

 Disassembly of section .text:

-0+000 <gs_foo>:
-   0:  c3 [    ]*ret
+0+ <gs_foo>:
+[      ]*[a-f0-9]+:    c3                      ret

-0+001 <bar>:
-   1:  8d 83 00 00 00 00 [     ]*lea    0x0\(%ebx\),%eax
-   7:  8b 83 00 00 00 00 [     ]*mov    0x0\(%ebx\),%eax
-   d:  90 [    ]*nop
-[      ]*...
+0+1 <bar>:
+[      ]*[a-f0-9]+:    8d 83 14 00 00 00       lea    0x14\(%ebx\),%eax
+[      ]*[a-f0-9]+:    8b 83 00 00 00 00       mov    0x0\(%ebx\),%eax
+[      ]*[a-f0-9]+:    ff 24 85 1a 00 00 00    jmp    \*0x1a\(,%eax,4\)
+[      ]*[a-f0-9]+:    8d 83 14 00 00 00       lea    0x14\(%ebx\),%eax
+#pass
diff --git a/gas/testsuite/gas/i386/intelpic.s
b/gas/testsuite/gas/i386/intelpic.s
index 2e75864..9bca76f 100644
--- a/gas/testsuite/gas/i386/intelpic.s
+++ b/gas/testsuite/gas/i386/intelpic.s
@@ -7,5 +7,8 @@ gs_foo:
 bar:
  lea   eax, .LC0@GOTOFF[ebx]
  mov   eax, DWORD PTR gs_foo@GOT[ebx]
- nop
-.p2align 4,0
+
+.L11:
+        jmp     DWORD PTR[ .L11  + eax * 4 ]
+.LC0:
+        lea     eax, DWORD PTR[ .LC0@GOTOFF + ebx ]


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