This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Basic support for MIPS r5900
- From: Richard Sandiford <rdsandiford at googlemail dot com>
- To: JÃrgen Urban <JuergenUrban at gmx dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sun, 23 Jun 2013 21:21:19 +0100
- Subject: Re: [PATCH] Basic support for MIPS r5900
- References: <trinity-19396fd5-d26f-429c-89a4-e9afbeb36722-1370202342791 at 3capp-gmx-bs38> <87zjv77ygt dot fsf at talisman dot default> <trinity-d20eff1d-14b2-4351-82e3-0e186c9ca625-1370993071149 at 3capp-gmx-bs35> <87k3lz5ecn dot fsf at talisman dot default> <m3vc5hs4kc dot fsf at pepe dot airs dot com> <trinity-33eeab88-8e6f-4c13-ae48-a7222ac834b9-1371235685554 at 3capp-gmx-bs52> <87li6b1aia dot fsf at talisman dot default> <trinity-0d8670a3-8f5b-46b0-b5b1-f2e804ba1f9c-1371394855940 at 3capp-gmx-bs33> <878v2926p9 dot fsf at talisman dot default> <trinity-7e279729-5474-4a4d-9843-e21874df9bc1-1372016093550 at 3capp-gmx-bs16>
"JÃrgen Urban" <JuergenUrban@gmx.de> writes:
> Hello Richard,
>
>> >> Does it still work with those changes, as below? If so, I'll check it in.
>> >
>> > I tested it. It is still working. So the patch is OK, please check it in.
>>
>> OK, I've applied this and the config.gcc patch.
>
> Thanks.
>
> In the native PS2SDK (i.e. no Linux) I detected that there are undefined
> references to `__fixtfsi', `__floatsitf', `__subtf3', `__multf3',
> __extenddftf2', `__lttf2' and `__gttf2'. These are the functions for
> handling "long double".
> There is a fix needed for this in libgcc. I attached 2 patches to this
> e-mail. There should be only one of the patches used to fix this.
> The first one fixes the problem for all mips systems. The second one
> fixes this only for r5900. I think it is a general problem. I assume the
> undefined references could appear on all mips64 systems which are not
> Linux. So the first patch should be applied.
The second patch is right. Not all targets have 128-bit long doubles,
so t-tpbit is intentionally an opt-in rather than opt-out thing.
E.g. mips*-sde-elf and mips*-mti-elf both use:
#undef LONG_DOUBLE_TYPE_SIZE
#define LONG_DOUBLE_TYPE_SIZE 64
to get a form of n32 in which long doubles are the same as doubles.
Do you want to stick with 128-bit long doubles for PS2, or would you
prefer to do what SDE does?
Thanks,
Richard