This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, MIPS] Fix PR target/68273, passing args in wrong regs
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Richard Sandiford <rdsandiford at googlemail dot com>
- Cc: Eric Botcazou <ebotcazou at adacore dot com>,Mike Stump <mikestump at comcast dot net>,GCC Patches <gcc-patches at gcc dot gnu dot org>,sellcey at imgtec dot com,"Moore, Catherine" <Catherine_Moore at mentor dot com>,"Maciej W. Rozycki" <macro at imgtec dot com>,Matthew Fortune <Matthew dot Fortune at imgtec dot com>
- Date: Thu, 04 Feb 2016 23:04:32 +0100
- Subject: Re: [Patch, MIPS] Fix PR target/68273, passing args in wrong regs
- Authentication-results: sourceware.org; auth=none
- References: <a80cfc11-c2a6-4142-b66f-a522f227d6ba at BAMAIL02 dot ba dot imgtec dot org> <1454538638 dot 3232 dot 125 dot camel at ubuntu-sellcey> <1E4CE37C-986B-4DEB-A936-BA9A6C117A0B at comcast dot net> <2455176 dot 3K2QFyxiOu at polaris> <CAFiYyc0W3_Pqdrnxt7h3sv0eHjf8CGemadXH3=+vu3mLq-nbGQ at mail dot gmail dot com> <8737t8fcex dot fsf at googlemail dot com>
On February 4, 2016 9:28:22 PM GMT+01:00, Richard Sandiford <rdsandiford@googlemail.com> wrote:
>Richard Biener <richard.guenther@gmail.com> writes:
>> On Thu, Feb 4, 2016 at 12:09 PM, Eric Botcazou
><ebotcazou@adacore.com> wrote:
>>>> So this doesnât fix aarch64, c6x, epiphany, ia64, iq2000, rs6000,
>rx, sparc,
>>>> tilegx, tilepro or xtensa.
>>>> :-( Thatâs one of the problems by having each port copy and paste
>swaths of
>>>> :code from other ports to express the same thing instead of ports
>sharing
>>>> :just one copy of code. My port is also broken in the same way
>>>> :(currently).
>>>
>>> Yes, fixing a compiler bug by changing the ABI is a no-no, and the
>argument of
>>> the compatibility with LLVM has IMO little merit since it's a GCC
>extension.
>>
>> True, but the compiler bug is in the backends - it just now gets
>> exposed more easily
>> (read: w/o user intervention).
>
>I'm still not convinced it's a backend/target bug though. It seems
>like a similar situation to floats being promoted to doubles and
>chars to ints when passed to unprototyped functions or varargs.
>In those situations it's up to the hook to decide what type the
>value actually gets passed as. Passing an overaligned int as a
>plain int is pretty similar and isn't something that each target
>should need to check individually.
I agree here. BUT we are still effectively changing the ABI of each affected target then without actually knowing we do.
I'd happily do such change in the middle-end if we identified all affected targets and verified the changes impact.
That's a lot of work and thus having active targets follow the "arm way" of fixing the issue in the target is very reasonable in my opinion and the only thing I'd accept at this stage.
Richard.
>Thanks,
>Richard
- References:
- Re: [Patch, MIPS] Fix PR target/68273, passing args in wrong regs
- Re: [Patch, MIPS] Fix PR target/68273, passing args in wrong regs
- Re: [Patch, MIPS] Fix PR target/68273, passing args in wrong regs
- Re: [Patch, MIPS] Fix PR target/68273, passing args in wrong regs
- Re: [Patch, MIPS] Fix PR target/68273, passing args in wrong regs