This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch] Add MIPS flag to avoid use of ldc1/sdc1/ldxc1/sdxc1


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]