Initial support for linkage-tables on PPC/Darwin. This is a
relatively straightforward port of the sparc version of linkage-tables. Some refinements are probably still needed, as well as some testing. Use boot-2005-02-ppc-linkage.lisp to bootstrap this change from the 2005-02 snapshot. * code/ppc-vm.lisp o Add appropriate FOREIGN-SYMBOL-ADDRESS-AUX and FIND-FOREIGN-SYMBOL functions for linkage-table. * compiler/generic/new-genesis.lisp o Basically do the same as the sparc port for linkage-tables. o need to extern-alien-name on the cold linkages since they C names depend on the backend conventions. * compiler/ppc/alloc.lisp o Load "undefined_tramp" appropriately for linkage-tables. * compiler/ppc/c-call.lisp o Define new vops (FOREIGN-SYMBOL-CODE-ADDRESS, FOREIGN-SYMBOL-DATA-ADDRESS) for linkage-tables so we can access correctly. * compiler/ppc/cell.lisp o Load "closure_tramp" appropriately for linkage-tables o Load "undefined_tramp" appropriately for linkage-tables * compiler/ppc/parms.lisp o Put the foreign linkage space start at the end of the static space to make it easier to bootstrap. (We need already mapped memory.) We can move this later. o Correct TARGET-FOREIGN-LINKAGE-ENTRY-SIZE. o Add new static-symbol *linkage-table-data* o While were at it, add SPARE-9 and SPARE-0 static symbols so we have 10 spares. * lisp/Config.ppc_darwin o Add -DLINKAGE_TABLE to CFLAGS/ASFLAGS if we have linkage-table support. * lisp/Darwin-os.c o Add os_dlsym to support linkage-tables. (This nees a little refactoring because we just copied the #defines for dlopen modes.) * lisp/os-common.c o The checking of the linkage tables that is done for sparc almost works for ppc, but not quite. Implement one for ppc. * lisp/ppc-arch.c o Add PPC version of arch_make_jump_entry, arch_make_linkage_entry, arch_linkage_entry. * lisp/ppc-assem.S o Add lazy_resolve_linkage to support linkage-tables. This needs some more work. o Add undefined_foreign_symbol_trap. This probably needs work, and definitely needs testing. * lisp/ppc-validate.h o Define the start of the linkage space and size.
Showing
- code/ppc-vm.lisp 17 additions, 1 deletioncode/ppc-vm.lisp
- compiler/generic/new-genesis.lisp 9 additions, 9 deletionscompiler/generic/new-genesis.lisp
- compiler/ppc/alloc.lisp 10 additions, 2 deletionscompiler/ppc/alloc.lisp
- compiler/ppc/c-call.lisp 29 additions, 2 deletionscompiler/ppc/c-call.lisp
- compiler/ppc/cell.lisp 15 additions, 3 deletionscompiler/ppc/cell.lisp
- compiler/ppc/parms.lisp 12 additions, 3 deletionscompiler/ppc/parms.lisp
- lisp/Config.ppc_darwin 7 additions, 2 deletionslisp/Config.ppc_darwin
- lisp/Darwin-os.c 32 additions, 1 deletionlisp/Darwin-os.c
- lisp/os-common.c 11 additions, 3 deletionslisp/os-common.c
- lisp/ppc-arch.c 152 additions, 1 deletionlisp/ppc-arch.c
- lisp/ppc-assem.S 117 additions, 0 deletionslisp/ppc-assem.S
- lisp/ppc-validate.h 22 additions, 1 deletionlisp/ppc-validate.h
Loading
Please register or sign in to comment