x86: cover a.out in recently added tests

Message ID 09a97f1d-e0e8-0452-c07c-f078217de47f@suse.com
State New
Headers show
Series
  • x86: cover a.out in recently added tests
Related show

Commit Message

Alan Modra via Binutils June 8, 2021, 7:58 a.m.
Follow the pattern found elsewhere when relocations are involved. For
wrap32-data also drop a mistakenly left "ELF" from the test name. (Note
that Darwin, for which the wrap32 tests are also failing, is left as-is,
for there being numerous other failures already anyway, and it hence
being questionable whether that target is actually properly maintained.)

gas/
2021-06-XX  Jan Beulich  <jbeulich@suse.com>

	* testsuite/gas/i386/quoted.d, testsuite/gas/i386/wrap32-text.d:
	Adjust expectations.
	* testsuite/gas/i386/wrap32-data.d: Likewise. Correct name.

Comments

Alan Modra via Binutils June 8, 2021, 12:41 p.m. | #1
On Tue, Jun 8, 2021 at 12:58 AM Jan Beulich <jbeulich@suse.com> wrote:
>

> Follow the pattern found elsewhere when relocations are involved. For

> wrap32-data also drop a mistakenly left "ELF" from the test name. (Note

> that Darwin, for which the wrap32 tests are also failing, is left as-is,

> for there being numerous other failures already anyway, and it hence

> being questionable whether that target is actually properly maintained.)

>

> gas/

> 2021-06-XX  Jan Beulich  <jbeulich@suse.com>

>

>         * testsuite/gas/i386/quoted.d, testsuite/gas/i386/wrap32-text.d:

>         Adjust expectations.

>         * testsuite/gas/i386/wrap32-data.d: Likewise. Correct name.

>


OK.

Thanks.

-- 
H.J.
Alan Modra via Binutils June 9, 2021, 1:32 p.m. | #2
On 08.06.2021 09:58, Jan Beulich via Binutils wrote:
> Follow the pattern found elsewhere when relocations are involved. For

> wrap32-data also drop a mistakenly left "ELF" from the test name. (Note

> that Darwin, for which the wrap32 tests are also failing, is left as-is,

> for there being numerous other failures already anyway, and it hence

> being questionable whether that target is actually properly maintained.)

> 

> gas/

> 2021-06-XX  Jan Beulich  <jbeulich@suse.com>

> 

> 	* testsuite/gas/i386/quoted.d, testsuite/gas/i386/wrap32-text.d:

> 	Adjust expectations.

> 	* testsuite/gas/i386/wrap32-data.d: Likewise. Correct name.


Despite this change I've just now noticed that on a 64-bit build
host (i.e. with BFD64 implicitly in use) ...

> --- a/gas/testsuite/gas/i386/wrap32-data.d

> +++ b/gas/testsuite/gas/i386/wrap32-data.d


... this and ...

> --- a/gas/testsuite/gas/i386/wrap32-text.d

> +++ b/gas/testsuite/gas/i386/wrap32-text.d


... this still fail (observed with i386-msdos, which previously I
had checked only on a 32-bit distro used for building):

.../gas/testsuite/gas/i386/wrap32.s:43: Warning: value 0x1000000f4 truncated to 0xf4
.../gas/testsuite/gas/i386/wrap32.s:51: Warning: value 0xffffffff700002f4 truncated to 0x700002f4>, no expected output

I'm of the opinion that any such truncation warnings are actually
bogus when it comes to a 32-bit target. I do have patches mostly
ready to address some others, but not these two. I'd be inclined
to make this an XFAIL on BFD64 a.out builds. Do you have an
opinion one way or the other here? If so, I'm afraid I wouldn't
know how to express this with an #xfail at the top of the .d file.

It also doesn't help that i386.exp's gas_bfd64_check doesn't work
for a.out, so I also couldn't easily skip the test in that case.
Since it depends on "as --help" producing a description for the
--32 / --64 options, and since that line is absent for a.out
irrespective of the BFD64 setting, all a.out builds get taken as
if they were !BFD64.

Jan
Alan Modra via Binutils June 9, 2021, 7:10 p.m. | #3
On Wed, Jun 9, 2021 at 6:32 AM Jan Beulich <jbeulich@suse.com> wrote:
>

> On 08.06.2021 09:58, Jan Beulich via Binutils wrote:

> > Follow the pattern found elsewhere when relocations are involved. For

> > wrap32-data also drop a mistakenly left "ELF" from the test name. (Note

> > that Darwin, for which the wrap32 tests are also failing, is left as-is,

> > for there being numerous other failures already anyway, and it hence

> > being questionable whether that target is actually properly maintained.)

> >

> > gas/

> > 2021-06-XX  Jan Beulich  <jbeulich@suse.com>

> >

> >       * testsuite/gas/i386/quoted.d, testsuite/gas/i386/wrap32-text.d:

> >       Adjust expectations.

> >       * testsuite/gas/i386/wrap32-data.d: Likewise. Correct name.

>

> Despite this change I've just now noticed that on a 64-bit build

> host (i.e. with BFD64 implicitly in use) ...

>

> > --- a/gas/testsuite/gas/i386/wrap32-data.d

> > +++ b/gas/testsuite/gas/i386/wrap32-data.d

>

> ... this and ...

>

> > --- a/gas/testsuite/gas/i386/wrap32-text.d

> > +++ b/gas/testsuite/gas/i386/wrap32-text.d

>

> ... this still fail (observed with i386-msdos, which previously I

> had checked only on a 32-bit distro used for building):

>

> .../gas/testsuite/gas/i386/wrap32.s:43: Warning: value 0x1000000f4 truncated to 0xf4

> .../gas/testsuite/gas/i386/wrap32.s:51: Warning: value 0xffffffff700002f4 truncated to 0x700002f4>, no expected output

>

> I'm of the opinion that any such truncation warnings are actually

> bogus when it comes to a 32-bit target. I do have patches mostly

> ready to address some others, but not these two. I'd be inclined

> to make this an XFAIL on BFD64 a.out builds. Do you have an

> opinion one way or the other here? If so, I'm afraid I wouldn't

> know how to express this with an #xfail at the top of the .d file.

>

> It also doesn't help that i386.exp's gas_bfd64_check doesn't work

> for a.out, so I also couldn't easily skip the test in that case.

> Since it depends on "as --help" producing a description for the

> --32 / --64 options, and since that line is absent for a.out

> irrespective of the BFD64 setting, all a.out builds get taken as

> if they were !BFD64.


Just limit these testcases for known good targets.

Thanks.

-- 
H.J.
Alan Modra via Binutils June 10, 2021, 7:09 a.m. | #4
On 09.06.2021 21:10, H.J. Lu wrote:
> On Wed, Jun 9, 2021 at 6:32 AM Jan Beulich <jbeulich@suse.com> wrote:

>>

>> On 08.06.2021 09:58, Jan Beulich via Binutils wrote:

>>> Follow the pattern found elsewhere when relocations are involved. For

>>> wrap32-data also drop a mistakenly left "ELF" from the test name. (Note

>>> that Darwin, for which the wrap32 tests are also failing, is left as-is,

>>> for there being numerous other failures already anyway, and it hence

>>> being questionable whether that target is actually properly maintained.)

>>>

>>> gas/

>>> 2021-06-XX  Jan Beulich  <jbeulich@suse.com>

>>>

>>>       * testsuite/gas/i386/quoted.d, testsuite/gas/i386/wrap32-text.d:

>>>       Adjust expectations.

>>>       * testsuite/gas/i386/wrap32-data.d: Likewise. Correct name.

>>

>> Despite this change I've just now noticed that on a 64-bit build

>> host (i.e. with BFD64 implicitly in use) ...

>>

>>> --- a/gas/testsuite/gas/i386/wrap32-data.d

>>> +++ b/gas/testsuite/gas/i386/wrap32-data.d

>>

>> ... this and ...

>>

>>> --- a/gas/testsuite/gas/i386/wrap32-text.d

>>> +++ b/gas/testsuite/gas/i386/wrap32-text.d

>>

>> ... this still fail (observed with i386-msdos, which previously I

>> had checked only on a 32-bit distro used for building):

>>

>> .../gas/testsuite/gas/i386/wrap32.s:43: Warning: value 0x1000000f4 truncated to 0xf4

>> .../gas/testsuite/gas/i386/wrap32.s:51: Warning: value 0xffffffff700002f4 truncated to 0x700002f4>, no expected output

>>

>> I'm of the opinion that any such truncation warnings are actually

>> bogus when it comes to a 32-bit target. I do have patches mostly

>> ready to address some others, but not these two. I'd be inclined

>> to make this an XFAIL on BFD64 a.out builds. Do you have an

>> opinion one way or the other here? If so, I'm afraid I wouldn't

>> know how to express this with an #xfail at the top of the .d file.

>>

>> It also doesn't help that i386.exp's gas_bfd64_check doesn't work

>> for a.out, so I also couldn't easily skip the test in that case.

>> Since it depends on "as --help" producing a description for the

>> --32 / --64 options, and since that line is absent for a.out

>> irrespective of the BFD64 setting, all a.out builds get taken as

>> if they were !BFD64.

> 

> Just limit these testcases for known good targets.


But that way effectively saying "works only for ELF and PE/COFF" is
a lie. That's what I'd like to avoid, alongside the test starting to
fail on a non-ELF, non-PE/COFF target because of a future change.

Jan
Alan Modra via Binutils June 10, 2021, 1:34 p.m. | #5
On Thu, Jun 10, 2021 at 12:09 AM Jan Beulich <jbeulich@suse.com> wrote:
>

> On 09.06.2021 21:10, H.J. Lu wrote:

> > On Wed, Jun 9, 2021 at 6:32 AM Jan Beulich <jbeulich@suse.com> wrote:

> >>

> >> On 08.06.2021 09:58, Jan Beulich via Binutils wrote:

> >>> Follow the pattern found elsewhere when relocations are involved. For

> >>> wrap32-data also drop a mistakenly left "ELF" from the test name. (Note

> >>> that Darwin, for which the wrap32 tests are also failing, is left as-is,

> >>> for there being numerous other failures already anyway, and it hence

> >>> being questionable whether that target is actually properly maintained.)

> >>>

> >>> gas/

> >>> 2021-06-XX  Jan Beulich  <jbeulich@suse.com>

> >>>

> >>>       * testsuite/gas/i386/quoted.d, testsuite/gas/i386/wrap32-text.d:

> >>>       Adjust expectations.

> >>>       * testsuite/gas/i386/wrap32-data.d: Likewise. Correct name.

> >>

> >> Despite this change I've just now noticed that on a 64-bit build

> >> host (i.e. with BFD64 implicitly in use) ...

> >>

> >>> --- a/gas/testsuite/gas/i386/wrap32-data.d

> >>> +++ b/gas/testsuite/gas/i386/wrap32-data.d

> >>

> >> ... this and ...

> >>

> >>> --- a/gas/testsuite/gas/i386/wrap32-text.d

> >>> +++ b/gas/testsuite/gas/i386/wrap32-text.d

> >>

> >> ... this still fail (observed with i386-msdos, which previously I

> >> had checked only on a 32-bit distro used for building):

> >>

> >> .../gas/testsuite/gas/i386/wrap32.s:43: Warning: value 0x1000000f4 truncated to 0xf4

> >> .../gas/testsuite/gas/i386/wrap32.s:51: Warning: value 0xffffffff700002f4 truncated to 0x700002f4>, no expected output

> >>

> >> I'm of the opinion that any such truncation warnings are actually

> >> bogus when it comes to a 32-bit target. I do have patches mostly

> >> ready to address some others, but not these two. I'd be inclined

> >> to make this an XFAIL on BFD64 a.out builds. Do you have an

> >> opinion one way or the other here? If so, I'm afraid I wouldn't

> >> know how to express this with an #xfail at the top of the .d file.

> >>

> >> It also doesn't help that i386.exp's gas_bfd64_check doesn't work

> >> for a.out, so I also couldn't easily skip the test in that case.

> >> Since it depends on "as --help" producing a description for the

> >> --32 / --64 options, and since that line is absent for a.out

> >> irrespective of the BFD64 setting, all a.out builds get taken as

> >> if they were !BFD64.

> >

> > Just limit these testcases for known good targets.

>

> But that way effectively saying "works only for ELF and PE/COFF" is

> a lie. That's what I'd like to avoid, alongside the test starting to

> fail on a non-ELF, non-PE/COFF target because of a future change.

>


Please try this patch to see if gas_bfd64_check works for you.

-- 
H.J.
From bb2c1d3b8febad6baf66cd1c222ef005b8b411d4 Mon Sep 17 00:00:00 2001
From: "H.J. Lu" <hjl.tools@gmail.com>
Date: Thu, 10 Jun 2021 06:29:08 -0700
Subject: [PATCH] x86: Update gas_bfd64_check to check 64-bit ELF assembler

If assembler --help doesn't report

 --32/--64/--x32         generate 32bit/64bit/x32 code

check if assembler is a 64-bit ELF binary for BFD64.

	* testsuite/gas/i386/i386.exp (gas_bfd64_check): Check 64-bit
	ELF assembler for BFD64.
---
 gas/testsuite/gas/i386/i386.exp | 22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)

diff --git a/gas/testsuite/gas/i386/i386.exp b/gas/testsuite/gas/i386/i386.exp
index cf215117cad..53d69d8c80b 100644
--- a/gas/testsuite/gas/i386/i386.exp
+++ b/gas/testsuite/gas/i386/i386.exp
@@ -39,9 +39,27 @@ proc gas_32_check { } {
 
 proc gas_bfd64_check { } {
     global AS
+    global READELF
+    global base_dir
+    global AS_BFD64
 
-    set status [gas_host_run "$AS --help" ""]
-    return [regexp "32bit/64bit/x32" [lindex $status 1]];
+    # Set AS_BFD64 to "1" for assembler with BFD64.
+    if { ![info exists AS_CLASS] } then {
+	set status [gas_host_run "$AS --help" ""]
+	if { [regexp "32bit/64bit/x32" [lindex $status 1]] } then {
+	    set AS_BFD64 1
+	} else {
+	    set REAL_AS [findfile $base_dir/.libs/as-new .libs/as-new $AS [transform as]]
+	    set readelf_output [gas_host_run "$READELF -h $REAL_AS" ""]
+	    if { [regexp {[ \t]+Class:[ \t]+ELF64} $readelf_output] } then {
+		set AS_BFD64 1
+	    } else {
+		set AS_BFD64 0
+	    }
+	}
+    }
+
+    return $AS_BFD64
 }
 
 if [gas_32_check] then {
Alan Modra via Binutils June 10, 2021, 2:09 p.m. | #6
On 10.06.2021 15:34, H.J. Lu wrote:
> Please try this patch to see if gas_bfd64_check works for you.


Without having tried it yet, two questions: For one, is the
AS_CLASS use in there rather meant to be AS_BFD64? And then, how
is it going to help to check the as-new binary for a target (like
a.out) which doesn't have said --help output line, when this can
still be a 64-bit binary defaulting to BFD64 or a 32-bit one where
./configure simply was passed --enable-64-bit-bfd?

Wouldn't it be more direct to check for a working .code64
directive? Its availability directly depends on BFD64. Of course
then a next question is whether gas_64_check really needs to be
different from gas_bfd64_check (albeit the two then still wouldn't
do the same checking).

Jan
Alan Modra via Binutils June 10, 2021, 2:20 p.m. | #7
On Thu, Jun 10, 2021 at 7:09 AM Jan Beulich <jbeulich@suse.com> wrote:
>

> On 10.06.2021 15:34, H.J. Lu wrote:

> > Please try this patch to see if gas_bfd64_check works for you.

>

> Without having tried it yet, two questions: For one, is the

> AS_CLASS use in there rather meant to be AS_BFD64? And then, how


It should be AS_BFD64.

> is it going to help to check the as-new binary for a target (like

> a.out) which doesn't have said --help output line, when this can

> still be a 64-bit binary defaulting to BFD64 or a 32-bit one where

> ./configure simply was passed --enable-64-bit-bfd?


It isn't covered.

> Wouldn't it be more direct to check for a working .code64

> directive? Its availability directly depends on BFD64. Of course


Sure if it works.

> then a next question is whether gas_64_check really needs to be

> different from gas_bfd64_check (albeit the two then still wouldn't

> do the same checking).


They are different things. BFD64 can be used without --64.

-- 
H.J.
From 1e44669c5f2dc47c26b38faf7ebaf7986303c2a4 Mon Sep 17 00:00:00 2001
From: "H.J. Lu" <hjl.tools@gmail.com>
Date: Thu, 10 Jun 2021 06:29:08 -0700
Subject: [PATCH v2] x86: Update gas_bfd64_check to check 64-bit ELF assembler

If assembler --help doesn't report

 --32/--64/--x32         generate 32bit/64bit/x32 code

check if assembler is a 64-bit ELF binary for BFD64.

	* testsuite/gas/i386/i386.exp (gas_bfd64_check): Check 64-bit
	ELF assembler for BFD64.
---
 gas/testsuite/gas/i386/i386.exp | 22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)

diff --git a/gas/testsuite/gas/i386/i386.exp b/gas/testsuite/gas/i386/i386.exp
index cf215117cad..cce2672550a 100644
--- a/gas/testsuite/gas/i386/i386.exp
+++ b/gas/testsuite/gas/i386/i386.exp
@@ -39,9 +39,27 @@ proc gas_32_check { } {
 
 proc gas_bfd64_check { } {
     global AS
+    global READELF
+    global base_dir
+    global AS_BFD64
 
-    set status [gas_host_run "$AS --help" ""]
-    return [regexp "32bit/64bit/x32" [lindex $status 1]];
+    # Set AS_BFD64 to "1" for assembler with BFD64.
+    if { ![info exists AS_BFD64] } then {
+	set status [gas_host_run "$AS --help" ""]
+	if { [regexp "32bit/64bit/x32" [lindex $status 1]] } then {
+	    set AS_BFD64 1
+	} else {
+	    set REAL_AS [findfile $base_dir/.libs/as-new .libs/as-new $AS [transform as]]
+	    set readelf_output [gas_host_run "$READELF -h $REAL_AS" ""]
+	    if { [regexp {[ \t]+Class:[ \t]+ELF64} $readelf_output] } then {
+		set AS_BFD64 1
+	    } else {
+		set AS_BFD64 0
+	    }
+	}
+    }
+
+    return $AS_BFD64
 }
 
 if [gas_32_check] then {

Patch

--- a/gas/testsuite/gas/i386/quoted.d
+++ b/gas/testsuite/gas/i386/quoted.d
@@ -6,16 +6,16 @@ 
 Disassembly of section .text:
 
 0+ <quoted>:
-[ 	]*[a-f0-9]+:[ 	]*a1 00 00 00 00[	 ]+mov    0x0,%eax	[a-f0-9]+: (R_386_|dir)32	x\(y\)
-[ 	]*[a-f0-9]+:[ 	]*8b 80 00 00 00 00[	 ]+mov    0x0\(%eax\),%eax	[a-f0-9]+: (R_386_|dir)32	x\(y\)
-[ 	]*[a-f0-9]+:[ 	]*26 a1 00 00 00 00[	 ]+mov    %es:0x0,%eax	[a-f0-9]+: (R_386_|dir)32	x\(y\)
-[ 	]*[a-f0-9]+:[ 	]*26 8b 80 00 00 00 00[	 ]+mov    %es:0x0\(%eax\),%eax	[a-f0-9]+: (R_386_|dir)32	x\(y\)
-[ 	]*[a-f0-9]+:[ 	]*a1 00 00 00 00[	 ]+mov    0x0,%eax	[a-f0-9]+: (R_386_|dir)32	x\(y
-[ 	]*[a-f0-9]+:[ 	]*a1 00 00 00 00[	 ]+mov    0x0,%eax	[a-f0-9]+: (R_386_|dir)32	x\)y
-[ 	]*[a-f0-9]+:[ 	]*a1 00 00 00 00[	 ]+mov    0x0,%eax	[a-f0-9]+: (R_386_|dir)32	x\?y
-[ 	]*[a-f0-9]+:[ 	]*a1 00 00 00 00[	 ]+mov    0x0,%eax	[a-f0-9]+: (R_386_|dir)32	x\{y
-[ 	]*[a-f0-9]+:[ 	]*a1 00 00 00 00[	 ]+mov    0x0,%eax	[a-f0-9]+: (R_386_|dir)32	x\{z\}
-[ 	]*[a-f0-9]+:[ 	]*ff 15 00 00 00 00[	 ]+call   \*0x0	[a-f0-9]+: (R_386_|dir)32	x\(y\)
-[ 	]*[a-f0-9]+:[ 	]*26 ff 15 00 00 00 00[	 ]+call   \*%es:0x0	[a-f0-9]+: (R_386_|dir)32	x\(y\)
-[ 	]*[a-f0-9]+:[ 	]*26 ff 15 00 00 00 00[	 ]+call   \*%es:0x0	[a-f0-9]+: (R_386_|dir)32	x\(y\)
+[ 	]*[a-f0-9]+:[ 	]*a1 00 00 00 00[	 ]+mov    0x0,%eax	[a-f0-9]+: (R_386_|dir)?32	x\(y\)
+[ 	]*[a-f0-9]+:[ 	]*8b 80 00 00 00 00[	 ]+mov    0x0\(%eax\),%eax	[a-f0-9]+: (R_386_|dir)?32	x\(y\)
+[ 	]*[a-f0-9]+:[ 	]*26 a1 00 00 00 00[	 ]+mov    %es:0x0,%eax	[a-f0-9]+: (R_386_|dir)?32	x\(y\)
+[ 	]*[a-f0-9]+:[ 	]*26 8b 80 00 00 00 00[	 ]+mov    %es:0x0\(%eax\),%eax	[a-f0-9]+: (R_386_|dir)?32	x\(y\)
+[ 	]*[a-f0-9]+:[ 	]*a1 00 00 00 00[	 ]+mov    0x0,%eax	[a-f0-9]+: (R_386_|dir)?32	x\(y
+[ 	]*[a-f0-9]+:[ 	]*a1 00 00 00 00[	 ]+mov    0x0,%eax	[a-f0-9]+: (R_386_|dir)?32	x\)y
+[ 	]*[a-f0-9]+:[ 	]*a1 00 00 00 00[	 ]+mov    0x0,%eax	[a-f0-9]+: (R_386_|dir)?32	x\?y
+[ 	]*[a-f0-9]+:[ 	]*a1 00 00 00 00[	 ]+mov    0x0,%eax	[a-f0-9]+: (R_386_|dir)?32	x\{y
+[ 	]*[a-f0-9]+:[ 	]*a1 00 00 00 00[	 ]+mov    0x0,%eax	[a-f0-9]+: (R_386_|dir)?32	x\{z\}
+[ 	]*[a-f0-9]+:[ 	]*ff 15 00 00 00 00[	 ]+call   \*0x0	[a-f0-9]+: (R_386_|dir)?32	x\(y\)
+[ 	]*[a-f0-9]+:[ 	]*26 ff 15 00 00 00 00[	 ]+call   \*%es:0x0	[a-f0-9]+: (R_386_|dir)?32	x\(y\)
+[ 	]*[a-f0-9]+:[ 	]*26 ff 15 00 00 00 00[	 ]+call   \*%es:0x0	[a-f0-9]+: (R_386_|dir)?32	x\(y\)
 #pass
--- a/gas/testsuite/gas/i386/wrap32-data.d
+++ b/gas/testsuite/gas/i386/wrap32-data.d
@@ -1,4 +1,4 @@ 
-#name: i386 32-bit wrapping calculations (data/ELF)
+#name: i386 32-bit wrapping calculations (data)
 #source: wrap32.s
 #objdump: -rsj .data
 
@@ -7,17 +7,17 @@ 
 RELOCATION RECORDS FOR \[\.data\]:
 
 OFFSET +TYPE +VALUE *
-0*10 (R_386_32|dir32) *sym
-0*14 (R_386_32|dir32) *sym
-0*18 (R_386_32|dir32) *sym
-0*1c (R_386_32|dir32) *sym
-0*30 (R_386_32|dir32) *sym
-0*34 (R_386_32|dir32) *sym
-0*38 (R_386_32|dir32) *sym
-0*3c (R_386_32|dir32) *sym
+0*10 (R_386_|dir)?32 *sym
+0*14 (R_386_|dir)?32 *sym
+0*18 (R_386_|dir)?32 *sym
+0*1c (R_386_|dir)?32 *sym
+0*30 (R_386_|dir)?32 *sym
+0*34 (R_386_|dir)?32 *sym
+0*38 (R_386_|dir)?32 *sym
+0*3c (R_386_|dir)?32 *sym
 
 Contents of section .data:
- 0+00 f4 ?00 ?00 ?00 f4 ?00 ?00 ?00 90 ?00 ?00 ?00 90 ?00 ?00 ?00 .*
- 0+10 00 ?ff ?ff ?ff 00 ?ff ?ff ?ff f4 ?00 ?00 ?00 f4 ?00 ?00 ?00 .*
- 0+20 f4 ?02 ?00 ?70 f4 ?00 ?00 ?80 90 ?02 ?00 ?70 90 ?00 ?00 ?80 .*
- 0+30 00 ?01 ?00 ?70 00 ?ff ?ff ?7f f4 ?02 ?00 ?70 f4 ?00 ?00 ?80 .*
+ 0+.0 f4 ?00 ?00 ?00 f4 ?00 ?00 ?00 90 ?00 ?00 ?00 90 ?00 ?00 ?00 .*
+ 0+.0 00 ?ff ?ff ?ff 00 ?ff ?ff ?ff f4 ?00 ?00 ?00 f4 ?00 ?00 ?00 .*
+ 0+.0 f4 ?02 ?00 ?70 f4 ?00 ?00 ?80 90 ?02 ?00 ?70 90 ?00 ?00 ?80 .*
+ 0+.0 00 ?01 ?00 ?70 00 ?ff ?ff ?7f f4 ?02 ?00 ?70 f4 ?00 ?00 ?80 .*
--- a/gas/testsuite/gas/i386/wrap32-text.d
+++ b/gas/testsuite/gas/i386/wrap32-text.d
@@ -11,33 +11,33 @@  Disassembly of section .text:
 [ 	]*[0-9a-f]+:[ 	]+ba f4 00 00 00       	mov    \$0xf4,%edx
 [ 	]*[0-9a-f]+:[ 	]+b8 90 00 00 00       	mov    \$0x90,%eax
 [ 	]*[0-9a-f]+:[ 	]+ba 90 00 00 00       	mov    \$0x90,%edx
-[ 	]*[0-9a-f]+:[ 	]+b8 00 ff ff ff       	mov    \$0xffffff00,%eax[ 	]+[0-9a-f]+: (R_386_32|dir32)[ 	]+sym
-[ 	]*[0-9a-f]+:[ 	]+ba 00 ff ff ff       	mov    \$0xffffff00,%edx[ 	]+[0-9a-f]+: (R_386_32|dir32)[ 	]+sym
-[ 	]*[0-9a-f]+:[ 	]+b8 f4 00 00 00       	mov    \$0xf4,%eax[ 	]+[0-9a-f]+: (R_386_32|dir32)[ 	]+sym
-[ 	]*[0-9a-f]+:[ 	]+ba f4 00 00 00       	mov    \$0xf4,%edx[ 	]+[0-9a-f]+: (R_386_32|dir32)[ 	]+sym
+[ 	]*[0-9a-f]+:[ 	]+b8 00 ff ff ff       	mov    \$0xffffff00,%eax[ 	]+[0-9a-f]+: (R_386_|dir)?32[ 	]+sym
+[ 	]*[0-9a-f]+:[ 	]+ba 00 ff ff ff       	mov    \$0xffffff00,%edx[ 	]+[0-9a-f]+: (R_386_|dir)?32[ 	]+sym
+[ 	]*[0-9a-f]+:[ 	]+b8 f4 00 00 00       	mov    \$0xf4,%eax[ 	]+[0-9a-f]+: (R_386_|dir)?32[ 	]+sym
+[ 	]*[0-9a-f]+:[ 	]+ba f4 00 00 00       	mov    \$0xf4,%edx[ 	]+[0-9a-f]+: (R_386_|dir)?32[ 	]+sym
 [ 	]*[0-9a-f]+:[ 	]+c7 00 f4 00 00 00    	movl   \$0xf4,\(%eax\)
 [ 	]*[0-9a-f]+:[ 	]+c7 02 f4 00 00 00    	movl   \$0xf4,\(%edx\)
 [ 	]*[0-9a-f]+:[ 	]+c7 00 90 00 00 00    	movl   \$0x90,\(%eax\)
 [ 	]*[0-9a-f]+:[ 	]+c7 02 90 00 00 00    	movl   \$0x90,\(%edx\)
-[ 	]*[0-9a-f]+:[ 	]+c7 00 00 ff ff ff    	movl   \$0xffffff00,\(%eax\)[ 	]+[0-9a-f]+: (R_386_32|dir32)[ 	]+sym
-[ 	]*[0-9a-f]+:[ 	]+c7 02 00 ff ff ff    	movl   \$0xffffff00,\(%edx\)[ 	]+[0-9a-f]+: (R_386_32|dir32)[ 	]+sym
-[ 	]*[0-9a-f]+:[ 	]+c7 00 f4 00 00 00    	movl   \$0xf4,\(%eax\)[ 	]+[0-9a-f]+: (R_386_32|dir32)[ 	]+sym
-[ 	]*[0-9a-f]+:[ 	]+c7 02 f4 00 00 00    	movl   \$0xf4,\(%edx\)[ 	]+[0-9a-f]+: (R_386_32|dir32)[ 	]+sym
+[ 	]*[0-9a-f]+:[ 	]+c7 00 00 ff ff ff    	movl   \$0xffffff00,\(%eax\)[ 	]+[0-9a-f]+: (R_386_|dir)?32[ 	]+sym
+[ 	]*[0-9a-f]+:[ 	]+c7 02 00 ff ff ff    	movl   \$0xffffff00,\(%edx\)[ 	]+[0-9a-f]+: (R_386_|dir)?32[ 	]+sym
+[ 	]*[0-9a-f]+:[ 	]+c7 00 f4 00 00 00    	movl   \$0xf4,\(%eax\)[ 	]+[0-9a-f]+: (R_386_|dir)?32[ 	]+sym
+[ 	]*[0-9a-f]+:[ 	]+c7 02 f4 00 00 00    	movl   \$0xf4,\(%edx\)[ 	]+[0-9a-f]+: (R_386_|dir)?32[ 	]+sym
 [ 	]*[0-9a-f]+:[ 	]+81 c1 f4 00 00 00    	add    \$0xf4,%ecx
 [ 	]*[0-9a-f]+:[ 	]+81 c2 f4 00 00 00    	add    \$0xf4,%edx
 [ 	]*[0-9a-f]+:[ 	]+81 c1 90 00 00 00    	add    \$0x90,%ecx
 [ 	]*[0-9a-f]+:[ 	]+81 c2 90 00 00 00    	add    \$0x90,%edx
-[ 	]*[0-9a-f]+:[ 	]+81 c1 00 ff ff ff    	add    \$0xffffff00,%ecx[ 	]+[0-9a-f]+: (R_386_32|dir32)[ 	]+sym
-[ 	]*[0-9a-f]+:[ 	]+81 c2 00 ff ff ff    	add    \$0xffffff00,%edx[ 	]+[0-9a-f]+: (R_386_32|dir32)[ 	]+sym
-[ 	]*[0-9a-f]+:[ 	]+81 c1 f4 00 00 00    	add    \$0xf4,%ecx[ 	]+[0-9a-f]+: (R_386_32|dir32)[ 	]+sym
-[ 	]*[0-9a-f]+:[ 	]+81 c2 f4 00 00 00    	add    \$0xf4,%edx[ 	]+[0-9a-f]+: (R_386_32|dir32)[ 	]+sym
+[ 	]*[0-9a-f]+:[ 	]+81 c1 00 ff ff ff    	add    \$0xffffff00,%ecx[ 	]+[0-9a-f]+: (R_386_|dir)?32[ 	]+sym
+[ 	]*[0-9a-f]+:[ 	]+81 c2 00 ff ff ff    	add    \$0xffffff00,%edx[ 	]+[0-9a-f]+: (R_386_|dir)?32[ 	]+sym
+[ 	]*[0-9a-f]+:[ 	]+81 c1 f4 00 00 00    	add    \$0xf4,%ecx[ 	]+[0-9a-f]+: (R_386_|dir)?32[ 	]+sym
+[ 	]*[0-9a-f]+:[ 	]+81 c2 f4 00 00 00    	add    \$0xf4,%edx[ 	]+[0-9a-f]+: (R_386_|dir)?32[ 	]+sym
 [ 	]*[0-9a-f]+:[ 	]+81 00 f4 00 00 00    	addl   \$0xf4,\(%eax\)
 [ 	]*[0-9a-f]+:[ 	]+81 02 f4 00 00 00    	addl   \$0xf4,\(%edx\)
 [ 	]*[0-9a-f]+:[ 	]+81 00 90 00 00 00    	addl   \$0x90,\(%eax\)
 [ 	]*[0-9a-f]+:[ 	]+81 02 90 00 00 00    	addl   \$0x90,\(%edx\)
-[ 	]*[0-9a-f]+:[ 	]+81 00 00 ff ff ff    	addl   \$0xffffff00,\(%eax\)[ 	]+[0-9a-f]+: (R_386_32|dir32)[ 	]+sym
-[ 	]*[0-9a-f]+:[ 	]+81 02 00 ff ff ff    	addl   \$0xffffff00,\(%edx\)[ 	]+[0-9a-f]+: (R_386_32|dir32)[ 	]+sym
-[ 	]*[0-9a-f]+:[ 	]+81 00 f4 00 00 00    	addl   \$0xf4,\(%eax\)[ 	]+[0-9a-f]+: (R_386_32|dir32)[ 	]+sym
-[ 	]*[0-9a-f]+:[ 	]+81 02 f4 00 00 00    	addl   \$0xf4,\(%edx\)[ 	]+[0-9a-f]+: (R_386_32|dir32)[ 	]+sym
+[ 	]*[0-9a-f]+:[ 	]+81 00 00 ff ff ff    	addl   \$0xffffff00,\(%eax\)[ 	]+[0-9a-f]+: (R_386_|dir)?32[ 	]+sym
+[ 	]*[0-9a-f]+:[ 	]+81 02 00 ff ff ff    	addl   \$0xffffff00,\(%edx\)[ 	]+[0-9a-f]+: (R_386_|dir)?32[ 	]+sym
+[ 	]*[0-9a-f]+:[ 	]+81 00 f4 00 00 00    	addl   \$0xf4,\(%eax\)[ 	]+[0-9a-f]+: (R_386_|dir)?32[ 	]+sym
+[ 	]*[0-9a-f]+:[ 	]+81 02 f4 00 00 00    	addl   \$0xf4,\(%edx\)[ 	]+[0-9a-f]+: (R_386_|dir)?32[ 	]+sym
 [ 	]*[0-9a-f]+:[ 	]+c3                   	ret *
 #pass