mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-02 07:30:55 -08:00
Patches to build ECL on OSX/Intel
This commit is contained in:
parent
186f0fd180
commit
edd9a4573b
3 changed files with 58 additions and 6 deletions
|
|
@ -1,6 +1,11 @@
|
|||
ECL 0.9i
|
||||
========
|
||||
|
||||
* New platforms:
|
||||
|
||||
- Patches in assembler code and GC headers to build ECL on Mac OSX/Intel
|
||||
contributed by Brad Beveridge.
|
||||
|
||||
* Visible changes:
|
||||
|
||||
- Many functions have got now the prefix "ecl_" so as to avoid namespace
|
||||
|
|
@ -88,10 +93,11 @@ ECL 0.9i
|
|||
COMPUTE-SLOTS assign a location to each slot definition that has allocation
|
||||
:INSTANCE or :CLASS.
|
||||
|
||||
- A new defclass option, :optimize-slot-access, which defaults to T, controls
|
||||
whether the slots accessors should address directly the values in the class
|
||||
or use SLOT-VALUE. It should be set to NIL when one intends to redefine the
|
||||
SLOT-*-USING-CLASS methods.
|
||||
- A new defclass option, :OPTIMIZE-SLOT-ACCESS, which defaults to the value of
|
||||
CLOS:*OPTIMIZE-SLOT-ACCESS*, controls whether the slots accessors should
|
||||
address directly the values in the class or use SLOT-VALUE. It should be set
|
||||
to NIL when one intends to redefine the SLOT-*-USING-CLASS methods, and
|
||||
to T when trying to get the most of the speed.
|
||||
|
||||
- Implemented [FUNCALLABLE-]STANDARD-INSTANCE-ACCESS. They are synonyms for
|
||||
SI:INSTANCE-REF and are, as such, inlined and _very_ unsafe. Use with care.
|
||||
|
|
|
|||
|
|
@ -74,7 +74,9 @@ ecl_fficall_execute(void *f_ptr, struct ecl_fficall *fficall, enum ecl_ffi_tag r
|
|||
"subl %1, %%esp\n\t"
|
||||
"movl %2, %%esi\n\t"
|
||||
"movl %%esp, %%edi\n\t"
|
||||
"rep movsb\n\t": "=a" (stack_p) : "c" (bufsize), "d" (buf) : "%edi", "%esi");
|
||||
"rep\n\t"
|
||||
"movsb\n\t"
|
||||
: "=a" (stack_p) : "c" (bufsize), "d" (buf) : "%edi", "%esi");
|
||||
#endif
|
||||
if (return_type <= ECL_FFI_UNSIGNED_LONG) {
|
||||
fficall->output.i = ((int (*)())f_ptr)();
|
||||
|
|
|
|||
|
|
@ -300,7 +300,7 @@
|
|||
# define mach_type_known
|
||||
# elif defined(__i386__)
|
||||
# define I386
|
||||
--> Not really supported, but at least we recognize it.
|
||||
# define mach_type_known
|
||||
# endif
|
||||
# endif
|
||||
# if defined(NeXT) && defined(mc68000)
|
||||
|
|
@ -1278,6 +1278,50 @@
|
|||
/* # define MPROTECT_VDB Not quite working yet? */
|
||||
# define DYNAMIC_LOADING
|
||||
# endif
|
||||
# ifdef DARWIN
|
||||
# if defined(__LP64__) || defined(_WIN64)
|
||||
# define CPP_WORDSZ 64
|
||||
# define ALIGNMENT 8
|
||||
# else
|
||||
# define CPP_WORDSZ 32
|
||||
# define ALIGNMENT 4
|
||||
/* Appears to hold for all "32 bit" compilers */
|
||||
/* except Borland. The -a4 option fixes */
|
||||
/* Borland. */
|
||||
/* Ivan Demakov: For Watcom the option is -zp4. */
|
||||
# endif
|
||||
# define OS_TYPE "DARWIN"
|
||||
# define DYNAMIC_LOADING
|
||||
/* XXX: see get_end(3), get_etext() and get_end() should not be used.
|
||||
These aren't used when dyld support is enabled (it is by default) */
|
||||
# define DATASTART ((ptr_t) get_etext())
|
||||
# define DATAEND ((ptr_t) get_end())
|
||||
# define STACKBOTTOM ((ptr_t) 0xc0000000)
|
||||
# define USE_MMAP
|
||||
# define USE_MMAP_ANON
|
||||
# define USE_ASM_PUSH_REGS
|
||||
/* This is potentially buggy. It needs more testing. See the comments in
|
||||
os_dep.c. It relies on threads to track writes. */
|
||||
# ifdef GC_DARWIN_THREADS
|
||||
/* # define MPROTECT_VDB -- diabled for now. May work for some apps. */
|
||||
# endif
|
||||
# include <unistd.h>
|
||||
# define GETPAGESIZE() getpagesize()
|
||||
|
||||
#if 0
|
||||
# if defined(USE_PPC_PREFETCH) && defined(__GNUC__)
|
||||
/* The performance impact of prefetches is untested */
|
||||
# define PREFETCH(x) \
|
||||
__asm__ __volatile__ ("dcbt 0,%0" : : "r" ((const void *) (x)))
|
||||
# define PREFETCH_FOR_WRITE(x) \
|
||||
__asm__ __volatile__ ("dcbtst 0,%0" : : "r" ((const void *) (x)))
|
||||
# endif
|
||||
#endif
|
||||
/* There seems to be some issues with trylock hanging on darwin. This
|
||||
should be looked into some more */
|
||||
# define NO_PTHREAD_TRYLOCK
|
||||
# endif
|
||||
|
||||
# endif
|
||||
|
||||
# ifdef NS32K
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue