This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][AArch64][GCC 6] PR target/79041: Correct -mpc-relative-literal-loads logic in aarch64_classify_symbol
- From: Yvan Roux <yvan dot roux at linaro dot org>
- To: Wilco Dijkstra <Wilco dot Dijkstra at arm dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Kyrill Tkachov <kyrylo dot tkachov at foss dot arm dot com>, James Greenhalgh <James dot Greenhalgh at arm dot com>, Richard Earnshaw <Richard dot Earnshaw at arm dot com>, nd <nd at arm dot com>
- Date: Fri, 4 Aug 2017 15:50:53 +0200
- Subject: Re: [PATCH][AArch64][GCC 6] PR target/79041: Correct -mpc-relative-literal-loads logic in aarch64_classify_symbol
- Authentication-results: sourceware.org; auth=none
- References: <58765E2D.5030609@foss.arm.com> <20170113163549.GC39391@arm.com> <587CE7EC.6090208@foss.arm.com> <CAD57uCcSw6aQecqOK0VT+8=oRBT1Rb-0_1uRD=K1EnuOD_e6cw@mail.gmail.com> <AM5PR0802MB26107316371098F5247D54E783DC0@AM5PR0802MB2610.eurprd08.prod.outlook.com> <CAD57uCc11rx01aKb+Dd45U4Ac=_WJjv3eQZXkMSUn6K9mfq9hQ@mail.gmail.com> <CAD57uCfVS1NoDccPZpXmjH962-Acm3u+Uja6asqQTKyoD=+n0Q@mail.gmail.com> <CAD57uCfyy3YY5Rfer23QButafx9AT1UoSN=hPeXU04rZaq2K9g@mail.gmail.com>
On 11 July 2017 at 12:26, Yvan Roux <yvan.roux@linaro.org> wrote:
> On 3 July 2017 at 12:48, Yvan Roux <yvan.roux@linaro.org> wrote:
>> On 27 June 2017 at 13:14, Yvan Roux <yvan.roux@linaro.org> wrote:
>>> Hi Wilco
>>>
>>> On 27 June 2017 at 12:53, Wilco Dijkstra <Wilco.Dijkstra@arm.com> wrote:
>>>> Hi Yvan,
>>>>
>>>>> Here is the backport of Wilco's patch (r237607) along with Kyrill's
>>>>> one (r244643, which removed the remaining occurences of
>>>>> aarch64_nopcrelative_literal_loads). To fix the issue the original
>>>>> patch has to be modified, to keep aarch64_pcrelative_literal_loads
>>>>> test for large models in aarch64_classify_symbol.
>>>>
>>>> The patch looks good to me, however I can't approve it.
>>>
>>> ok thanks for the review.
>>>
>>>>> On trunk and gcc-7-branch the :lo12: relocations are not generated
>>>>> because of Wilco's fix for pr78733 (r243456 and 243486), but my
>>>>> understanding is that the bug is still present since compiling
>>>>> gcc.target/aarch64/pr78733.c with -mcmodel=large brings back the
>>>>> :lo12: relocations (I'll submit a patch to add the test back if my
>>>>> understanding is correct).
>>>>
>>>> You're right, eventhough -mpc-relative-literal-loads doesn't make much sense
>>>> in the large memory model, it seems best to keep the option orthogonal to
>>>> enable the workaround. I've prepared a patch to fix this on trunk/GCC7.
>>>> It also adds a test which we should add to your changes to GCC6 too.
>>>
>>> ok, I think it is what kugan's proposed earlier today in:
>>>
>>> https://gcc.gnu.org/ml/gcc-patches/2017-06/msg01967.html
>>>
>>> I agree that -mpc-relative-literal-loads and large memory model
>>> doesn't make much sense, now it is what is used in kernel build
>>> system, but if you handle that in a bigger fix already, that's awesome
>>> :)
>>
>> ping?
>> https://gcc.gnu.org/ml/gcc-patches/2017-06/msg01708.html
>
> ping
ping^3
I can include the new testcase added recently on trunk by Wilco
(gcc.target/aarch64/pr79041-2.c) if needed.
>>> Thanks
>>> Yvan
>>>
>>>> Wilco