Parent Directory | Revision Log
|Links to HEAD:||(view) (annotate)|
Cleanup sigbus handler for stack overflow. We don't need sigbus_handler_tramp; sigbus_handle_now is good enough. Print out the PC too when we get a real sigbus.
Oops. Need to check for gc write barrier before handling the sigbus.
Add os_init0 to allow for some really early OS inits. On Linux, os_init can re-exec lisp to set up the correct personality. Not normally a problem, but if any output happens before os_init is called, the output appears to happen twice. So add os_init0 to do this early on, before any output. This is a bit of a kludge. lisp/lisp.c: o Call os_init0 early in main. lisp/Linux-os.c: o Move the personality stuff from os_init to os_init0. lisp/Darwin-os.c: lisp/FreeBSD-os.c: lisp/NetBSD-os.c: lisp/OpenBSD-os.c: lisp/hpux-os.c: lisp/irix-os.c: lisp/mach-os.c: lisp/osf1-os.c: lisp/solaris-os.c: lisp/sunos-os.c: o Add dummy implementation of os_init0. These OSes don't (currently) need anything special. lisp/os.h: o Declare os_init0.
Make the stack checking feature actually work on Darwin. Previously, stack overflows would crash lisp. Darwin-os.c: o Need to check for stack overflow in the sigbus handler. (Without that, it's treated as a regular bus error.) o Add the rest of the infrastructure to handle the stack overflow. release-20c.txt: o Update
Add a test for whether the operating system supports use of the SSE2 registers. The test is a stub on everything except NetBSD for now.
Make previous changes build for x87. compiler/x86/vm.lisp: o Change *float-register-names* to be defparameter. o Setup float-regs and def-random-reg-tns appropriately for x87 and sse2. lisp/Darwin-os.c: lisp/Linux-os.c: o Conditionalize previous change for FEATURE_SSE2.
Revert the previous change to fix debug:arg/trace issue. Instead, use Carl's suggestion and define new SC numbers for the xmm registers instead of overloading the x87 fpu registers and the xmm register SC's. bootfiles/20a/boot-2010-06-cross-x86.lisp: o New file needed for cross-compiling this change. code/x86-vm.lisp: o Revert previous change. compiler/x86/sse2-c-call.lisp: o Use xmm0-tn instead of fr0-tn. No functional change, but makes the code more readable. compiler/x86/vm.lisp: o Increase the number of float registers from 8 to 16 (8 more for SSE2 registers). o Define new xmm<n> registers o Update the locations with the new sse2 SC locations for single-reg, double-reg, double-double-reg, complex-single-reg, complex-double-reg, and complex-double-double-reg storage classes. lisp/Darwin-os.c: o Revert previous change. o Update os_sigcontext_fpu_reg to support the xmm registers. lisp/Linux-os.c: o Update os_sigcontext_fpu_reg to support the xmm registers.
Fix issue where the debugger (and TRACE) would get the wrong floating-point values for arguments because the x87 registers were used instead of the sse2 registers in the sigcontext. code/x86-vm.lisp: o For SSE2 on Mac OS X, call os_sigcontext_fpu_reg_sse2 to get the SSE2 register values from the sigcontext. lisp/Darwin-os.c: o Add os_sigcontext_fpu_reg_sse2 to get the SSE2 floating point values. general-info/release-20b.txt: o Document this change.
Linux-os.c: o Follow CMUCL coding style. o Argv and envp are const char*. os.h: lisp.c: Darwin-os.c: FreeBSD-os.c: NetBSD-os.c: OpenBSD-os.c: hpux-os.c: irix-os.c: mach-os.c: osf1-os.c: solaris-os.c: sunos-os.c: o argv and envp are const char *.
Patch from Stelian Ionescu on cmucl-imp, 2010/02/01: When run on a kernel compiled without COMPAT_BRK CMUCL segfaults, so I copied the kludge used by SBCL - check the current personality, and if necessary, enable ADDR_NO_RANDOMIZE and re-exec itself. Linux-os.c: o Check for personality and rexec if necessary. os.h: o New prototype for os_init needed because it needs argv and envp. lisp.c: Darwin-os.c: FreeBSD-os.c: NetBSD-os.c: OpenBSD-os.c: hpux-os.c: irix-os.c: mach-os.c: osf1-os.c: solaris-os.c: sunos-os.c: o Update call to os_init, which needs argv and envp now.
Sync to utf16 branch, tag unicode-utf16-sync-label-2009-03-16.
Sync to CVS HEAD, tag label-2009-03-16. But don't sync Config.FreeBSD_gencgc, Config.x86_freebsd, FreeBSD-os.c, and FreeBSD-os.h. Let Alex sync those later. The result seems to work as expected on Solaris and x86/linux. Darwin (ppc or x86) untested.
o Move the 10.4 macro definitions outside the function. They're used in other functions too! o Add in the SSE2 mxcsr register only if we're running an SSE2-enabled core.
Support building and running on OSX 10.4 (Tiger). lisp/Config.x86_darwin: o Add -mmacosx-version-min=10.4 so the C code can run on Tiger. lisp/Darwin.c: lisp/x86-lispregs.h: o The mcontext slot names have a prefix of "__" on 10.5, but have no prefix on 10.4. Add #define's to make the source code work on either.
Merge changes from utf16 branch to update to snapshot 2008-12.
Merge Snapshot 2008-12 to this branch. Some tweaks needed in boot-2008-05-cross-unicode-x86.lisp and the Config files. FreeBSD and Darwin/x86 untested, but Linux and Solaris build ok.
os_sigcontext_fpu_modes should return a 32-bit int, not a long since x86-vm.lisp declares os_sigcontext_fpu_modes to return a 32-bit int.
Instead of defining DPRINTF in every X-os.c file, do it once, in os.h
Merge in SSE2 changes from sse2-packed-branch (tag sse2-packed-2008-11-12).
Sync to snapshot 2008-11. But we didn't sync code/extfmts.lisp or iso8859-1.lisp and utf-8.lisp. (I don't think we want those changes, yet.)
Sync to snapshot 2008-11.
Remove unused code.
o Fix typo in converting the FPU control and status word to the floating-point mode. o Restore the SSE2 modes in restore_fpu. o Remove some of the FEATURE_SSE2 conditionals, because Darwin/x86 always has SSE2.
Combine x87 and sse2 modes in a compatible format. Partially work. More work needed. code/float-trap.lisp: o Implement new FLOATING-POINT-MODES function to merge x87 and sse2 modes into one compatible word. Add corresponding setter. compiler/x86/float-sse2.lisp: o Turn off the translation for original floating-point-modes vops. compiler/x86/parms.lisp: o Update float bytes to match the MXCSR definitions that we are now using for the result of floating-point-modes. lisp/Darwin-os.c: o Update os_sigcontext_fpu_modes to use the same MXCSR format for the modes.
Make the SSE2 stuff use run-time tests so that we can run this code on a chip without SSE2. We leave the #ifdef's in place, just in case someone wants to build the code on a machine without sse2 support at all.
Fix up some FP handling for SSE2. Need to set up the X87 state as well. (Should we split this into to two and allow separate control of SSE2 and X87?) compiler/x86/float-sse2.lisp: o FLOATING-POINT-MODES needs to grab the stuff from the x87 state too. Or them all together to get the final result. o (SETF FLOATING-POINT-MODES) needs to set both the SSE2 and X87 control and status flags. lisp/Darwin-os.c: o Use DPRINTF o Forgot to OR in the control (mask) part of the SSE2 control. lisp/Linux-os.c: o Use DPRINTF o Fix bug where modes were xor'ed too early. o Forgot to OR in the control (mask) part of the SSE2 control.
Initial support for SSE2. This compiles itself ok on Linux, and should work on OSX. Much cleanup is needed, and still need to restore buildability without SSE2. Use bootfiles/19e/boot-2008-09-sse2.lisp as the cross-compile script. The key changes are in these new files: o float-sse2.lisp: implements all of the floating-point stuff with SSE2 o sse2-array.lisp: replacement vops using sse2 instead of x87 o sse2-c-call.lisp: replacement vops using sse2 instead of x87. o sse2-sap.lisp: replacement vops using sse2 instead of x87 code/irrat.lisp: o Basically turn off all the special routines that use the x87 trig, log, or exp instructions. We don't support that currently. (Would be nice, though.) o Turn on %%sin and friends, like on ppc. o Turn off %sin-quick and friends since we don't want to use x87 now. code/misc.lisp: o Register :sse2 feature. compiler/float-tran.lisp: o Disable transforms for x86 that use x87 instructions. We don't support that with sse2. compiler/loadbackend.lisp: o Load up the appropriate sse2 files for the compiler. This will currently overwrite existing vops with vops for SSE2. compiler/x86/float.lisp: o Disable various vops using the x87 instructions, since float-sse2.lisp doesn't have equivalents. (Just in case. Since this isn't compiled or loaded, we shouldn't need to do this.) compiler/x86/insts.lisp: o Add support for SSE2 instructions. Shamelessly borrowed from our SBCL friends. compiler/x86/vm.lisp: o Turn off some fp-constants that are not supported with sse2. o Print FP registers as XMM instead of FR. lisp/Config.linux_gencgc: lisp/Config.x86_darwin: o Enable FEATURE_SSE2 flag when compiling. lisp/Darwin-os.c: lisp/Linux-os.c: o Get the mxcsr status bits too when getting the FPU status from a sigcontext. lisp/x86-assem.S: o For SSE2, we copy any floating-point result (in ST(0)) to XMM0, so Lisp code can get it. tools/comcom.lisp: o Compile up the SSE2 files as needed.
Print out a warning message if we get a real protection fault.
Move the gencgc write barrier code into its own function.
Enable gencgc page protection for x86/darwin. gencgc.c: o Enable page protection Darwin-os.c: o Turn on sigbus_handler for x86/darwin. o Minor tweaks of sigbus_handler for x86/darwin. o Install the sigbus handler.
Clean up sigbus-handler. I don't think we should be calling interrupt_maybe_gc.
Always use prototype style function definitions. Consistently use the void keyword to specify empty parameter lists.
Clear the FPU status word before loading the control word from the sigcontext. This is a workaround for an issue on x86/darwin where loading of the control word enabling the invalid operation exception would cause that exception because the status word had that exception. Not sure why this is needed or why the invalid operation exception was set. It was happening in a call run-program while concatenating the files for the hemlock library.
Switch the FreeBSD port to use the common floating point trap handling code. Rather than introduce a new FreeBSD case to the x86 sigcontext member accessor routines, collapse all of the system specific routines down to a common set of routines. * code/debug-int.lisp - Disable some Darwin-specific code to debug NULL mcontext pointers. * code/float-trap.lisp - Remove ancient FreeBSD-specific code for handling floating point signals. * code/macros.lisp, code/sap.lisp, compiler/saptran.lisp - Include the SAP-REF-LONG setter by default on the x86. * code/x86-vm.lisp - Remove operating system specific sigcontext definitions and sigcontext accessors. Define the alien sigcontext as a system area pointer. Replace the sigcontext accessors with foreign function calls that mask the complexity of the underlying sigcontext member access. * compiler/x86/float.lisp - Unconditionally define STORE-LONG-FLOAT. This function is used by the %SET-SAP-REF-LONG VOP that underlies the SAP-REF-LONG setter. * compiler/x86/sap.lisp - Unconditionally define %SET-SAP-REF-LONG. In the case where there is not a distinct LONG-FLOAT type, admit DOUBLE-FLOAT values instead. The x87 automatically widens values pushed onto stack. This mirrors the behavior of the SAP-REF-LONG VOP. * lisp/Darwin-os.c, lisp/Linux-os.c - Define functions to access sigcontext members of interest to Lisp. Delete the sc_reg function and replace its uses with os_sigcontext_reg which is more suitably typed. * lisp/FreeBSD-os.c - Define functions to access sigcontext members of interest to Lisp. We need to be careful about the SSE and non-SSE cases for retrieving x87 registers from the saved machine state. Define a low-level SIGFPE handler to intercept floating point traps and restore the cleared status word bits based on the signal code. Get rid of sc_reg for the reasons noted above. * lisp/Darwin-os.h, lisp/FreeBSD-os.h - Declare the restore_fpu function and define a specialized RESTORE_FPU macro. Remove the sc_reg prototype. * lisp/Linux-os.h - Remove the sc_reg prototype. * lisp/os.h - Add prototypes for the new os_sigcontext functions. * lisp/x86-lispregs.h - Redefine SC_REG and SC_PC to expand out to the new os_sigcontext functions. Redfine SC_SP to expand out to SC_REG. Eliminate all platform-specific defintions of SC_PC and SC_SP.
The SAVE_CONTEXT macro expands to meaningful code on the SPARC and is a no-op on all other architectures. Remove SAVE_CONTEXT references in places that are not touched by a SPARC target.
Update symbol names so we can compile without undefining __DARWIN_UNIX03.
Replace operating system private errno accessors with a common set of errno accessors shared by all ports. Change the definition of UNIX:UNIX-ERRNO so that it always calls down to an accessor function.
Remove unused context saving and setting functions.
Import x86 Darwin port.
Remove no-op compatibility macros.
When scavenging interrupt contexts, we need to scavenge LR and CTR registers, in case they're pointing into our heap and what they're pointing to has moved. lisp/Darwin-os.c: o Add support for getting the LR and CTR registers from the context. lisp/gencgc.c: o Handle LR and CTR registers when scavenging the interrupt context. lisp/ppc-lispregs.h: o Define reg_LR and reg_CTR appropriately.
Merge ppc_gencgc_branch to HEAD.
Remove unused sigsegv handler.
lisp/Darwin-os.c: o Oops. Unprotect the PAGE_SIZE bytes, not just 4096. lisp/gencgc.h: o Change PAGE_SIZE to be 32K, like sparc, so we hit the allocation trap less often. We see that sys time goes down from about 30% to around 5%, which seems normal.
lisp/Darwin-os.c: o Turn off SIGSEGV_VERBOSE o Additional debug prints in sigbus_handler. o Writing to a write-protected area causes a sigbus, not a sigsegv, so make sigbus do what sigsegv does. lisp/gencgc.c: o Turn off some of the debugging prints. o Turn off pre_verify_gen_0 since it's really slow. o ppc seems to have the same GC invariant issue on hash tables as sparc does, so disable that assertion.
Merge code from main branch of 2005-12-17 to ppc gencgc branch. Still doesn't work of course.
Indent all source files using GNU indent using the config in .indent.pro.
Move the Darwin-specific timebase_init stuff from lisp.c to Darwin-os.c, where it belongs.
Merge from HEAD to let CMUCL build on Mac OS X 10.4.
Make cmucl buildable on Mac OS X Tiger (10.4). Essentially the patch posted by Cyrus Harmon, cmucl-imp, 2005-05-28.
Checkin the current code for gencgc. This is a basic port of sparc gencgc for ppc. This is not yet functional. Allocation seems to work, but GC does not. We're just making a checkpoint now. compiler/ppc/macros.lisp: o Update allocation macro to support gencgc. Need a temp-tn as a scratch register for inline allocation. o Update with-fixed-allocation to use allocation macro correctly for gencgc. assembly/ppc/array.lisp: o Update for new allocation macro for gencgc. code/ppc-vm.lisp: o Define *scavenge-read-only-space* compiler/ppc/alloc.lisp: compiler/ppc/array.lisp: compiler/ppc/call.lisp: o Update to use new allocation macro for gencgc. compiler/ppc/parms.lisp: o Add necessary static symbols to support gencgc. lisp/Config.ppc_darwin: o Update to build with gencgc as needed. lisp/Darwin-os.c: o Update C code for gencgc. Mostly for checking if pointer is in the dynamic space. o Many debugging printf's enabled. lisp/gencgc.c: o Adjust sparc version appropriately for ppc. o Enable many gencgc self-checks. lisp/gencgc.h: o Update PAGE_SIZE for ppc, which is 4K. lisp/ppc-arch.c: o Add necessary code to handle the allocation traps for gencgc. Basically ported sparc version for ppc. lisp/ppc-assem.S: o The way pseudo-atomic is done has been changed, so make the assembly code match. PA is now more like sparc where the LSB is the PA-interrupted bit. o do_pending_interrupt may need work. lisp/ppc-validate.h: o Make the READ_ONLY_SPACE_SIZE right. o Define CONTROL_STACK_END. lisp/purify.c: o Enable debugging printfs o Adjust purify for gencgc, basically copying sparc version.
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.
First merge of the C side of the OS X/Darwin port. Besides adding Darwin versions of all the required things, this commit separates the interrupt handler proper (now interrupt_handle_now_handler) from the actual work-horse (interrupt_handle_now), which is now only ever called from the two interrupt handlers, interrupt_handle_now_handler and maybe_now_maybe_later. This follows similar changes in SBCL, and is in fact needed in order to properly use sigreturn in signal handlers, as required to work around a problem with the G5.
This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, select a symbolic revision name using the selection box, or choose 'Use Text Field' and enter a numeric revision.
|Powered by ViewVC 1.1.5|