This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: extract_bit_field patch for 64-bit machines.
- To: Geoff Keating <geoffk at ozemail dot com dot au>
- Subject: Re: extract_bit_field patch for 64-bit machines.
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Tue, 26 Oct 1999 00:38:08 -0600
- cc: gcc-patches at gcc dot gnu dot org, rth at cygnus dot com
- Reply-To: law at cygnus dot com
In message <199909230330.NAA00738@gluttony.geoffk.wattle.id.au>you write:
>
> The following code was causing trouble on mips64-unknown-elf:
>
> void something_f(float);
>
> int foo(void)
> {
> union
> {
> float f;
> double d;
> } u, *pu = &u;
>
> u.f = 1.0;
> something_f(u.f);
> }
>
> compiled with -O1.
>
> The attached patch fixes it. You can see the comment on line 1172 is
> obviously wrong on all 64-bit machines with a 32-bit 'float' type.
>
> OK to commit?
>
> --
> Geoffrey Keating <geoffk@cygnus.com>
>
> ===File ~/patches/cygnus/tx49-egcs-union.patch==============
> md5sum: 7546ab221c702d2e 62bb02144429aad8 278342
> Index: egcs/gcc/ChangeLog
> 0a
> Fri Sep 17 21:30:33 1999 Geoffrey Keating <geoffk@cygnus.com>
>
> * expmed.c (extract_bit_field): Allow for the case of non-integer
> objects that are smaller than a word (like SFmode on a 64-bit
> machine).
Thanks. I went ahead and committed the change and installed the testcase.
jeff