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: RFC: PATCH: PR gas/12049: Unnecessary relaxation


On Tue, Oct 26, 2010 at 9:50 AM, Dave Korn <dave.korn.cygwin@gmail.com> wrote:
> On 25/10/2010 10:19, H.J. Lu wrote:
>
>> ? ? ? * gas/i386/i386.exp: Run relax-1 and relax-2 for all 32bit
>> ? ? ? targets. ?Run x86-64-relax-1.
>
> ?The relax-1 and relax-2 tests fail on i686-pc-cygwin, because the objdump
> output has labels in it, and no "0x" prefix on the immediates:
>
>> $ /gnu/binutils/obj/gas/testsuite/../../binutils/objdump ?-d dump.o
>>
>> dump.o: ? ? file format pe-i386
>>
>>
>> Disassembly of section .text:
>>
>> 00000000 <.text>:
>> ? ?0: ? 90 ? ? ? ? ? ? ? ? ? ? ?nop
>> ? ?1: ? 90 ? ? ? ? ? ? ? ? ? ? ?nop
> ? ? ? ? ? [ ... snip ... ]
>> ? ?d: ? 90 ? ? ? ? ? ? ? ? ? ? ?nop
>> ? ?e: ? e9 8d 00 00 00 ? ? ? ? ?jmp ? ?a0 <.text+0xa0>
>> ? 13: ? 90 ? ? ? ? ? ? ? ? ? ? ?nop
>
> ... while the dump script files don't:
>
>> $ cat /gnu/binutils/src/gas/testsuite/gas/i386/relax-1.d
>> #name: i386 relax 1
>> #objdump: -dw
>>
>> .*: +file format .*
>>
>>
>> Disassembly of section .text:
>>
>> 0+ <.text>:
>> #...
>> ? ?e: ? e9 8d 00 00 00 ? ? ? ? ?jmp ? ?0xa0
>> #...
>> ? 21: ? eb 7d ? ? ? ? ? ? ? ? ? jmp ? ?0xa0
>> #...
>> ? a0: ? 90 ? ? ? ? ? ? ? ? ? ? ?nop
>> #pass
>
> ?The attached patch makes it pass on i686-pc-cygwin, and I checked on
> i686-pc-linux-gnu (both native and cross to x86_64-pc-linux-gnu) that it
> didn't break the test there. ?OK?
>
> gas/testsuite/ChangeLog:
>
> ? ? ? ?* i386/relax-1.d: Generalize regexes a bit.
> ? ? ? ?* i386/relax-2.d: Likewise.
>

OK.  Thanks.


-- 
H.J.


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