This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH v2][MIPS] fix CRT_CALL_STATIC_FUNCTION macro
- From: Mike Stump <mikestump at comcast dot net>
- To: Matthew Fortune <Matthew dot Fortune at imgtec dot com>
- Cc: "Maciej W. Rozycki" <macro at linux-mips dot org>, Petar Jovanovic <petar dot jovanovic at rt-rk dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, "Moore, Catherine (Catherine_Moore at mentor dot com)" <Catherine_Moore at mentor dot com>
- Date: Fri, 6 Feb 2015 10:02:55 -0800
- Subject: Re: [PATCH v2][MIPS] fix CRT_CALL_STATIC_FUNCTION macro
- Authentication-results: sourceware.org; auth=none
- References: <003e01d04179$ccc38bc0$664aa340$ at rt-rk dot com> <6D39441BF12EF246A7ABCE6654B0235320FCA3F1 at LEMAIL01 dot le dot imgtec dot org> <alpine dot LFD dot 2 dot 11 dot 1502061033300 dot 22715 at eddie dot linux-mips dot org> <6D39441BF12EF246A7ABCE6654B0235320FCAD06 at LEMAIL01 dot le dot imgtec dot org> <alpine dot LFD dot 2 dot 11 dot 1502061210200 dot 22715 at eddie dot linux-mips dot org> <CAD0D5D4-8D49-4B4B-B59A-E4E6B932B067 at comcast dot net> <6D39441BF12EF246A7ABCE6654B0235320FCB901 at LEMAIL01 dot le dot imgtec dot org>
On Feb 6, 2015, at 9:41 AM, Matthew Fortune <Matthew.Fortune@imgtec.com> wrote:
> Mike Stump <mikestump@comcast.net> writes:
>> On Feb 6, 2015, at 4:23 AM, Maciej W. Rozycki <macro@linux-mips.org>
>> wrote:
>>> This consideration made me realise I've had a patch outstanding for
>>> some
>>> 10 years to convert all the `BAL x' instructions there to `BLTZAL $0,
>> x'.
>>> This has always been a good idea in case implementations recognised
>>> the special case and avoided involving branch prediction, and I
>>> believe it has become even more apparent with r6 calling it NAL.
>>
>> Ick, no.
>
> What part of this are you referring to?
The first part. Ah, yes, I had mentally flipped the two cases. I mistakingly thought you wanted to change all the BALs to BLTZAL, which you don’t want to do. You only want to flip the non-calls to that form, which is perfectly reasonable.
Personally, the call form of bal in my book should be called call, and the non-call form of it should be called bal, but, I realize it is likely to late to do much about now. If one went down this path, then even changing it away from bal is wrong. That’s the basis of why I fired up the first email. Maybe more a lament at this point.