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: [RFA/ARM] Fix handling of Tag_DIV_use


No problem.  I just want to ask to avoid duplicated effort.

Thanks.

-Doug

On Fri, Mar 16, 2012 at 6:49 AM, Matthew Gretton-Dann
<matthew.gretton-dann@arm.com> wrote:
> Doug,
>
> If you are happy to port this that would be great, as I don't currently have
> time.
>
> Thanks,
>
> Matt
>
> On Thu, Mar 15, 2012 at 06:46:22PM +0000, Doug Kwan (?????????) wrote:
>> Matthew,
>>
>> ? ?Do you have a plan for gold? If not, I can port this.
>>
>> Thanks
>>
>> -Doug
>>
>> On Thu, Mar 15, 2012 at 9:55 AM, Matthew Gretton-Dann
>> <matthew.gretton-dann@arm.com> wrote:
>> > Hi,
>> >
>> > The attached patch fixes how we use Tag_DIV_use in binutils to be in
>> > line with the meaning of the ARM ABI.
>> >
>> > Tag_DIV_use has three values, 0, 1, or 2, which we have historically
>> > treated as:
>> > ?0: Divide instruction permitted in Thumb state. ?Emitted for v7M and
>> > ? ?v7R.
>> > ?1: Divide instruction not permitted. ?Emitted for all architectures
>> > ? ?which don't have a divide instruction (all v6 and before, v7A).
>> > ?2: Divide instruction permitted in ARM state (emitted for v7A+idiv).
>> >
>> > The value of 1 is actually meant to be read that the user did not intend
>> > for divide instructions to be used in the image (even if present in the
>> > architecture). ?Similarly the value of 0 should be interpreted as the
>> > divide instruction was permitted as allowed by the architecture (see
>> > Tag_CPU_arch and Tag_CPU_arch_profile) - value 0 also maps to 'no info
>> > available'.
>> >
>> > The attached patch changes the behaviour of binutils to match these
>> > clarified interpretations.
>> >
>> > Gas currently does not provide any way on the command line to indicate
>> > the user intention that divide instructions should not be used.
>> >
>> > Thanks,
>> >
>> > Matt
>> >
>> > bfd/ChangeLog:
>> >
>> > 2012-03-15 ?Matthew Gretton-Dann ?<matthew.gretton-dann@arm.com>
>> >
>> > ? ? ? ?* elf32-arm.c (elf32_arm_attributes_accept_div): New function.
>> > ? ? ? ?(elf32_arm_attributes_forbid_div): Likewise.
>> > ? ? ? ?(elf32_arm_merge_eabi_attributes): Correct handling of
>> > ? ? ? ?Tag_DIV_use.
>> >
>> > gas/ChangeLog:
>> >
>> > 2012-03-15 ?Matthew Gretton-Dann ?<matthew.gretton-dann@arm.com>
>> >
>> > ? ? ? ?* config/tc-arm.c (aeabi_set_public_attributes): Correct
>> > ? ? ? ?handling of Tag_DIV_use.
>> >
>> > gas/testsuite/ChangeLog:
>> >
>> > 2012-03-15 ?Matthew Gretton-Dann ?<matther.gretton-dann@arm.com>
>> >
>> > ? ? ? ?* gas/testsuite/gas/arm/any-idiv.d: New testcase.
>> > ? ? ? ?* gas/testsuite/gas/arm/any-idiv.s: Likewise.
>> > ? ? ? ?* gas/arm/attr-any-armv4t.d: Update expected output.
>> > ? ? ? ?* gas/arm/attr-any-thumbv6.d: Likewise.
>> > ? ? ? ?* gas/arm/attr-cpu-directive.d: Likewise.
>> > ? ? ? ?* gas/arm/attr-default.d: Likewise.
>> > ? ? ? ?* gas/arm/attr-march-armv1.d: Likewise.
>> > ? ? ? ?* gas/arm/attr-march-armv2.d: Likewise.
>> > ? ? ? ?* gas/arm/attr-march-armv2a.d: Likewise.
>> > ? ? ? ?* gas/arm/attr-march-armv2s.d: Likewise.
>> > ? ? ? ?* gas/arm/attr-march-armv3.d: Likewise.
>> > ? ? ? ?* gas/arm/attr-march-armv3m.d: Likewise.
>> > ? ? ? ?* gas/arm/attr-march-armv4.d: Likewise.
>> > ? ? ? ?* gas/arm/attr-march-armv4t.d: Likewise.
>> > ? ? ? ?* gas/arm/attr-march-armv4txm.d: Likewise.
>> > ? ? ? ?* gas/arm/attr-march-armv4xm.d: Likewise.
>> > ? ? ? ?* gas/arm/attr-march-armv5.d: Likewise.
>> > ? ? ? ?* gas/arm/attr-march-armv5t.d: Likewise.
>> > ? ? ? ?* gas/arm/attr-march-armv5te.d: Likewise.
>> > ? ? ? ?* gas/arm/attr-march-armv5tej.d: Likewise.
>> > ? ? ? ?* gas/arm/attr-march-armv5texp.d: Likewise.
>> > ? ? ? ?* gas/arm/attr-march-armv5txm.d: Likewise.
>> > ? ? ? ?* gas/arm/attr-march-armv6-m+os.d: Likewise.
>> > ? ? ? ?* gas/arm/attr-march-armv6-m.d: Likewise.
>> > ? ? ? ?* gas/arm/attr-march-armv6.d: Likewise.
>> > ? ? ? ?* gas/arm/attr-march-armv6j.d: Likewise.
>> > ? ? ? ?* gas/arm/attr-march-armv6k+sec.d: Likewise.
>> > ? ? ? ?* gas/arm/attr-march-armv6k.d: Likewise.
>> > ? ? ? ?* gas/arm/attr-march-armv6kt2.d: Likewise.
>> > ? ? ? ?* gas/arm/attr-march-armv6s-m.d: Likewise.
>> > ? ? ? ?* gas/arm/attr-march-armv6t2.d: Likewise.
>> > ? ? ? ?* gas/arm/attr-march-armv6z.d: Likewise.
>> > ? ? ? ?* gas/arm/attr-march-armv6zk.d: Likewise.
>> > ? ? ? ?* gas/arm/attr-march-armv6zkt2.d: Likewise.
>> > ? ? ? ?* gas/arm/attr-march-armv6zt2.d: Likewise.
>> > ? ? ? ?* gas/arm/attr-march-armv7-a+mp.d: Likewise.
>> > ? ? ? ?* gas/arm/attr-march-armv7-a+sec.d: Likewise.
>> > ? ? ? ?* gas/arm/attr-march-armv7-a.d: Likewise.
>> > ? ? ? ?* gas/arm/attr-march-armv7.d: Likewise.
>> > ? ? ? ?* gas/arm/attr-march-armv7a.d: Likewise.
>> > ? ? ? ?* gas/arm/attr-march-iwmmxt.d: Likewise.
>> > ? ? ? ?* gas/arm/attr-march-iwmmxt2.d: Likewise.
>> > ? ? ? ?* gas/arm/attr-march-xscale.d: Likewise.
>> > ? ? ? ?* gas/arm/attr-mcpu.d: Likewise.
>> > ? ? ? ?* gas/arm/attr-mfpu-arm1020e.d: Likewise.
>> > ? ? ? ?* gas/arm/attr-mfpu-arm1020t.d: Likewise.
>> > ? ? ? ?* gas/arm/attr-mfpu-arm1136jf-s.d: Likewise.
>> > ? ? ? ?* gas/arm/attr-mfpu-arm1136jfs.d: Likewise.
>> > ? ? ? ?* gas/arm/attr-mfpu-arm7500fe.d: Likewise.
>> > ? ? ? ?* gas/arm/attr-mfpu-fpa.d: Likewise.
>> > ? ? ? ?* gas/arm/attr-mfpu-fpa10.d: Likewise.
>> > ? ? ? ?* gas/arm/attr-mfpu-fpa11.d: Likewise.
>> > ? ? ? ?* gas/arm/attr-mfpu-fpe.d: Likewise.
>> > ? ? ? ?* gas/arm/attr-mfpu-fpe2.d: Likewise.
>> > ? ? ? ?* gas/arm/attr-mfpu-fpe3.d: Likewise.
>> > ? ? ? ?* gas/arm/attr-mfpu-maverick.d: Likewise.
>> > ? ? ? ?* gas/arm/attr-mfpu-neon-fp16.d: Likewise.
>> > ? ? ? ?* gas/arm/attr-mfpu-neon.d: Likewise.
>> > ? ? ? ?* gas/arm/attr-mfpu-softfpa.d: Likewise.
>> > ? ? ? ?* gas/arm/attr-mfpu-softvfp+vfp.d: Likewise.
>> > ? ? ? ?* gas/arm/attr-mfpu-softvfp.d: Likewise.
>> > ? ? ? ?* gas/arm/attr-mfpu-vfp.d: Likewise.
>> > ? ? ? ?* gas/arm/attr-mfpu-vfp10-r0.d: Likewise.
>> > ? ? ? ?* gas/arm/attr-mfpu-vfp10.d: Likewise.
>> > ? ? ? ?* gas/arm/attr-mfpu-vfp3.d: Likewise.
>> > ? ? ? ?* gas/arm/attr-mfpu-vfp9.d: Likewise.
>> > ? ? ? ?* gas/arm/attr-mfpu-vfpv2.d: Likewise.
>> > ? ? ? ?* gas/arm/attr-mfpu-vfpv3-d16.d: Likewise.
>> > ? ? ? ?* gas/arm/attr-mfpu-vfpv3.d: Likewise.
>> > ? ? ? ?* gas/arm/attr-mfpu-vfpv4-d16.d: Likewise.
>> > ? ? ? ?* gas/arm/attr-mfpu-vfpv4.d: Likewise.
>> > ? ? ? ?* gas/arm/attr-mfpu-vfpxd.d: Likewise.
>> > ? ? ? ?* gas/arm/attr-order.d: Likewise.
>> > ? ? ? ?* gas/arm/attr-override-cpu-directive.d: Likewise.
>> > ? ? ? ?* gas/arm/attr-override-mcpu.d: Likewise.
>> > ? ? ? ?* gas/arm/eabi_attr_1.d: Likewise.
>> > ? ? ? ?* gas/arm/mov-highregs-any.d: Likewise.
>> > ? ? ? ?* gas/arm/mov-lowregs-any.d: Likewise.
>> > ? ? ? ?* gas/arm/pr12198-1.d: Likewise.
>> > ? ? ? ?* gas/arm/pr12198-2.d: Likewise.
>> >
>> > ld/testsuite/ChangeLog:
>> >
>> > 2012-03-15 ?Matthew Gretton-Dann ?<matthew.gretton-dann@arm.com>
>> >
>> > ? ? ? ?* ld-arm/arm-elf.exp: Add new testcases.
>> > ? ? ? ?* ld-arm/attr-merge-2.attr: Update ouput.
>> > ? ? ? ?* ld-arm/attr-merge-2a.s: Remove Tag_DIV_use test.
>> > ? ? ? ?* ld-arm/attr-merge-2b.s: Likewise.
>> > ? ? ? ?* ld-arm/attr-merge-3.attr: Updated expected output.
>> > ? ? ? ?* ld-arm/attr-merge-4.attr: Likewise.
>> > ? ? ? ?* ld-arm/attr-merge-5.attr: Likewise.
>> > ? ? ? ?* ld-arm/attr-merge-6.attr: Likewise.
>> > ? ? ? ?* ld-arm/attr-merge-7.attr: Likewise.
>> > ? ? ? ?* ld-arm/attr-merge-arch-1.attr: Likewise.
>> > ? ? ? ?* ld-arm/attr-merge-arch-2.attr: Likewise.
>> > ? ? ? ?* ld-arm/attr-merge-unknown-2.d: Likewise.
>> > ? ? ? ?* ld-arm/attr-merge-unknown-2r.d: Likewise.
>> > ? ? ? ?* ld-arm/attr-merge-unknown-3.d: Likewise.
>> > ? ? ? ?* ld-arm/attr-merge-vfp-1.d: Likewise.
>> > ? ? ? ?* ld-arm/attr-merge-vfp-1r.d: Likewise.
>> > ? ? ? ?* ld-arm/attr-merge-vfp-2.d: Likewise.
>> > ? ? ? ?* ld-arm/attr-merge-vfp-2r.d: Likewise.
>> > ? ? ? ?* ld-arm/attr-merge-vfp-3.d: Likewise.
>> > ? ? ? ?* ld-arm/attr-merge-vfp-3r.d: Likewise.
>> > ? ? ? ?* ld-arm/attr-merge-vfp-4.d: Likewise.
>> > ? ? ? ?* ld-arm/attr-merge-vfp-4r.d: Likewise.
>> > ? ? ? ?* ld-arm/attr-merge-vfp-5.d: Likewise.
>> > ? ? ? ?* ld-arm/attr-merge-vfp-5r.d: Likewise.
>> > ? ? ? ?* ld-arm/attr-merge-vfp-6.d: Likewise.
>> > ? ? ? ?* ld-arm/attr-merge-vfp-6r.d: Likewise.
>> > ? ? ? ?* ld-arm/attr-merge-wchar-00-nowarn.d: Likewise.
>> > ? ? ? ?* ld-arm/attr-merge-wchar-00.d: Likewise.
>> > ? ? ? ?* ld-arm/attr-merge-wchar-02-nowarn.d: Likewise.
>> > ? ? ? ?* ld-arm/attr-merge-wchar-02.d: Likewise.
>> > ? ? ? ?* ld-arm/attr-merge-wchar-04-nowarn.d: Likewise.
>> > ? ? ? ?* ld-arm/attr-merge-wchar-04.d: Likewise.
>> > ? ? ? ?* ld-arm/attr-merge-wchar-20-nowarn.d: Likewise.
>> > ? ? ? ?* ld-arm/attr-merge-wchar-20.d: Likewise.
>> > ? ? ? ?* ld-arm/attr-merge-wchar-22-nowarn.d: Likewise.
>> > ? ? ? ?* ld-arm/attr-merge-wchar-22.d: Likewise.
>> > ? ? ? ?* ld-arm/attr-merge-wchar-24-nowarn.d: Likewise.
>> > ? ? ? ?* ld-arm/attr-merge-wchar-40-nowarn.d: Likewise.
>> > ? ? ? ?* ld-arm/attr-merge-wchar-40.d: Likewise.
>> > ? ? ? ?* ld-arm/attr-merge-wchar-42-nowarn.d: Likewise.
>> > ? ? ? ?* ld-arm/attr-merge-wchar-44-nowarn.d: Likewise.
>> > ? ? ? ?* ld-arm/attr-merge-wchar-44.d: Likewise.
>> > ? ? ? ?* ld-arm/attr-merge.attr: Likewise.
>> > ? ? ? ?* ld-arm/attr-merge-div-0.s: New testcase.
>> > ? ? ? ?* ld-arm/attr-merge-div-00.d: Likewise.
>> > ? ? ? ?* ld-arm/attr-merge-div-01-m3.d: Likewise.
>> > ? ? ? ?* ld-arm/attr-merge-div-01.d: Likewise.
>> > ? ? ? ?* ld-arm/attr-merge-div-02.d: Likewise.
>> > ? ? ? ?* ld-arm/attr-merge-div-1.s: Likewise.
>> > ? ? ? ?* ld-arm/attr-merge-div-10-m3.d: Likewise.
>> > ? ? ? ?* ld-arm/attr-merge-div-10.d: Likewise.
>> > ? ? ? ?* ld-arm/attr-merge-div-11.d: Likewise.
>> > ? ? ? ?* ld-arm/attr-merge-div-12.d: Likewise.
>> > ? ? ? ?* ld-arm/attr-merge-div-120.d: Likewise.
>> > ? ? ? ?* ld-arm/attr-merge-div-2.s: Likewise.
>> > ? ? ? ?* ld-arm/attr-merge-div-20.d: Likewise.
>> > ? ? ? ?* ld-arm/attr-merge-div-21.d: Likewise.
>> > ? ? ? ?* ld-arm/attr-merge-div-22.d: Likewise.
>> >
>> > --
>> > Matthew Gretton-Dann
>> > Principal Engineer, PD Software, ARM Ltd.
>>
>
> --
> Matthew Gretton-Dann
> Principal Engineer, PD Software, ARM Ltd.
>


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