This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch] Add MIPS flag to avoid use of ldc1/sdc1/ldxc1/sdxc1
- From: Steve Ellcey <sellcey at imgtec dot com>
- To: Andrew Pinski <pinskia at gmail dot com>
- Cc: Catherine Moore <clm at codesourcery dot com>, Matthew Fortune <matthew dot fortune at imgtec dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 27 Oct 2014 15:37:59 -0700
- Subject: Re: [Patch] Add MIPS flag to avoid use of ldc1/sdc1/ldxc1/sdxc1
- Authentication-results: sourceware.org; auth=none
- References: <4f0faaab-5dd4-40c8-b66d-feb9bb515c0d at BAMAIL02 dot ba dot imgtec dot org> <CA+=Sn1=STsjh2pms1Sp=a05jji=ck9hYJKYjGH3KM9GDmC+vhg at mail dot gmail dot com>
- Reply-to: <sellcey at imgtec dot com>
On Mon, 2014-10-27 at 15:32 -0700, Andrew Pinski wrote:
> On Mon, Oct 27, 2014 at 3:23 PM, Steve Ellcey <sellcey@imgtec.com> wrote:
> >
> > There are some MIPS patches that have been applied to the Google Android GCC
> > tree but not been submitted to FSF GCC. I would like to get those patches
> > checked in if possible. The first one is to add a new MIPS flag to turn
> > off the use of ldc1/sdc1/ldxc1/sdxc1. Google Earth has a custom allocator
> > that does not guarantee 8 byte alignment of the allocated memory, therefore
> > using these instructions (that require 8 byte alignment) could cause runtime
> > failures. By default, these instructions will continue to be used, the
> > flag is there to allow their use to be turned off if desired.
>
> That sounds like a bug in google earth's allocator if we follow either
> C or C++ standards when it comes to malloc/operator new.
> Both have to be align enough for the type which is at least that size
> that is being allocated. So it needs to be 8byte aligned if
> allocating a 8 byte object.
>
> Thanks,
> Andrew
I agree that it is a bug in google earth's allocator. I just don't think
I can get them to change it so I need some way to deal with the problem.
Steve Ellcey