emacs-devel
[Top][All Lists]
Advanced

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

Re: [OSX] G4 compiled binary fails on G5


From: YAMAMOTO Mitsuharu
Subject: Re: [OSX] G4 compiled binary fails on G5
Date: Thu, 03 Feb 2005 20:28:28 +0900
User-agent: Wanderlust/2.12.0 (Your Wildest Dreams) SEMI/1.14.6 (Maruoka) FLIM/1.14.6 (Marutamachi) APEL/10.6 Emacs/21.3.50 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI)

>>>>> On Wed, 02 Feb 2005 12:21:34 -0500, Stefan Monnier <address@hidden> said:

> what's the problem with optimization flags and ENABLE_CHECKING and
> USE_LSB_TAG?

It crashes at startup time (while loading loadup.el).  This issue was
mentioned in my previous mail.

>>>>> On Sun, 17 Oct 2004 18:23:32 +0900, YAMAMOTO Mitsuharu <address@hidden> 
>>>>> said:

>> If you want to be more confident that it does indeed work, compile
>> with -DENABLE_CHECKING.  This should pretty quickly catch any
>> problem.  I think it's not unexpected on RISC systems like PowerPC
>> that DECL_ALIGN is not needed.

> Actually, I used this in the early development stage.  It seems that
> the default optimization option of MrC compiler is not compatible
> with -DENABLE_CHECKING.

Unfortunately, I still don't know why, and it's difficult for me to
use a debugger on Mac OS 9.  I couldn't invoke PowerMac Debugger
(http://developer.apple.com/tools/debuggers/) on the Classic
Environment.

>>>>> On Wed, 02 Feb 2005 12:21:34 -0500, Stefan Monnier <address@hidden> said:

> Also in s-mac.h, would it be correct to add to the code

>    #ifdef __MRC__
>    #define DECL_ALIGN(type, var) type var
>    #endif

> a little comment saying something like "MrC always aligns structures
> larger than 8bytes on 8byte boundaries".  If not, what is the
> justification for defining DECL_ALIGN as a nop?

Sorry, I'm not 100% sure.  All I have is "Just it seems to work" and a
description in "Macintosh C/C++ ABI":
(http://developer.apple.com/tools/mpw-tools/compilers/docs/abi_spec.pdf)

  3.3.1.1 Natural Alignment

  The natural alignment of the type of is used whenever an instance of
  that type, a local or global, is allocated to memory or assigned a
  memory address.

                                 ...

  The natural alignment for an aggregate type is the maximum of the
  natural alignments of its members.

According to the natural alignment, one can only assume that Lisp_Subr
is aligned on 4 byte boundaries.  But there's also the following note:

  NOTE: It is recommended that compilers use the following formula to
  choose the alignment for local and global aggregate variables
  instead of using the natural alignment:

                                 ...

     size of 8-15 bytes -> alignment of 8 bytes
     size of 16 byte or more -> larger of 8 and the embedding
                                alignment of the variable's type
     
So, 8 byte alignment would be expected.  But again, I'm not 100% sure.

                                     YAMAMOTO Mitsuharu
                                address@hidden




reply via email to

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