/[cmucl]/src/lisp/Darwin-os.c
ViewVC logotype

Log of /src/lisp/Darwin-os.c

Parent Directory Parent Directory | Revision Log Revision Log


Links to HEAD: (view) (annotate)
Sticky Tag:

Revision 1.35 - (view) (annotate) - [select for diffs]
Sat Sep 3 04:46:34 2011 UTC (2 years, 7 months ago) by rtoy
Branch: MAIN
CVS Tags: GIT-CONVERSION, HEAD, snapshot-2011-09
Changes since 1.34: +3 -29 lines
Diff to previous 1.34
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.

Revision 1.34 - (view) (annotate) - [select for diffs]
Thu Sep 1 16:16:49 2011 UTC (2 years, 7 months ago) by rtoy
Branch: MAIN
Changes since 1.33: +13 -12 lines
Diff to previous 1.33
Oops.  Need to check for gc write barrier before handling the sigbus.

Revision 1.33 - (view) (annotate) - [select for diffs]
Thu Sep 1 05:18:26 2011 UTC (2 years, 7 months ago) by rtoy
Branch: MAIN
Changes since 1.32: +4 -1 lines
Diff to previous 1.32
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.

Revision 1.32 - (view) (annotate) - [select for diffs]
Thu Sep 1 04:39:56 2011 UTC (2 years, 7 months ago) by rtoy
Branch: MAIN
Changes since 1.31: +39 -2 lines
Diff to previous 1.31
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

Revision 1.31 - (view) (annotate) - [select for diffs]
Sun Dec 26 16:04:43 2010 UTC (3 years, 3 months ago) by rswindells
Branch: MAIN
CVS Tags: snapshot-2011-01, snapshot-2011-02, snapshot-2011-03, snapshot-2011-04, snapshot-2011-06, snapshot-2011-07
Changes since 1.30: +9 -1 lines
Diff to previous 1.30
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.

Revision 1.30 - (view) (annotate) - [select for diffs]
Tue Jun 22 16:55:17 2010 UTC (3 years, 9 months ago) by rtoy
Branch: MAIN
CVS Tags: RELEASE_20b, cross-sol-x86-2010-12-20, cross-sol-x86-base, cross-sol-x86-merged, cross-sparc-branch-base, release-20b-pre1, release-20b-pre2, snapshot-2010-07, snapshot-2010-08, snapshot-2010-11, snapshot-2010-12, sparc-tramp-assem-2010-07-19, sparc-tramp-assem-base
Branch point for: RELEASE-20B-BRANCH, cross-sol-x86-branch, cross-sparc-branch, sparc-tramp-assem-branch
Changes since 1.29: +3 -1 lines
Diff to previous 1.29
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.

Revision 1.29 - (view) (annotate) - [select for diffs]
Tue Jun 22 15:35:23 2010 UTC (3 years, 9 months ago) by rtoy
Branch: MAIN
Changes since 1.28: +9 -19 lines
Diff to previous 1.28
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.

Revision 1.28 - (view) (annotate) - [select for diffs]
Tue Jun 22 03:24:49 2010 UTC (3 years, 9 months ago) by rtoy
Branch: MAIN
Changes since 1.27: +37 -1 lines
Diff to previous 1.27
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.

Revision 1.27 - (view) (annotate) - [select for diffs]
Mon Feb 1 16:04:43 2010 UTC (4 years, 2 months ago) by rtoy
Branch: MAIN
CVS Tags: intl-2-branch-base, intl-branch-2010-03-18-1300, intl-branch-base, intl-branch-working-2010-02-11-1000, intl-branch-working-2010-02-19-1000, post-merge-intl-branch, pre-merge-intl-branch, snapshot-2010-03, snapshot-2010-04, snapshot-2010-05, snapshot-2010-06
Branch point for: intl-2-branch, intl-branch
Changes since 1.26: +2 -2 lines
Diff to previous 1.26
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 *.

Revision 1.26 - (view) (annotate) - [select for diffs]
Mon Feb 1 15:16:08 2010 UTC (4 years, 2 months ago) by rtoy
Branch: MAIN
Changes since 1.25: +2 -2 lines
Diff to previous 1.25
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.

Revision 1.16.4.3 - (view) (annotate) - [select for diffs]
Wed Mar 18 15:37:29 2009 UTC (5 years, 1 month ago) by rtoy
Branch: unicode-utf16-extfmt-branch
CVS Tags: unicode-snapshot-2009-05, unicode-snapshot-2009-06, unicode-utf16-extfmt-2009-03-27, unicode-utf16-extfmt-2009-06-11
Changes since 1.16.4.2: +34 -4 lines
Diff to previous 1.16.4.2 , to branch point 1.16 , to next main 1.35
Sync to utf16 branch, tag unicode-utf16-sync-label-2009-03-16.

Revision 1.16.2.3 - (view) (annotate) - [select for diffs]
Mon Mar 16 21:10:56 2009 UTC (5 years, 1 month ago) by rtoy
Branch: unicode-utf16-branch
CVS Tags: unicode-utf16-char-support-2009-03-25, unicode-utf16-char-support-2009-03-26, unicode-utf16-sync-label-2009-03-16
Changes since 1.16.2.2: +34 -4 lines
Diff to previous 1.16.2.2 , to branch point 1.16 , to next main 1.35
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.

Revision 1.25 - (view) (annotate) - [select for diffs]
Tue Jan 6 00:06:46 2009 UTC (5 years, 3 months ago) by rtoy
Branch: MAIN
CVS Tags: RELEASE_19f, RELEASE_20a, amd64-dd-start, label-2009-03-16, label-2009-03-25, merge-with-19f, merged-unicode-utf16-extfmt-2009-06-11, portable-clx-base, portable-clx-import-2009-06-16, release-19f-base, release-19f-pre1, release-20a-base, release-20a-pre1, snapshot-2009-01, snapshot-2009-02, snapshot-2009-04, snapshot-2009-05, snapshot-2009-07, snapshot-2009-08, snapshot-2009-11, snapshot-2009-12, snapshot-2010-01, snapshot-2010-02, unicode-string-buffer-base, unicode-string-buffer-impl-base
Branch point for: RELEASE-19F-BRANCH, RELEASE-20A-BRANCH, amd64-dd-branch, portable-clx-branch, unicode-string-buffer-branch, unicode-string-buffer-impl-branch
Changes since 1.24: +11 -8 lines
Diff to previous 1.24
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.

Revision 1.24 - (view) (annotate) - [select for diffs]
Mon Dec 29 14:40:34 2008 UTC (5 years, 3 months ago) by rtoy
Branch: MAIN
Changes since 1.23: +28 -1 lines
Diff to previous 1.23
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.

Revision 1.16.4.2 - (view) (annotate) - [select for diffs]
Fri Dec 19 01:31:34 2008 UTC (5 years, 3 months ago) by rtoy
Branch: unicode-utf16-extfmt-branch
CVS Tags: unicode-utf16-extfmts-sync-2008-12
Changes since 1.16.4.1: +35 -5 lines
Diff to previous 1.16.4.1 , to branch point 1.16
Merge changes from utf16 branch to update to snapshot 2008-12.

Revision 1.16.2.2 - (view) (annotate) - [select for diffs]
Thu Dec 18 21:50:19 2008 UTC (5 years, 3 months ago) by rtoy
Branch: unicode-utf16-branch
CVS Tags: unicode-utf16-sync-2008-12
Changes since 1.16.2.1: +35 -5 lines
Diff to previous 1.16.2.1 , to branch point 1.16
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.

Revision 1.23 - (view) (annotate) - [select for diffs]
Wed Dec 10 02:39:13 2008 UTC (5 years, 4 months ago) by rtoy
Branch: MAIN
CVS Tags: snapshot-2008-12
Changes since 1.22: +4 -4 lines
Diff to previous 1.22
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.

Revision 1.22 - (view) (annotate) - [select for diffs]
Sun Dec 7 02:33:55 2008 UTC (5 years, 4 months ago) by agoncharov
Branch: MAIN
Changes since 1.21: +1 -2 lines
Diff to previous 1.21
Instead of defining DPRINTF in every X-os.c file, do it once, in os.h

Revision 1.21 - (view) (annotate) - [select for diffs]
Wed Nov 12 15:04:23 2008 UTC (5 years, 5 months ago) by rtoy
Branch: MAIN
CVS Tags: merge-sse2-packed
Changes since 1.20: +34 -3 lines
Diff to previous 1.20
Merge in SSE2 changes from sse2-packed-branch (tag
sse2-packed-2008-11-12).

Revision 1.16.4.1 - (view) (annotate) - [select for diffs]
Sun Nov 2 13:30:03 2008 UTC (5 years, 5 months ago) by rtoy
Branch: unicode-utf16-extfmt-branch
Changes since 1.16: +12 -26 lines
Diff to previous 1.16
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.)

Revision 1.16.2.1 - (view) (annotate) - [select for diffs]
Sat Nov 1 22:40:36 2008 UTC (5 years, 5 months ago) by rtoy
Branch: unicode-utf16-branch
CVS Tags: unicode-utf16-sync-2008-11
Changes since 1.16: +12 -26 lines
Diff to previous 1.16
Sync to snapshot 2008-11.

Revision 1.20.2.6 - (view) (annotate) - [select for diffs]
Wed Oct 1 23:24:23 2008 UTC (5 years, 6 months ago) by rtoy
Branch: sse2-branch
CVS Tags: sse2-merge-with-2008-10, sse2-merge-with-2008-11, sse2-packed-2008-11-12, sse2-packed-base
Branch point for: sse2-packed-branch
Changes since 1.20.2.5: +3 -48 lines
Diff to previous 1.20.2.5 , to branch point 1.20 , to next main 1.35
Remove unused code.

Revision 1.20.2.5 - (view) (annotate) - [select for diffs]
Wed Oct 1 11:54:35 2008 UTC (5 years, 6 months ago) by rtoy
Branch: sse2-branch
CVS Tags: sse2-checkpoint-2008-10-01
Changes since 1.20.2.4: +14 -13 lines
Diff to previous 1.20.2.4 , to branch point 1.20
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.

Revision 1.20.2.4 - (view) (annotate) - [select for diffs]
Wed Oct 1 03:47:36 2008 UTC (5 years, 6 months ago) by rtoy
Branch: sse2-branch
Changes since 1.20.2.3: +45 -1 lines
Diff to previous 1.20.2.3 , to branch point 1.20
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.

Revision 1.20.2.3 - (view) (annotate) - [select for diffs]
Tue Sep 30 15:12:15 2008 UTC (5 years, 6 months ago) by rtoy
Branch: sse2-branch
Changes since 1.20.2.2: +12 -12 lines
Diff to previous 1.20.2.2 , to branch point 1.20
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.

Revision 1.20.2.2 - (view) (annotate) - [select for diffs]
Sat Sep 27 20:15:30 2008 UTC (5 years, 6 months ago) by rtoy
Branch: sse2-branch
Changes since 1.20.2.1: +9 -7 lines
Diff to previous 1.20.2.1 , to branch point 1.20
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.

Revision 1.20.2.1 - (view) (annotate) - [select for diffs]
Fri Sep 26 18:56:43 2008 UTC (5 years, 6 months ago) by rtoy
Branch: sse2-branch
Changes since 1.20: +30 -1 lines
Diff to previous 1.20
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.

Revision 1.20 - (view) (annotate) - [select for diffs]
Tue Sep 16 14:12:46 2008 UTC (5 years, 7 months ago) by rtoy
Branch: MAIN
CVS Tags: snapshot-2008-10, snapshot-2008-11, sse2-base
Branch point for: sse2-branch
Changes since 1.19: +3 -1 lines
Diff to previous 1.19
Print out a warning message if we get a real protection fault.

Revision 1.19 - (view) (annotate) - [select for diffs]
Tue Sep 16 08:52:31 2008 UTC (5 years, 7 months ago) by cshapiro
Branch: MAIN
Changes since 1.18: +6 -24 lines
Diff to previous 1.18
Move the gencgc write barrier code into its own function.

Revision 1.18 - (view) (annotate) - [select for diffs]
Thu Sep 11 00:15:28 2008 UTC (5 years, 7 months ago) by rtoy
Branch: MAIN
Changes since 1.17: +5 -5 lines
Diff to previous 1.17
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.

Revision 1.17 - (view) (annotate) - [select for diffs]
Wed Sep 10 23:58:04 2008 UTC (5 years, 7 months ago) by rtoy
Branch: MAIN
Changes since 1.16: +7 -5 lines
Diff to previous 1.16
Clean up sigbus-handler.  I don't think we should be calling
interrupt_maybe_gc.

Revision 1.16 - (view) (annotate) - [select for diffs]
Wed Mar 19 09:17:10 2008 UTC (6 years, 1 month ago) by cshapiro
Branch: MAIN
CVS Tags: snapshot-2008-04, snapshot-2008-05, snapshot-2008-06, snapshot-2008-07, snapshot-2008-08, snapshot-2008-09, unicode-utf16-base, unicode-utf16-extfmts-pre-sync-2008-11, unicode-utf16-string-support, unicode-utf16-sync-2008-07, unicode-utf16-sync-2008-09
Branch point for: unicode-utf16-branch, unicode-utf16-extfmt-branch
Changes since 1.15: +2 -2 lines
Diff to previous 1.15
Always use prototype style function definitions.  Consistently use the
void keyword to specify empty parameter lists.

Revision 1.15 - (view) (annotate) - [select for diffs]
Thu Jan 17 14:13:15 2008 UTC (6 years, 3 months ago) by rtoy
Branch: MAIN
CVS Tags: release-19e, release-19e-base, release-19e-pre1, release-19e-pre2, snapshot-2008-01, snapshot-2008-02, snapshot-2008-03
Branch point for: release-19e-branch
Changes since 1.14: +2 -1 lines
Diff to previous 1.14
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.

Revision 1.14 - (view) (annotate) - [select for diffs]
Thu Jan 3 11:41:53 2008 UTC (6 years, 3 months ago) by cshapiro
Branch: MAIN
Changes since 1.13: +71 -21 lines
Diff to previous 1.13
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.

Revision 1.13 - (view) (annotate) - [select for diffs]
Fri Nov 16 05:04:09 2007 UTC (6 years, 5 months ago) by cshapiro
Branch: MAIN
CVS Tags: snapshot-2007-12
Changes since 1.12: +1 -3 lines
Diff to previous 1.12
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.

Revision 1.12 - (view) (annotate) - [select for diffs]
Wed Nov 14 05:44:00 2007 UTC (6 years, 5 months ago) by cshapiro
Branch: MAIN
Changes since 1.11: +9 -10 lines
Diff to previous 1.11
Update symbol names so we can compile without undefining __DARWIN_UNIX03.

Revision 1.11 - (view) (annotate) - [select for diffs]
Tue Jul 31 10:08:47 2007 UTC (6 years, 8 months ago) by cshapiro
Branch: MAIN
CVS Tags: pre-telent-clx, snapshot-2007-08, snapshot-2007-09, snapshot-2007-10, snapshot-2007-11
Changes since 1.10: +1 -14 lines
Diff to previous 1.10
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.

Revision 1.10 - (view) (annotate) - [select for diffs]
Sun Jul 15 21:33:13 2007 UTC (6 years, 9 months ago) by cshapiro
Branch: MAIN
Changes since 1.9: +1 -14 lines
Diff to previous 1.9
Remove unused context saving and setting functions.

Revision 1.9 - (view) (annotate) - [select for diffs]
Fri Jul 6 08:04:39 2007 UTC (6 years, 9 months ago) by cshapiro
Branch: MAIN
Changes since 1.8: +43 -21 lines
Diff to previous 1.8
Import x86 Darwin port.

Revision 1.8 - (view) (annotate) - [select for diffs]
Tue Jun 12 03:21:46 2007 UTC (6 years, 10 months ago) by cshapiro
Branch: MAIN
CVS Tags: snapshot-2007-07
Changes since 1.7: +2 -4 lines
Diff to previous 1.7
Remove no-op compatibility macros.

Revision 1.7 - (view) (annotate) - [select for diffs]
Tue Jan 31 03:16:39 2006 UTC (8 years, 2 months ago) by rtoy
Branch: MAIN
CVS Tags: double-double-array-base, double-double-array-checkpoint, double-double-base, double-double-init-%make-sparc, double-double-init-checkpoint-1, double-double-init-ppc, double-double-init-sparc, double-double-init-sparc-2, double-double-init-x86, double-double-irrat-end, double-double-irrat-start, double-double-reader-base, double-double-reader-checkpoint-1, double-double-sparc-checkpoint-1, release-19d, release-19d-base, release-19d-pre1, release-19d-pre2, snapshot-2006-02, snapshot-2006-03, snapshot-2006-04, snapshot-2006-05, snapshot-2006-06, snapshot-2006-07, snapshot-2006-08, snapshot-2006-09, snapshot-2006-10, snapshot-2006-11, snapshot-2006-12, snapshot-2007-01, snapshot-2007-02, snapshot-2007-03, snapshot-2007-04, snapshot-2007-05, snapshot-2007-06
Branch point for: double-double-array-branch, double-double-branch, double-double-reader-branch, release-19d-branch
Changes since 1.6: +9 -1 lines
Diff to previous 1.6
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.

Revision 1.6 - (view) (annotate) - [select for diffs]
Wed Jan 18 15:21:26 2006 UTC (8 years, 3 months ago) by rtoy
Branch: MAIN
Changes since 1.5: +26 -23 lines
Diff to previous 1.5
Merge ppc_gencgc_branch to HEAD.

Revision 1.2.2.5 - (view) (annotate) - [select for diffs]
Wed Dec 21 21:49:47 2005 UTC (8 years, 3 months ago) by rtoy
Branch: ppc_gencgc_branch
CVS Tags: ppc_gencgc_snap_2006-01-06
Changes since 1.2.2.4: +1 -43 lines
Diff to previous 1.2.2.4 , to branch point 1.2 , to next main 1.35
Remove unused sigsegv handler.

Revision 1.2.2.4 - (view) (annotate) - [select for diffs]
Wed Dec 21 21:04:53 2005 UTC (8 years, 3 months ago) by rtoy
Branch: ppc_gencgc_branch
Changes since 1.2.2.3: +2 -2 lines
Diff to previous 1.2.2.3 , to branch point 1.2
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.

Revision 1.2.2.3 - (view) (annotate) - [select for diffs]
Wed Dec 21 19:07:02 2005 UTC (8 years, 3 months ago) by rtoy
Branch: ppc_gencgc_branch
Changes since 1.2.2.2: +45 -7 lines
Diff to previous 1.2.2.2 , to branch point 1.2
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.

Revision 1.2.2.2 - (view) (annotate) - [select for diffs]
Mon Dec 19 01:10:11 2005 UTC (8 years, 4 months ago) by rtoy
Branch: ppc_gencgc_branch
CVS Tags: ppc_gencgc_snap_2005-12-17
Changes since 1.2.2.1: +255 -156 lines
Diff to previous 1.2.2.1 , to branch point 1.2
Merge code from main branch of 2005-12-17 to ppc gencgc branch.  Still
doesn't work of course.

Revision 1.5 - (view) (annotate) - [select for diffs]
Thu Sep 15 18:26:50 2005 UTC (8 years, 7 months ago) by rtoy
Branch: MAIN
CVS Tags: release-19c, release-19c-base, release-19c-pre1, snapshot-2005-10, snapshot-2005-11, snapshot-2005-12, snapshot-2006-01
Branch point for: release-19c-branch
Changes since 1.4: +234 -184 lines
Diff to previous 1.4
Indent all source files using GNU indent using the config in
.indent.pro.

Revision 1.4 - (view) (annotate) - [select for diffs]
Tue Sep 6 13:05:58 2005 UTC (8 years, 7 months ago) by rtoy
Branch: MAIN
Changes since 1.3: +53 -1 lines
Diff to previous 1.3
Move the Darwin-specific timebase_init stuff from lisp.c to Darwin-os.c,
where it belongs.

Revision 1.2.4.1 - (view) (annotate) - [select for diffs]
Wed Jun 15 12:28:13 2005 UTC (8 years, 10 months ago) by rtoy
Branch: release-19b-branch
CVS Tags: release-19b-pre2
Changes since 1.2: +5 -1 lines
Diff to previous 1.2 , to next main 1.35
Merge from HEAD to let CMUCL build on Mac OS X 10.4.

Revision 1.3 - (view) (annotate) - [select for diffs]
Wed Jun 1 13:30:16 2005 UTC (8 years, 10 months ago) by rtoy
Branch: MAIN
CVS Tags: snapshot-2005-07, snapshot-2005-08, snapshot-2005-09
Changes since 1.2: +5 -1 lines
Diff to previous 1.2
Make cmucl buildable on Mac OS X Tiger (10.4).

Essentially the patch posted by Cyrus Harmon, cmucl-imp, 2005-05-28.

Revision 1.2.2.1 - (view) (annotate) - [select for diffs]
Tue Apr 5 03:41:10 2005 UTC (9 years ago) by rtoy
Branch: ppc_gencgc_branch
CVS Tags: ppc_gencgc_snap_2005-05-14
Changes since 1.2: +21 -7 lines
Diff to previous 1.2
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.

Revision 1.2 - (view) (annotate) - [select for diffs]
Sun Feb 6 19:43:15 2005 UTC (9 years, 2 months ago) by rtoy
Branch: MAIN
CVS Tags: release-19b-base, release-19b-pre1, snapshot-2005-03, snapshot-2005-04, snapshot-2005-05, snapshot-2005-06
Branch point for: ppc_gencgc_branch, release-19b-branch
Changes since 1.1: +32 -1 lines
Diff to previous 1.1
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.

Revision 1.1 - (view) (annotate) - [select for diffs]
Tue Jul 13 00:26:22 2004 UTC (9 years, 9 months ago) by pmai
Branch: MAIN
CVS Tags: snapshot-2004-08, snapshot-2004-09, snapshot-2004-10, snapshot-2004-11, snapshot-2004-12, snapshot-2005-01, snapshot-2005-02
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.

  Diffs between and
  Type of Diff should be a

Sort log by:

  ViewVC Help
Powered by ViewVC 1.1.5