bug-gnubg
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: stack align in multithread.c (was Re: [Bug-gnubg] OS/X check in)


From: Michael Petch
Subject: Re: stack align in multithread.c (was Re: [Bug-gnubg] OS/X check in)
Date: Thu, 10 Apr 2008 04:00:20 -0600
User-agent: Microsoft-Entourage/11.4.0.080122

On 4/10/08 3:37 AM, "Christian Anthon" <address@hidden> wrote:

> On Wed, Apr 9, 2008 at 11:58 PM, Michael Petch <address@hidden>
> wrote:
>> 
>>  Howdy,
>> 
>>  I have put away changes to support OS/X sound with Quicktime (The way it was
>>  previously), and fixed up the multithreaded code to only align the stack on
>>  X86 processors. I am unsure this has to be done on the PPC and other
>>  processors so I have ifdef'ed it out if the target of the build is not Intel
>>  x86 (or x86_64).
> 
> x86: the pattern you provided doesn't match x86_64. I believe that
> host, not target is the right thing to use here.
> 
> The alignment of the stack seems to be something gcc specific. Perhaps
> we need/want it on ppc-mac as well? Jon, can we use the aligned gcc
> attribute instead like in sse.h:
> 

Your right, looking at the check It will not do it on x86_64, so that will
have to be fixed (I'll put away the change).

Now I'm glad you picked up on the "Target". The reality is (in my mind) that
the appropriate check is "target", not "host". My intent is to properly
create a cross compile environment for OS/X (Since Intel and X86 builds can
be produced on the same platform for example).

When not cross compiling Target=Host=Build (which is how everyone does a
build now). The target processor is where  the executable will be running.
So if I am on an Intel Box and in the future going to compile for PPC, the
target environment is what I want to know about in this case (Not the host
that it was built on).

The usage of Target is simply me thinking ahead.

I did make a change to configure (AC_DEFINE) that needs autoheader to be run
(Part of autogn.sh) for the one new define to be picked up properly.

As for the alignment on other processors, I'll defer to Jon but the main
issue is - as it stands the __asm code (as it is now)  only applies to the
x86 instruction set and will fail on other processors (PPC/Arm etc).








reply via email to

[Prev in Thread] Current Thread [Next in Thread]