axiom-developer
[Top][All Lists]
Advanced

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

Re: [Axiom-developer] RE: gcl-2.6.8pre on MAC OSX 10.2


From: Camm Maguire
Subject: Re: [Axiom-developer] RE: gcl-2.6.8pre on MAC OSX 10.2
Date: 06 Nov 2006 09:08:53 -0500
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Greetings!

May I suggest trying this entry from amd64-linux.h:

#ifdef IN_SFASL
#include <sys/mman.h>
#define CLEAR_CACHE {\
   void *p,*pe; \
   p=(void *)((unsigned long)memory->cfd.cfd_start & ~(PAGESIZE-1)); \
   pe=(void *)((unsigned long)(memory->cfd.cfd_start+memory->cfd.cfd_size) & 
~(PAGESIZE-1)) + PAGESIZE-1; \
   if (mprotect(p,pe-p,PROT_READ|PROT_WRITE|PROT_EXEC)) {\
     fprintf(stderr,"%p %p\n",p,pe);\
     perror("");\
     FEerror("Cannot mprotect", 0);\
   }\
}
#endif


I.e., copy powerpc-macosx.{defs,h} to i386-macosx.{defs,h}, make the
above modification, make sure configure detects the host right, and
then see where we are.

This code flushes the data cache so that the cpu ca properly execute
code that has just ben loaded into the data segment.  I typical
symptom of this not having been done is SIGILL as some random
instruction gets fed to the cpu.  Historically, i386 has not needed
this, but I have noticed a tendency towards requiring this
functionality as computers have been evolving over the past few
years.  mprotect is a generic syscall way to achieve the same end
without cpu specific assembly.  It might work across the board -- I
have not had time to check.

Please keep me posted.

Take care,

Humberto Ortiz-Zuazaga <address@hidden> writes:

> Camm Maguire wrote:
> 
> > locbfd should be the default on macosx, as we have Aurelien's specific
> > mods for .o file loading.  Extending this default to the intel should
> > resolve the -lintl 'out of the box'.  This said, I'd be quite
> > (pleasantly) surprised if Aurelien's code works as is on intel.  This
> > should be tried first -- if you can compile and load a simple file,
> > all is well.
> 
> No such luck. Considering that h/powerpc-macosx.h has inline (PowerPC)
> assembly, it's not likely to work (line 91).
> 
> The code is for "Processor cache synchronization code." I'm definitely
> in over my head here. I don't have the foggiest notion how to implement
> the equivalent on Intel Macs.
> 
> 
> >  Otherwise, the brain-dead default entry-level loading
> > option is --disable-statsysbfd --enable-dlopen. 
> 
> Can I simply delete the cache sync code and try this?
> 
> -- 
> Humberto Ortiz-Zuazaga
> Programmer-Archaeologist
> University of Puerto Rico
> http://www.hpcf.upr.edu/~humberto/
> 
> 

-- 
Camm Maguire                                            address@hidden
==========================================================================
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah




reply via email to

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