sbcl.git
13 years ago1.0.41.53: more make.sh tweakery, part N
Nikodemus Siivola [Wed, 18 Aug 2010 14:56:59 +0000 (14:56 +0000)]
1.0.41.53: more make.sh tweakery, part N

 Aka stuff that was supposed to be in .52, but got left out.

 * Create output/ if necessary for saving the prefix.

 * Put back the semicolon that fell on the floor and rolled into a corner.

 Scripting is hard, dammit.

13 years ago1.0.41.52: more make.sh tweakery
Nikodemus Siivola [Wed, 18 Aug 2010 14:49:27 +0000 (14:49 +0000)]
1.0.41.52: more make.sh tweakery

 * Empty string as the value for an option is treated as if the option
   wasn't provided at all, which makes scripting builds easier.

 * Temporary support for legacy-style xc host specifications for the
   benefit of clbuild &co. Add a noisy message to the end of the build
   so people will hopefully notice.

13 years ago1.0.41.51: eliminate accidental bash-ism from run-sbcl.sh
Nikodemus Siivola [Tue, 17 Aug 2010 16:06:34 +0000 (16:06 +0000)]
1.0.41.51: eliminate accidental bash-ism from run-sbcl.sh

 Thanks to Josh "Eagle Eye" Elsasser.

13 years ago1.0.41.50: additional error checking for DEFTYPE &co
Nikodemus Siivola [Tue, 17 Aug 2010 12:26:24 +0000 (12:26 +0000)]
1.0.41.50: additional error checking for DEFTYPE &co

 Based on patch by Roman Marynchak.

 * Make PARSE-DEFMACRO check that the lambda-list is actually a list.

 * Define BAD-TYPE as an utility to signal SIMPLE-TYPE-ERRORS, instead
   of having to write the keyword calls everywhere.

 * Fixes https://bugs.launchpad.net/sbcl/+bug/576594

13 years ago1.0.41.49: comment on patch submission formats in STYLE
Nikodemus Siivola [Tue, 17 Aug 2010 12:21:32 +0000 (12:21 +0000)]
1.0.41.49: comment on patch submission formats in STYLE

 Also edit the prose from I -> we at least in a few places to
 avoid confusion.

13 years ago1.0.41.48: make run-sbcl.sh work on Darwin (and presumably other BSD-clones)
Nikodemus Siivola [Tue, 17 Aug 2010 11:35:24 +0000 (11:35 +0000)]
1.0.41.48: make run-sbcl.sh work on Darwin (and presumably other BSD-clones)

 * BSD readlink doesn't support -f, fall back on dirname if readlink
   didn't work.

13 years ago1.0.41.47: (EXPT 0.0 0.0) and (EXPT 0 0.0) to signal an error
Nikodemus Siivola [Mon, 16 Aug 2010 12:53:42 +0000 (12:53 +0000)]
1.0.41.47: (EXPT 0.0 0.0) and (EXPT 0 0.0) to signal an error

 https://bugs.launchpad.net/sbcl/+bug/571581

 From patch by Roman Marynchack.

13 years ago1.0.41.46: further make.sh tweaks
Nikodemus Siivola [Mon, 16 Aug 2010 11:44:28 +0000 (11:44 +0000)]
1.0.41.46: further make.sh tweaks

 * Remove OpenMCL and Clisp examples from make.sh help
   string. Builders who need them should be able to figure them
   out. From the SBCL and CMUCL examples, I think -- and this way they
   won't go stale...

 * Also check for empty arguments to --foo= style command line options.

13 years ago1.0.41.45: make.sh command-line parsing
Nikodemus Siivola [Sun, 15 Aug 2010 13:59:00 +0000 (13:59 +0000)]
1.0.41.45: make.sh command-line parsing

 Based on patches by Daniel Herring:

 * Simple --option and --option=arg command-line parser in make.sh.

 * Supported options:

   ** --xc-host=<command> to specify XC host option instead of a
      positional argument. (Incompatible change!)

   ** --prefix=<path> to specify a non-standard install location for
      both build and install.sh.

      Addresses https://bugs.launchpad.net/sbcl/+bug/550889

   ** --help

 Semi-related minor cleanup:

 * Use --no-userinit and --no-sysinit instead of version.lisp-expr as
   the default inits for self-building: they have been around long
   enough now that it should not stop anyone from building, and makes
   for a somewhat less magical looking "//Build options: ..." line in
   the build log.

13 years ago1.0.41.44: runtime: Fix build on non-threaded x86oids.
Alastair Bridgewater [Wed, 11 Aug 2010 14:59:01 +0000 (14:59 +0000)]
1.0.41.44: runtime: Fix build on non-threaded x86oids.

  * In 1.0.41.21, I accidentally broke non-threaded x86oid builds.

  * Reported by Josh Elsasser and Bruce O'Neel with patches
provided, and Harald Hanche-Olsen without a patch.

  * This fix based on the patch by Josh Elsasser.

13 years ago1.0.41.43: fix for RENAME-PACKAGE's return value
Christophe Rhodes [Tue, 10 Aug 2010 10:59:04 +0000 (10:59 +0000)]
1.0.41.43: fix for RENAME-PACKAGE's return value

Patch from Eric Marsden (sbcl-devel 2010-07-26)

13 years ago1.0.41.42: ppc: Documentation and NEWS updates for threading.
Alastair Bridgewater [Sun, 8 Aug 2010 01:14:39 +0000 (01:14 +0000)]
1.0.41.42: ppc: Documentation and NEWS updates for threading.

  * Threading now officially experimentally supported on Linux/PPC.

  * Added PPC Linux to the list of platforms with experimental
thread support in the INSTALL file and the manual.

  * Updated NEWS.

13 years ago1.0.41.41: tests: Fix tests for ppc-threading changes.
Alastair Bridgewater [Sun, 8 Aug 2010 01:14:23 +0000 (01:14 +0000)]
1.0.41.41: tests: Fix tests for ppc-threading changes.

  * The variable current_control_stack_pointer is no longer valid
on threaded targets.  Substitute thread_control_stack_size, which
is valid on all targets, fixing alien.impure.lisp.

  * Some dynamic-extent tests currently fail on threaded PPC.
Updated :fails-on information in dynamic-extent.impure.lisp.

  * Test (:timer :parallel-unschedule) locked up my linux/ppc box
when running.  Disabled, fixing timer.impure.lisp.  Interestingly,
while the lockup in question killed the keyboard and the mouse,
briefly pressing the power button caused backlogged events to be
processed, and repeatedly pressing the power button eventually
unlocked the system completely.

  * Test (:interrupt-thread :interrupt-consing-child :again) uses
sb-kernel:*pseudo-atomic-bits*, which is an x86oid-only symbol
(other ports use various parts of reg_ALLOC instead).  Disabled the
test on non-x86oid ports, fixing threads.impure.lisp.

13 years ago1.0.41.40: ppc: Shorten the gencgc allocation sequence.
Alastair Bridgewater [Sun, 8 Aug 2010 01:14:04 +0000 (01:14 +0000)]
1.0.41.40: ppc: Shorten the gencgc allocation sequence.

  * Rearrange the allocation sequence to avoid all branches,
relying on the runtime to manipulate the point at which
execution resumes from an allocation trap to compensate.

  * Update the runtime to match the new allocation sequence.

  * There is a further possible optimization here: The runtime
allocation trap handler can also accept an ADDI instruction
where the current sequence uses an ADD.  In the case of a
fixed allocation size, this would save loading the temp
register with the size.

  * Another optimization, along the same lines as the previous
one: With a fixed allocation size, adjusting the pointer to
point to the beginning of the data block and setting the lowtag
could be done in a single instruction.

  * A third optimization, one which would entail modifying the
allocation trap handler slightly, and depends on at least the
first optimization above being in place: Once temp-tn is no
longer being used to hold the allocation size for fixed
allocations, it is available to hold the address of the
alloc region when threading is disabled, thus saving having to
reload it (two instructions).

13 years ago1.0.41.39: ppc: Rename reg_L2 to reg_THREAD on threaded builds.
Alastair Bridgewater [Sun, 8 Aug 2010 01:13:50 +0000 (01:13 +0000)]
1.0.41.39: ppc: Rename reg_L2 to reg_THREAD on threaded builds.

  * This is largely to make the disassembly less confusing when it
refers to TLS slots and other per-thread data.

13 years ago1.0.41.38: ppc: Runtime damage for threads.
Alastair Bridgewater [Sun, 8 Aug 2010 01:13:36 +0000 (01:13 +0000)]
1.0.41.38: ppc: Runtime damage for threads.

  * Call out to pthread_getspecific() from call_into_lisp in
order to obtain the TLS block for lisp operation.

  * Tie together the runtime / gencgc version of pseudo-atomic
and the arch-specific / interrupt context version of pseudo-
atomic, to fulfill the requirements of the earlier pseudo-
atomic restructuring.

  * Generally use the thread structure instead of global
variables where appropriate.

  * Save our TLS block in the pthread per-thread storage area.

  * SIG_STOP_FOR_GC appears to default to masked on PPC, so
unblock it in initial_thread_trampoline().

  * Link with -lpthread when appropriate.

13 years ago1.0.41.37: ppc: allocation fixes for threaded builds.
Alastair Bridgewater [Sun, 8 Aug 2010 01:13:20 +0000 (01:13 +0000)]
1.0.41.37: ppc: allocation fixes for threaded builds.

  * Use the alloc region in the thread structure instead of the
global boxed_region.

13 years ago1.0.41.36: ppc: Implement atomic-{incf,decf} as atomic operations.
Alastair Bridgewater [Sun, 8 Aug 2010 01:13:06 +0000 (01:13 +0000)]
1.0.41.36: ppc: Implement atomic-{incf,decf} as atomic operations.

  * ATOMIC-INCF and ATOMIC-DECF require a VOP in order to serve as
actual atomic operations.  This VOP is also required to serve as a
memory barrier.  Implemented.

13 years ago1.0.41.35: ppc: Implement compare-and-swap-vops.
Alastair Bridgewater [Sun, 8 Aug 2010 01:12:49 +0000 (01:12 +0000)]
1.0.41.35: ppc: Implement compare-and-swap-vops.

  * Based roughly on the x86-64 version and the differences
between x86oid define-full-reffer and the PPC use of VOPs
instead (the VOPs seem smart enough, why do x86oids do the
whole define-full-reffer / -c VOP thing?).

  * Compare-and-swap VOPs are full memory barriers.

  * Left the VOPs conditionally-compiled in based on the
compare-and-swap-vops feature, more as documentation of what
is involved than anything else.

  * Enabled compare-and-swap-vops for all PPC targets.

13 years ago1.0.41.34: ppc: Implement multithreaded symbol binding / unbinding.
Alastair Bridgewater [Sun, 8 Aug 2010 01:12:28 +0000 (01:12 +0000)]
1.0.41.34: ppc: Implement multithreaded symbol binding / unbinding.

  * This is roughly based on the x86-64 version, but with TLS
allocation inline and synchronization made up with a copy of
"The PowerPC Architecture" in front of me.

  * This does not have any check for TLS index overflow.

  * Also implement the spinlock stuff used by the runtime to
do its TLS index allocation for dynamic binding.

13 years ago1.0.41.33: ppc: Implement threaded symbol value accessors.
Alastair Bridgewater [Sun, 8 Aug 2010 01:12:10 +0000 (01:12 +0000)]
1.0.41.33: ppc: Implement threaded symbol value accessors.

  * Based on the x86-64 versions, again.

  * This is just the accessors, not binding.

13 years ago1.0.41.32: ppc: Random small threading bits.
Alastair Bridgewater [Sun, 8 Aug 2010 01:11:55 +0000 (01:11 +0000)]
1.0.41.32: ppc: Random small threading bits.

  * Thread-specific static symbols (these should probably be
moved to the list of common static symbols).

  * The reader for random TLS data, current-thread-offset-sap.

  * On threaded targets, stepping is controlled by a slot in the
thread structure, not by a static-symbol.  Fixed.

  * On non-threaded targets, don't hit the static-symbol value with
yet another ad-hoc method of calculating the address, use the
existing load-symbol-value macro.

13 years ago1.0.41.31: ppc: Update backend to use TL symbol storage as appropriate.
Alastair Bridgewater [Sun, 8 Aug 2010 01:11:41 +0000 (01:11 +0000)]
1.0.41.31: ppc: Update backend to use TL symbol storage as appropriate.

  * This turned out to be all of the uses of the original
-symbol-value access macros... And all to do with NLX, to two
symbols not tied to particular slots in the thread structure.

13 years ago1.0.41.30: ppc: Add thread-local symbol-value accessor macros.
Alastair Bridgewater [Sun, 8 Aug 2010 01:11:27 +0000 (01:11 +0000)]
1.0.41.30: ppc: Add thread-local symbol-value accessor macros.

  * This is basically a straight rip of the x86-64 version.

  * These macros can only be used on static-symbols, so why
aren't we pre-allocating their TLS indices and making them
available at cross-compile time?  If we did, we could elide
a temp register on stores and a memory read on all accesses.

13 years ago1.0.41.29: ppc: Dedicate a register to the TLS-block on threaded builds.
Alastair Bridgewater [Sun, 8 Aug 2010 01:11:13 +0000 (01:11 +0000)]
1.0.41.29: ppc: Dedicate a register to the TLS-block on threaded builds.

  * Swipe L2 for our TLS block.

  * Set up a THREAD-BASE-TN while we're at it.

13 years ago1.0.41.28: ppc: Fix race conditions in use of pseudo-atomic in ppc-assem.S.
Alastair Bridgewater [Sat, 7 Aug 2010 15:23:10 +0000 (15:23 +0000)]
1.0.41.28: ppc: Fix race conditions in use of pseudo-atomic in ppc-assem.S.

  * Originally, ppc-assem.S was saving the pseudo-atomic-interrupted
bit before clearing the pseduo-atomc-atomic bit in reg_ALLOC.  This
introduces a single-instruction window wherein an interrupt could
occur, be deferred, and the setting of pseudo-atomic-interrupted be
ignored.

  * Fixed, in the four places it occurs, by reordering instructions.

13 years ago1.0.41.27: ppc: Calling convention fixes for assembly-routines calling static-funs.
Alastair Bridgewater [Sat, 7 Aug 2010 15:22:58 +0000 (15:22 +0000)]
1.0.41.27: ppc: Calling convention fixes for assembly-routines calling static-funs.

  * This is essentially the same as the static-fun VOP fixes from
earlier.

13 years ago1.0.41.26: ppc: Calling-convention fixes for static-fun VOPs.
Alastair Bridgewater [Sat, 7 Aug 2010 15:21:54 +0000 (15:21 +0000)]
1.0.41.26: ppc: Calling-convention fixes for static-fun VOPs.

  * Instead of having the static-fun VOPs work with the fdefn
raw-addr slot directly, have them first load reg_FDEFN with the
static-fdefinition object and then perform the critical part of
the normal call sequence.

  * This covers the usual race condition, etc. involved in dealing
with an fdefn-raw-addr without first loading the function, and
allows (PPC only) the use of funcallable instances and closures as
static-functions (unlikely as that is).

13 years ago1.0.41.25: compiler: Create sb!vm::static-fdefn-offset.
Alastair Bridgewater [Sat, 7 Aug 2010 15:19:51 +0000 (15:19 +0000)]
1.0.41.25: compiler: Create sb!vm::static-fdefn-offset.

  * Create sb!vm::static-fdefn-offset to provide the byte offset
from NIL to the tagged form of the fdefinition.

  * Reimplement sb!vm:static-fun-offset (a misnomer) in terms of
sb!vm::static-fdefn-offset.

13 years ago1.0.41.24: ppc: Calling-convention fixes for entry-point handling during named-call.
Alastair Bridgewater [Sat, 7 Aug 2010 15:19:41 +0000 (15:19 +0000)]
1.0.41.24: ppc: Calling-convention fixes for entry-point handling during named-call.

  * For GC purposes, seven times never load reg_LIP before loading
whatever register points to the object it refers to.

  * During named-call, load the function from the fdefn before
loading the raw-addr (which ends up in reg_LIP).  For simple-fun
objects, this provides the reference base for reg_LIP.  For other
objects this doesn't matter because reg_LIP ends up pointing to
either undefined_tramp or closure_tramp.

  * This still leaves a race condition when updating fdefinitions,
but fixes the race condition surrounding function calling.

  * To fix the remaining race condition, we would need to alter
the undefined function trampoline to appear to be a simple-fun
object and adjust the fdefn-fun accessors to compensate, then
arrange for "named" calls to load reg_LEXENV and do closure-fun
access in the same manner as the closure_tramp and the "unnamed"
call VOPs.  This would add another instruction to the call path,
but not another memory access (as we would trade off loading the
fdefn-raw-addr for loading the closure-fun).

13 years ago1.0.41.23: ppc: Calling-convention fixes for LRA handling during return.
Alastair Bridgewater [Sat, 7 Aug 2010 15:19:29 +0000 (15:19 +0000)]
1.0.41.23: ppc: Calling-convention fixes for LRA handling during return.

  * For GC purposes, seven times never clobber reg_CODE while still
within a component.

  * During return processing, store the LRA in reg_LRA instead of
reg_CODE (see previous point).

  * During fun end breakpoint processing, use reg_LRA instead of
reg_CODE to store the LRA object on ppc.

  * The upshot of this is that, during returns, the program counter
and link register can always be found within the body of reg_CODE
or reg_LRA, no matter which side of the blr instruction we check,
thus always allowing the GC to correctly update them.

13 years ago1.0.41.22: runtime: Rename backtrace() to lisp_backtrace().
Alastair Bridgewater [Sat, 7 Aug 2010 13:46:38 +0000 (13:46 +0000)]
1.0.41.22: runtime: Rename backtrace() to lisp_backtrace().

  * glibc provides a backtrace() function which can be useful for
debugging runtime problems, but we already have a backtrace()
function.  Rename our backtrace() function so that it cannot
collide with the glibc version.

13 years ago1.0.41.21: runtime: Current stack and frame pointers are per-thread data.
Alastair Bridgewater [Sat, 7 Aug 2010 13:46:26 +0000 (13:46 +0000)]
1.0.41.21: runtime: Current stack and frame pointers are per-thread data.

  * Add slots to the thread structure on threaded targets to hold
the control stack and frame pointers.

  * Add some macros to thread.h to grab the correct variable or
slot on all builds, and use them everywhere required.

  * Conditional-compile out the old global variables for this on
threaded targets (I probably messed this up).

13 years ago1.0.41.20: runtime: Straighten out access to binding stack pointers.
Alastair Bridgewater [Sat, 7 Aug 2010 13:46:12 +0000 (13:46 +0000)]
1.0.41.20: runtime: Straighten out access to binding stack pointers.

  * Unify all non-cheneygc access to binding stack pointers under
one common interface.

  * Non-threaded targets are unaffected.  Threaded targets with a
binding stack pointer register (reg_BSP) must use the pointer in
the thread structure rather than the global variable during call
in / call out when built with LISP_FEATURE_SB_THREAD.

13 years ago1.0.41.19: runtime: Fix pseudo-atomic on non-x86oid gencgc.
Alastair Bridgewater [Sat, 7 Aug 2010 13:45:56 +0000 (13:45 +0000)]
1.0.41.19: runtime: Fix pseudo-atomic on non-x86oid gencgc.

  * Pseudo-atomic is per-thread state, add it to struct thread.

  * Pass the correct pointer for accessing p-a in dynbind.c.

  * In {undo_,}fake_foreign_function_call(), stash reg_ALLOC as
pseudo-atomic-bits on threaded targets.

  * In pseudo-atomic.h, the ppc gencgc code is really non-x86oid
gencgc code.

  * Also in pseudo-atomic.h, update the non-x86oid gencgc code
to do the right thing with threaded pseudo-atomic-bits.

  * Due to the way dynamic binding works on threaded targets, it
is now a requirement that the arch_* pseudo_atomic functions call
the generic versions if foreign_function_call_active_p() is true
on threaded targets (in short, C code needs to be able to enter
pseudo-atomic, not just lisp code).

13 years ago1.0.41.18: threads: stop_for_gc_handler should check for foriegn contexts
Alastair Bridgewater [Sat, 7 Aug 2010 13:45:45 +0000 (13:45 +0000)]
1.0.41.18: threads: stop_for_gc_handler should check for foriegn contexts

  * stop_for_gc_handler() was unconditionally calling
fake_foreign_function_call(), even though a thread can legitimately
receive SIG_STOP_FOR_GC while in foreign code (and this is even the
normal situation when waiting for a mutex or waitqueue).

  * Use the now-idiomatic was_in_lisp variable fix: Check for an
active foreign-function call, only call fake_foreign_function_call
if the context is in lisp code, only undo the fake call if the
context was in lisp code.

13 years ago1.0.41.17: runtime: Make foreign_function_call_active work with threaded targets.
Alastair Bridgewater [Sat, 7 Aug 2010 13:42:40 +0000 (13:42 +0000)]
1.0.41.17: runtime: Make foreign_function_call_active work with threaded targets.

  * Add a slot to the thread structure for the active flag.

  * Make the existing global variable only show up on
unithread targets.

  * Introduce a wrapper macro to portably access the right
slot on both theaded and unithread targets.

  * KLUDGE things up to maintain the old behavior on x86oids
until someone gets around to fixing x86{,-64}-assem.S to set
foreign_function_call_active properly.

13 years ago1.0.41.16: non-linux ppc runtime fixes
Nathan Froyd [Sat, 7 Aug 2010 01:01:50 +0000 (01:01 +0000)]
1.0.41.16: non-linux ppc runtime fixes

Patch from Josh Elsasser to make things work on *BSD and Darwin.

13 years ago1.0.41.15: gencgc: Implement object pinning for non-x86oids.
Alastair Bridgewater [Fri, 6 Aug 2010 18:49:42 +0000 (18:49 +0000)]
1.0.41.15: gencgc: Implement object pinning for non-x86oids.

  * Add a new static symbol for all non-x86oid gencgc targets,
*pinned-objects*.

  * Bind *pinned-objects* to NIL during thread creation if it is
defined.

  * During garbage collection, where x86oids preserve pointers on
the various thread stacks, use the same mechanism to preserve
pointers linked on *pinned-objects* for each thread.

  * Change the PPC version of with-pinned-objects to rebind
*pinned-objects* with the new objects to pin prepended when using
gencgc.

13 years ago1.0.41.14: ppc: Treat counter register as an interior pointer during GC.
Alastair Bridgewater [Fri, 6 Aug 2010 18:49:23 +0000 (18:49 +0000)]
1.0.41.14: ppc: Treat counter register as an interior pointer during GC.

  * The PPC has a "counter" register which is a
previously-unacknowledged interior-pointer... But possibly
shouldn't be.

  * This breaks all non-linux PPC targets, due to GC now accessing
the counter register during interrupt context scavenging.  Those
who have access to such targets should find it simple to fix.

13 years ago1.0.41.13: gc: Fix interrupt context scavenging of interior pointers.
Alastair Bridgewater [Fri, 6 Aug 2010 18:48:53 +0000 (18:48 +0000)]
1.0.41.13: gc: Fix interrupt context scavenging of interior pointers.

  * Some registers, such as reg_LIP and the program counter, posess
the "interior pointer" nature, meaning that they are unboxed
registers that contain untagged pointers into heap space, relative
to some actual boxed ("pair") register.

  * The program counter is advertised as always being relative to
reg_CODE, but this is easily disproven.  The "npc" register on
platforms with branch-delay slots is the same, as is the link
register on PPC.

  * Rather than coming up with clever rules for which interior
pointer registers can refer to which pairs at which times, doing
object length tests for validity, and so on, just deal with all of
the interior pointer registers (plausibly up to five on any given
platform, though in practice three or four) as general interior
pointers.

  * Rather than dealing with massive code duplication for the
various interior pointer registers, come up with a clever macro
system to paper over the worst of the repetition.

  * Only pair interior-pointers to pointer values, never fixnums
or other-immediates.

  * Use the untagged "native pointer" value of a pair register
when computing the interior-pointer offset, preventing failure
to pair when the interior-pointer is to within the first two
words of the object.

13 years ago1.0.41.12: gc: Unify gencgc and cheneygc interrupt-context scavenging.
Alastair Bridgewater [Fri, 6 Aug 2010 18:48:19 +0000 (18:48 +0000)]
1.0.41.12: gc: Unify gencgc and cheneygc interrupt-context scavenging.

  * Both gencgc and cheneygc had separate copies of
scavenge_interrupt_contexts which had drifted out of sync over
time.

  * Resynchronized both versions and moved the result into
gc-common.c, which should prevent further desynchronization.

13 years ago1.0.41.11: gc: Interrupt contexts and stacks should be scavenged per-thread.
Alastair Bridgewater [Fri, 6 Aug 2010 18:47:50 +0000 (18:47 +0000)]
1.0.41.11: gc: Interrupt contexts and stacks should be scavenged per-thread.

  * Pass an explicit thread argument to scavenge_interrupt_contexts()
instead of having it call arch_os_get_current_thread(), saving the
extra call on cheneygc and allowing multiple threads on gencgc.

  * On gencgc, the same applies to scavenge_control_stack().

  * On gencgc, don't scrub the control stack when scavenging, wait
until after the scavenging is done (it's done by the stop-for-gc
handler on other threads).

  * On gencgc, scavenge interrupt contexts and control stacks for
all threads, not just the current thread.

  * On a minor note, the code for scavenging interrupt contexts is
largely unchanged between cheneygc and gencgc.  Perhaps it should
be re-unified in gc-common.c?

13 years ago1.0.41.10: gencgc: preserve context registers is not used on non-x86oids.
Alastair Bridgewater [Fri, 6 Aug 2010 18:46:51 +0000 (18:46 +0000)]
1.0.41.10: gencgc: preserve context registers is not used on non-x86oids.

  * Disable compilation of preserve_context_registers() on
threaded non-x86oid targets to prevent link errors.

13 years ago1.0.41.9: threads: Don't set static tls for non-static symbols.
Alastair Bridgewater [Fri, 6 Aug 2010 18:45:53 +0000 (18:45 +0000)]
1.0.41.9: threads: Don't set static tls for non-static symbols.

  * *binding-stack-pointer* and *alien-stack* are only static
symbols on x86oids.  Conditional-compile their static tls init
forms out based on their existence (in case they are removed
from one of the x86oids or introduced to some other target).

13 years ago1.0.41.8: x86/x86-64: Weaken read and write barrier operations.
Alastair Bridgewater [Thu, 5 Aug 2010 21:24:33 +0000 (21:24 +0000)]
1.0.41.8: x86/x86-64: Weaken read and write barrier operations.

  * It turns out that the read-barrier operation is only needed on
Pentium Pro systems for SMP operation.  This never worked right,
so there's no need to penalize other systems to support this.

  * It turns out that the write-barrier operation is only needed
on OOSTORE systems for SMP operation.  Thsi never worked right, so
there's no need to penalize other systems to support this.

  * It turns out that x86-64 systems are neither Pentium Pro nor
OOSTORE.

  * This breaks down if the barriers were required for device I/O
instead of SMP operation.  Should anyone actually need such
barriers, adding them to the existing framework separately should
be simple enough.

13 years ago1.0.41.7: threads: Document BARRIER macro and implicit barriers.
Alastair Bridgewater [Wed, 4 Aug 2010 18:04:21 +0000 (18:04 +0000)]
1.0.41.7: threads: Document BARRIER macro and implicit barriers.

  * Not much to say, new manual subsection under Threading.

  * Also added a NEWS entry for barriers.

13 years ago1.0.41.6: threads: Insert barriers as appear to be required.
Alastair Bridgewater [Wed, 4 Aug 2010 18:03:35 +0000 (18:03 +0000)]
1.0.41.6: threads: Insert barriers as appear to be required.

  * This is mainly for mutexes, spinlocks, and sb-concurrency
queues.

  * These are probably-necessary and appear to be sufficient.

13 years ago1.0.41.5: x86: Implement memory-barrier-vops.
Alastair Bridgewater [Wed, 4 Aug 2010 18:02:45 +0000 (18:02 +0000)]
1.0.41.5: x86: Implement memory-barrier-vops.

  * Add the VOPs for the various memory-barriers.

  * Add the memory-barrier-vops feature to local-target-features on
x86 in make-config.sh.

13 years ago1.0.41.4: x86-64: Implement memory-barrier-vops.
Alastair Bridgewater [Wed, 4 Aug 2010 18:01:29 +0000 (18:01 +0000)]
1.0.41.4: x86-64: Implement memory-barrier-vops.

  * Add the VOPs for the various memory-barriers.

  * Add the memory-barrier-vops feature to local-target-features on
x86-64 in make-config.sh.

13 years ago1.0.41.3: ppc: Implement memory-barrier-vops.
Alastair Bridgewater [Wed, 4 Aug 2010 17:59:25 +0000 (17:59 +0000)]
1.0.41.3: ppc: Implement memory-barrier-vops.

  * Add the VOPs for inlining the various memory-barriers.

  * Add the memory-barrier-vops feature to local-target-features on
ppc systems in make-config.sh.

13 years ago"1.0.41.2": threads: Add memory-barrier framework.
Alastair Bridgewater [Wed, 4 Aug 2010 17:58:15 +0000 (17:58 +0000)]
"1.0.41.2": threads: Add memory-barrier framework.

  * New file, src/code/barrier.lisp, containing the baseline
implementation.

  * Added the barrier functions to the compiler function database.

  * Export the interface macro, BARRIER, from SB!THREAD and the
underlying barrier functions from SB!VM.

  * Document a new architecture-dependent build-time feature,
MEMORY-BARRIER-VOPS, for controlling the behavior and inlining of
the interpreter stubs for the barrier functions.

13 years ago1.0.41.1: much faster MAKE-INITIAL-DFUN
Christophe Rhodes [Fri, 30 Jul 2010 21:01:12 +0000 (21:01 +0000)]
1.0.41.1: much faster MAKE-INITIAL-DFUN

Don't attempt to precompute any kind of effective methods in
MAKE-INITIAL-DFUN (called from COMPUTE-DISCRIMINATING-FUNCTION, among
other places), because C-D-F is called really quite often.

This allows us to delete FINALIZE-SPECIALIZERS and
PRECOMPUTE-EFFECTIVE-METHODS, respectively responsible for about 3% each of
the time in loading asdf.fasl.  We can also delete the INITIAL-DISPATCH
discriminating function kind, which (to my surprise) was already not
mentioned in the internals documentation about the possible dfun
states.

13 years ago1.0.41: will be tagged as sbcl_1_0_41
Christophe Rhodes [Fri, 30 Jul 2010 12:55:15 +0000 (12:55 +0000)]
1.0.41: will be tagged as sbcl_1_0_41

13 years ago1.0.40.8: revert sb-bsd-sockets threadsafety patch
Christophe Rhodes [Fri, 30 Jul 2010 11:00:24 +0000 (11:00 +0000)]
1.0.40.8: revert sb-bsd-sockets threadsafety patch

Broke functionality completely on Darwin.

13 years ago1.0.40.7: socket-connect was not thread safe
cracauer [Fri, 23 Jul 2010 20:55:45 +0000 (20:55 +0000)]
1.0.40.7: socket-connect was not thread safe

https://bugs.launchpad.net/sbcl/+bug/505497

Committing diffs as supplied in the bug report after review and
testing.

Credits to Andrew Golding for the diffs and Jaap de Heer for the
initial report and reproducible test case.

13 years ago1.0.40.6: call an appropriate existing ctor from MAKE-INSTANCE (CLASS)
Christophe Rhodes [Mon, 19 Jul 2010 07:05:39 +0000 (07:05 +0000)]
1.0.40.6: call an appropriate existing ctor from MAKE-INSTANCE (CLASS)

The intuition here is that searching for a ctor is much cheaper than
the whole of the unoptimized make-instance machinery.  If a class has
many, many ctors, this may not be true, but that should be the rare
case.

Only call optimized ctors so that we don't risk endless recursion
through the fallback case.

13 years ago1.0.40.5: comment changes
Christophe Rhodes [Mon, 19 Jul 2010 07:02:48 +0000 (07:02 +0000)]
1.0.40.5: comment changes

reflows and typo fixes

13 years ago1.0.40.4: slight performance enhancement in gf initialisation
Christophe Rhodes [Mon, 19 Jul 2010 06:40:24 +0000 (06:40 +0000)]
1.0.40.4: slight performance enhancement in gf initialisation

in RAISE-METATYPE, use special variables to access system classes
rather than FIND-CLASS.  (LOAD-TIME-VALUE of FIND-CLASS doesn't work
as it is too early in the PCL bootstrap...)

13 years ago1.0.40.3: better non-ctor make-instance
Christophe Rhodes [Mon, 19 Jul 2010 06:34:36 +0000 (06:34 +0000)]
1.0.40.3: better non-ctor make-instance

Actually, the really expensive bit is the initarg validity checking.
Use the ctor machinery to cache the results of testing for initarg
validity for make-instance as well as reinitialize-instance.  (Why
wasn't this done before?)

With this change, asdf.fasl loads about 10% faster.

13 years ago1.0.40.2: ctor machinery bugfixes
Christophe Rhodes [Mon, 19 Jul 2010 06:30:07 +0000 (06:30 +0000)]
1.0.40.2: ctor machinery bugfixes

One bug was a simple harmless thinko, limiting the cache for validity
checking of reinitialize-instance initargs to only one list of keys.

The other is actually a correctness problem: addition or removal of
methods on MAKE-INSTANCE and ALLOCATE-INSTANCE would invalidate the
wrong set of initarg validity caches and reset the wrong ctors.  I
think at the moment this bug is tricky to trigger, because those
methods have no effect on reinitialize-instance initarg checking, and
fallback ctors on non-standard metaclasses are very conservative in
their assumptions.

13 years ago1.0.40.1: fix return value of WRITE
Gabor Melis [Fri, 16 Jul 2010 07:42:22 +0000 (07:42 +0000)]
1.0.40.1: fix return value of WRITE

Used to return NIL when the compiler macro for the constant keyword
argument case triggered.

Add test.

13 years ago1.0.40: will be tagged as sbcl_1_0_40
Christophe Rhodes [Wed, 30 Jun 2010 21:36:22 +0000 (21:36 +0000)]
1.0.40: will be tagged as sbcl_1_0_40

13 years ago1.0.39.24: win32: Fix foreign function name conversion.
Alastair Bridgewater [Wed, 30 Jun 2010 16:25:01 +0000 (16:25 +0000)]
1.0.39.24: win32: Fix foreign function name conversion.

  * In 1.0.39.15, the win32 case for foreign function names was
accidentally removed when the darwin/dlshim case (the same case)
was removed.  Re-added the win32 case.

13 years ago1.0.39.23: Fix run-sbcl.sh to use absolute paths when necessary.
Alastair Bridgewater [Sun, 27 Jun 2010 19:41:07 +0000 (19:41 +0000)]
1.0.39.23: Fix run-sbcl.sh to use absolute paths when necessary.

  * The new ASDF 2 requires absolute paths in places where SBCL
historically used relative paths.  The last(?) remaining place
where this happens is the SBCL_HOME environment variable set up
by run-sbcl.sh.  Fixed by introducing a readlink -f to generate
an absolute path to the base SBCL directory.

13 years ago1.0.39.22: "upgrade" to ASDF 2.003
Cyrus Harmon [Sat, 26 Jun 2010 05:03:58 +0000 (05:03 +0000)]
1.0.39.22: "upgrade" to ASDF 2.003

13 years ago1.0.39.21: more ASDF2 cleanup
Cyrus Harmon [Thu, 24 Jun 2010 05:08:58 +0000 (05:08 +0000)]
1.0.39.21: more ASDF2 cleanup

 * update the asdf README and texinfo documentation

 * update asdf license

 * fix pulling documentation from upstream

13 years ago1.0.39.20: more asdf logical pathname cleanup
Cyrus Harmon [Wed, 23 Jun 2010 03:12:35 +0000 (03:12 +0000)]
1.0.39.20: more asdf logical pathname cleanup

 * use #p"..." for logical pathnames instead of 1) just "" or
   #.(logical-pathname "...")

13 years ago1.0.39.19: asdf2 merge from upstream
Cyrus Harmon [Tue, 22 Jun 2010 17:02:25 +0000 (17:02 +0000)]
1.0.39.19: asdf2 merge from upstream

 * replaced asdf.lisp with asdf.lisp 2.102

 * wrap logical pathname in sb-rotate-byte with #.(logical-pathname ...)

13 years ago1.0.39.18: Use SB-VM:WORD in (DEFSTRUCT HASH-TABLE).
Tobias C. Rittweiler [Sun, 20 Jun 2010 07:50:14 +0000 (07:50 +0000)]
1.0.39.18: Use SB-VM:WORD in (DEFSTRUCT HASH-TABLE).

13 years ago1.0.39.17: Reduce stress level of sb-concurrency tests.
Tobias C. Rittweiler [Sun, 20 Jun 2010 07:48:24 +0000 (07:48 +0000)]
1.0.39.17: Reduce stress level of sb-concurrency tests.

Reduce the stress level of the MAILBOX tests by a factor of 10.

Reasons:

  a) As contrib tests are run as part of a normal SBCL build, the
     mailbox tests are executed each time SBCL is built. And they
     really result in a few minutes of 100% cpu usage and high load
     averages because of many simultaneously running threads.

  b) On BSD platforms, the tests were reported several times in past
     to fail. From what I'm told (and if I remember correctly), the
     issue is, however, not necessarily concurrency bugs, but a
     coarser SLEEP granularity than on Linux platform.

13 years ago1.0.39.16: tls-slot allocation not thread-safe
cracauer [Mon, 14 Jun 2010 22:32:05 +0000 (22:32 +0000)]
1.0.39.16: tls-slot allocation not thread-safe

Committing James Knight's patch from
https://bugs.launchpad.net/sbcl/+bug/589293

Tested on amd64 and x86 with same failures before and after.

Quotes:

It seems as though the ALLOC-TLS-INDEX-IN-* code is not thread-safe. I
cannot figure out how it's not thread-safe, because it looks correct
to me, so far as I can see.

But this test case shows that it's not.

sbcl --eval '(load (compile-file "thread-test.lisp"))' --eval "(run-test)" --eval "(quit)"

It will fail with something like:
   The assertion (BOUNDP '*VAR50*) failed.
The variable number will vary randomly, of course.

SBCL 1.0.37.44. Debian Linux 2.6.32-amd64, x86-64.

%%

Okay, turns out to be an utterly trivial problem. This is the
disassembly of SB-VM::ALLOC-TLS-INDEX-IN-RAX. See instructions
0x20000f42 and 0x20000f47. You can't use %rax as the new value and the
compare-to value for cmpxchg! So, the lock was never actually
taken. The variants for allocating in everything else worked
fine. Just RAX is broken.

0x20000f38: mov %rbp,0xb8(%r12)
0x20000f40: push %rcx
0x20000f41: push %rax
0x20000f42: mov $0x1,%eax
0x20000f47: xor %eax,%eax
0x20000f49: lock cmpxchg %rax,0x20100b88
0x20000f53: jne 0x20000f42
0x20000f55: pop %rcx
0x20000f56: mov 0x21(%rcx),%rax
0x20000f5a: or %rax,%rax
0x20000f5d: jne 0x20000f8d
0x20000f5f: mov 0x20100b48,%rax
0x20000f67: cmp $0x8000,%rax
0x20000f6d: jl 0x20000f80
0x20000f6f: movq $0x0,0xb8(%r12)
0x20000f7b: jmpq 0x20001874
0x20000f80: addq $0x8,0x20100b48
0x20000f89: mov %rax,0x21(%rcx)
0x20000f8d: xor %ecx,%ecx
0x20000f8f: xchg %rcx,0x20100b88
0x20000f97: pop %rcx
0x20000f98: xor %rbp,0xb8(%r12)
0x20000fa0: je 0x20000fa4
0x20000fa2: int3
0x20000fa3: 0x09
0x20000fa4: ret

13 years agoGIT GATEWAY: Remove files that were deleted in 2006.
Andreas Fuchs [Sun, 13 Jun 2010 08:01:11 +0000 (10:01 +0200)]
GIT GATEWAY: Remove files that were deleted in 2006.

These file removals were never picked up, probably due to a git bug.
The changes corresponding to these file deletions are:

  * b66385e2031fc2cac17dd129df0af400beb48a22 (0.9.16.38)
    - src/compiler/ir1-step.lisp
  * 28ed41eb0eed3f0c1baeebf10793a3d21cb0eb9d
    - src/runtime/ppc-darwin-{langinfo,dlshim}.[ch]
    - src/runtime/x86-darwin-langinfo.c

Thanks to Cyrus Harmon for alerting me to this issue.

13 years ago1.0.39.15: delete all traces of the darwin dlshim
Cyrus Harmon [Sun, 13 Jun 2010 04:40:20 +0000 (04:40 +0000)]
1.0.39.15: delete all traces of the darwin dlshim

 * following up on previous commits which still used the shim with the
   :dlshim feature, now completely remover all traces of the dlshim.

13 years ago1.0.39.14: prepend an underscore to ldso stubs
Cyrus Harmon [Sun, 13 Jun 2010 02:39:40 +0000 (02:39 +0000)]
1.0.39.14: prepend an underscore to ldso stubs

 * a leading underscore keeps the cross-compiling linker happy
   and matches the way we do things on x86oid darwins.

13 years ago1.0.39.13: restore darwin/ppc building
Cyrus Harmon [Sat, 12 Jun 2010 22:59:53 +0000 (22:59 +0000)]
1.0.39.13: restore darwin/ppc building

 * fix ldso stubs to work without the dlshim

 * hack to avoid calling dlclose on the main executable
   for darwin/ppc

13 years ago1.0.39.12: remove darwin-langinfo
Cyrus Harmon [Sat, 12 Jun 2010 22:25:31 +0000 (22:25 +0000)]
1.0.39.12: remove darwin-langinfo

 * remove darwin-langinfo.c/h from Config.*-darwin and
   grovel-headers.c

 * revert explicit setting of *default-c-string-external-format* to
   latin-1 in sb-posix test.

13 years ago1.0.39.11: fix readdir for :inode64 builds
Cyrus Harmon [Sat, 12 Jun 2010 20:44:42 +0000 (20:44 +0000)]
1.0.39.11: fix readdir for :inode64 builds

 * readdir now calls readdir$INODE64 when buildling with :inode64
   (launchpad bug #592897)

13 years ago1.0.39.10: cleanup sb-posix tests for darwin
Cyrus Harmon [Fri, 11 Jun 2010 22:31:49 +0000 (22:31 +0000)]
1.0.39.10: cleanup sb-posix tests for darwin

 * check for the error codes darwin gives back

 * use :latin-1 for *default-c-string-external-format* in readdir test

13 years ago1.0.39.9: improvements to the manual
Christophe Rhodes [Sun, 6 Jun 2010 20:43:57 +0000 (20:43 +0000)]
1.0.39.9: improvements to the manual

These improvements mainly centre around better indexing, including
some nifty trickery to get suitably collated and aligned index
entries (to cope with issues like *earmuffs* and sb-foo package
prefixes).  This patch also incorporates work by Robert Goldman to
document the commands for enabling and disabling the debuggers.

The remainder of this log message is a squashed version of my git
branch's log messages:

improve text relating to my support availability

Remove a stray comma in instructions for signal-related bug reporting

Patch from Robert Goldman for enable/disable-debugger documentation

trick texinfo's collation engine into producing a better index

The issue is that the sort order and what is printed (both in the
index and as the title of a definition entry) are deeply tied together
in texinfo, and there's no obvious way short of rewriting lots of TeX
code to undo that.  There is one get-out clause, though: texinfo
macros are replaced by their arguments.  So define a number of macros
which hide from the collation engine things that we would rather not
play a part in the sorting (package names, "(setf", *earmuffs*)

In the process, note that @deffoo in texinfo automatically produces an
index entry, so get rid of the apparently redundant extra index
entries produced by docstrings.lisp
Mostly move to using the new indexing helper macros

Only mostly: there are a few remaining issues.  The first is
declarations, which are treated as types; I think they might warrant
their own index; similarly, various commands (debugger, inspector)
aren't really functions.  Hardest of all is the ffi chapter, which has
handwritten function documentation which is highly similar to but not
exactly the same as the docstrings for those operators; it would be
good to merge the documentation into the docstrings, include the
autogenerated texinfo snippets into the manual, and thereby gain
complete consistency.
add some index entries from the efficiency chapter

... because why not?
manually (!) change the entries for FFI-related functions and macros

Making the docstrings match the text match reality is an exercise for
the future.
make index in info form mostly work

info readers apparently parse the formatted index to work out where to
go.  This is hilariously bad if the index entries contain colons, so
define macros conditional on output format to make sure that they
don't in info.
better, more useful indexes

Now that collation is sorted (!), getting the display of index entries
to be useful is important.  This not-quite-general trick is to make
the package name as small as possible, have the colon always in the
same horizontal position, and arrange that the package name extends at
most three characters ("sb-") into the left margin.  This is the most
tolerable I can find.

Continue not having package information at all in info format; in
other formats, place the package information after the symbol name.
This probably goes wrong in corner cases like
(setf sb-mop:symbol-value-using-class)
deal with remaining manually-documented functions

make documentation for declarations consistent

Arbitrarily decide that declarations belong in the function index
rather than the type index; use the package prefix texinfo macros to
get them properly indented.
One more manually-documented thing which needed a package macro decoration

Fix the nopkg{} macro to align index entries in TeX mode

Use it for debugger commands.

13 years ago1.0.39.8: Inline-compare more character codes on SB-UNICODE PPC.
Alastair Bridgewater [Sun, 6 Jun 2010 19:53:44 +0000 (19:53 +0000)]
1.0.39.8: Inline-compare more character codes on SB-UNICODE PPC.

  * In 1.0.38.5, I disabled the -c character compare VOPs on SB-UNICODE
because the instruction used (cmplwi) was limited to a 16-bit constant.

  * Added a predicate to determine if a character can safely be used in
the -c character compare VOPs.

  * Changed the required constant type on the -c character compare VOPs
from CHARACTER to (SATISFIES <the-new-predicate>).

  * Back in the commit comment for 1.0.38.5 I said that there was no
good way to conditionally use the VOPs.  Looks like I was wrong, unless
you want to argue that SATISFIES types are bad.

13 years ago1.0.39.7: Make TRACE :ENCAPSULATE NIL work on PPC.
Alastair Bridgewater [Sun, 6 Jun 2010 19:51:18 +0000 (19:51 +0000)]
1.0.39.7: Make TRACE :ENCAPSULATE NIL work on PPC.

  * SIGNAL-CONTEXT-FRAME (debug-int.lisp) was passing a bogus
parameter to COMPUTE-CALLING-FRAME on non-x86oids, causing an
unknown immediate object to be constructed.  Fixed, and KLUDGEd
to still work on x86oids.

  * fun_end_breakpoint_guts (ppc-assem.S) wasn't implemented at
all, just stubbed out to provide the symbols that the core looks
for when compiling MAKE-BOGUS-LRA (debug-int.lisp).

  * The implementation of fun_end_breakpoint_guts on non-PPC is
sparsely explained at best.  Addressed in the new PPC version.

  * The usual implementation of fun_end_breakpoint_guts leaves
setting the LRA header data to MAKE-BOGUS-LRA but this is done
after attempting to create the LRA object, which fails on GENCGC
systems due to the sanity checking of the pointer.  On PPC, this
is addressed by setting the LRA header data by dead reckoning in
ppc-assem.S.

  * In MAKE-BOGUS-LRA, don't bother setting the LRA header data
if it is known to already be correct.

13 years ago1.0.39.6: valid_lisp_pointer_p() is gencgc-specific, not x86oid-specific.
Alastair Bridgewater [Sun, 6 Jun 2010 19:43:30 +0000 (19:43 +0000)]
1.0.39.6: valid_lisp_pointer_p() is gencgc-specific, not x86oid-specific.

  * Changed SB-KERNEL:MAKE-LISP-OBJ (src/code/debug-int) to use
valid-lisp-pointer-p on all gencgc targets, not just x86oids.

  * Changed valid_lisp_pointer_p() (src/runtime/gencgc.c) to build on
all targets, not just x86oids.

  * Added a special-case to looks_like_valid_lisp_pointer_p() to
correctly handle LRA objects (RETURN_PC_HEADER_WIDETAG) on non-x86oid
targets (though, really, we probably should have an :IMPLICIT-LRA
feature for this sort of nonsense).

13 years ago1.0.39.5: Initial attempt to make breakpoints work on PPC.
Alastair Bridgewater [Sun, 6 Jun 2010 19:41:10 +0000 (19:41 +0000)]
1.0.39.5: Initial attempt to make breakpoints work on PPC.

  * The actual breakpoint trap instruction was wrong, acting as a
NOP instead of trapping.  Fixed.

  * A bit of cleanup and fixes surrounding setting up breakpoints
and dealing with after-breakpoints.

  * An initial implementation of the clever part of
arch_do_displaced_inst().

  * Added a couple of new arch-os-specific functions to find the
parts of the context required for arch_do_displaced_inst().  Stubbed
out for darwin and bsd, probably broken on GLIBC231_STYLE_UCONTEXT
linux systems.

  * Everything beyond fixing the breakpoint trap instruction not
actually tested, because it turned out that the entire breakpoint
system is broken on all non-x86oid targets, due to something in
src/code/debug-int.lisp.

14 years ago1.0.39.4: fix build on non-darwin and ppc/darwin platforms
Cyrus Harmon [Thu, 3 Jun 2010 14:43:15 +0000 (14:43 +0000)]
1.0.39.4: fix build on non-darwin and ppc/darwin platforms

  * fix conditional include of langinfo.h

  * conditionalize the darwin/ppc Config file for :dlshim

14 years ago1.0.39.3: support building on darwin x86 and x86-64 without the dlshim
Cyrus Harmon [Thu, 3 Jun 2010 04:39:50 +0000 (04:39 +0000)]
1.0.39.3: support building on darwin x86 and x86-64 without the dlshim

  * x86 config -mmacosx-version-min cleanup

  * remove dlshim feature in make-config.sh

  * fix extern-alien-name and ldso naming conventions

  * kludge in load-cold-foreign-symbol-table to strip off the leading
    #\_ from the nm parsing

  * change dependency on ldso stubs for dlopen and friends to be
    #!-dlshim instead of #!-darwin

  * remove Config.x86-64-darwin9+ and replace with makefile
    conditionals

  * add :dlshim feature for darwin in make-config.sh and rework the
    darwin9+ stuff

  * make grovel-headers.c load genesis/config.h first so that we can
    use the LISP_FEATURE_xxx conditionals earlier

14 years ago1.0.39.2: Fix symbol-name-conflict resolution test from 1.0.39.1.
Alastair Bridgewater [Sun, 30 May 2010 00:40:34 +0000 (00:40 +0000)]
1.0.39.2: Fix symbol-name-conflict resolution test from 1.0.39.1.

  * Before signalling a name-conflict in IMPORT due to a symbol found
previously on the arglist, remove the earlier symbol from the list of
symbols to add to the package (one or the other will be shadowing-imported,
and there's no further check for name collision.

14 years ago1.0.39.1: Test case for symbol-conflict resolution bug on import.
Alastair Bridgewater [Sun, 30 May 2010 00:32:11 +0000 (00:32 +0000)]
1.0.39.1: Test case for symbol-conflict resolution bug on import.

  * If two symbols of the same name are IMPORTed to a package that does
not yet have a symbol of that name accessible, and the latter of the two
symbols is chosen during conflict resolution, the former is also added
to the package, as is detectable via do-symbols.

14 years ago1.0.39: will be tagged as sbcl_1_0_39
Christophe Rhodes [Sat, 29 May 2010 19:33:42 +0000 (19:33 +0000)]
1.0.39: will be tagged as sbcl_1_0_39

14 years ago1.0.38.12: Fix FP traps on PPC/Linux.
Alastair Bridgewater [Mon, 24 May 2010 02:23:15 +0000 (02:23 +0000)]
1.0.38.12: Fix FP traps on PPC/Linux.

  * Linux on most platforms, including PPC, kicks off its signal
handlers with a cleared FP control word.  We already have a hook to deal
with this, so enable it.

  * The implementation of said hook on PPC/Linux was broken, largely due
to a variable-size mismatch in a KLUDGE it uses.  Fixed and documented
the KLUDGE, added support for preserving the current rounding mode, and
enabled the actual restoration of the FP control word.

  * NetBSD isn't the only target which requires :INVALID exceptions to
be disabled, it also matters on PPC.  Fixed the default control mode.

  * Fix up the test suite to reflect the current expectations for
float.pure.lisp tests.

14 years ago1.0.38.11: Enable floating-point exception delivery on PPC/Linux.
Alastair Bridgewater [Sun, 23 May 2010 22:49:58 +0000 (22:49 +0000)]
1.0.38.11: Enable floating-point exception delivery on PPC/Linux.

  * For some reason, Linux disables floating-point exception delivery
by default.  Use the PR_SET_FPEXC prctl (new in 2.4.21 and 2.5.32) to
enable it in "precise" mode (possibly overkill).

  * This is necessary but not sufficient to fix one of the failing
tests in float.pure.lisp.

  * Given that this is only necessary for one test case, the test
suite has woefully incomplete coverage of floating-point exceptions.

14 years ago1.0.38.10: Support for building on OpenBSD/PPC (patch by Josh Elsasser).
Alastair Bridgewater [Sun, 23 May 2010 18:23:59 +0000 (18:23 +0000)]
1.0.38.10: Support for building on OpenBSD/PPC (patch by Josh Elsasser).

  * Dynamic space assignments.

  * New Config.* makefile fragment.

  * OpenBSD-specific support in ppc-arch.c and ppc-bsd-os.c

  * Fixed test suite issues relating to OpenBSD/PPC.  This was that the
foreign stack alignment needed setting and that OpenBSD, unlike other
PowerPC targets, requires -fPIC in CFLAGS when building shared objects.

  * It turns out that os_context_sp_addr() in ppc-bsd-os.c is only used
when ARCH_HAS_STACK_POINTER is set, which only occurs on x86oid systems
at the present time.

14 years ago1.0.38.9: Integer callback result fixes.
Alastair Bridgewater [Fri, 21 May 2010 01:03:25 +0000 (01:03 +0000)]
1.0.38.9: Integer callback result fixes.

  * Callback results should be typechecked based on their declared
type, but stored as if they were the full width of a machine register.

  * Fixed sb-alien::alien-callback-lisp-wrapper-lambda to make this
happen properly.

  * Updated corresponding tests (formerly callback.impure.lisp /
sign-extension and underflow-detection) to cover 16-bit cases, which
would have broken on all targets, not merely 64-bit targets.

  * As a minor side note, assistance in testing the changes in 1.0.38.8
was provided by one Andreas Selfjord Eriksen, but I forgot to note this
fact in the commit message.  Mea Culpa.

14 years ago1.0.38.8: Test suite cleanups.
Alastair Bridgewater [Thu, 20 May 2010 22:09:39 +0000 (22:09 +0000)]
1.0.38.8: Test suite cleanups.

  * Changed the impure test runner to be more in line with what used
to happen when it used fork() instead of RUN-PROGRAM (--noprint and
--disable-debugger, don't allow RUN-PROGRAM to use the inherit-stdin
code path).

  * Re-enabled the (RUN-PROGRAM INHERIT-STDIN) test, as it no longer
hangs on ppc/linux, x86-64/linux, or x86-64/darwin, the platforms
which prompted the test to be disabled.

  * Fixed the failure mode of dynamic-extent.impure.lisp test case
HANDLER-CASE-BOGUS-COMPILER-NOTE to fail the test case instead of
attempting to enter the debugger (due to COMPILER-NOTE not being a
subclass of ERROR).

  * Disabled the x86-64 SSE floating-point tests on non-x86oid
platforms due to the use of x86oid-only SB-VM::TOUCH-OBJECT in the
test code causing a package lock error.

  * Registered all tests that fail on PPC/Linux as :fails-on :ppc.

  * Removed a number of :fails-on clauses that appear to be out of
date.

14 years ago1.0.38.7: fix clisp build for ppc
Nathan Froyd [Mon, 10 May 2010 00:39:12 +0000 (00:39 +0000)]
1.0.38.7: fix clisp build for ppc

LP #576587, thanks to Josh Elsasser for the patch.

14 years ago1.0.38.6: Clear higher order bits for SSE operations that don't
Paul Khuong [Thu, 6 May 2010 13:49:24 +0000 (13:49 +0000)]
1.0.38.6: Clear higher order bits for SSE operations that don't

 * SQRTSD, CVT{SS,SD}2{SS,SD} and CVTSI2{SS,SD} leave the high-order
   bits of the result as-is. These are the only (hopefully) operations
   we use that have a single input, so we must explicitly clear out
   the destination register.

 * Probably a performance fix too, as it breaks dependency chains on
   the destination register.

 * The bug was relatively hard to observe. Raymond Toy reported seeing
   and fixing something similar on maxima/CMUCL. Brittle test case
   added.

14 years ago1.0.38.5: PPC character handling fixes.
Alastair Bridgewater [Sat, 1 May 2010 00:15:10 +0000 (00:15 +0000)]
1.0.38.5: PPC character handling fixes.

  * SAP-REF-32LE referred to SAP-REF-16 instead of SAP-REF-16LE on
non-x86oid platforms, incorrect for all big-endian targets.

  * The immediate-character MOVE function was using a 16-bit-only
load instruction, which was insufficient for unicode operation.

  * The -c (constant) character compare VOPs use a compare
instruction with a 16-bit immediate field.  Disabled on unicode
(there's no good way to conditionally use them when the code
point of the constant character fits a signed-byte 16).

  * Cleaned up some external-format.impure.lisp test-cases, adding
with-test and names as needed.

14 years ago1.0.38.4: Scrub control stack after scavenging on non-x86oid gencgc.
Alastair Bridgewater [Fri, 30 Apr 2010 16:53:16 +0000 (16:53 +0000)]
1.0.38.4: Scrub control stack after scavenging on non-x86oid gencgc.

  * We scavenge the control stack as if it is entirely boxed data,
rewriting pointers as necessary.

  * Stack frames tend to contain uninitialized words, which is fine so
long as they are immediate data or valid pointers (they will be
counted as live data, so the scavenge may be more conservative than
necessary, but this is not an error).

  * The area beyond the current stack top is not scavenged, as it is not
live data.

  * Cheneygc scrubs the control stack (clears the area beyond the stack
top) once it (the control stack) has been scavenged.

  * Gencgc on non-x86oids (when precise stack scavenging is done) has
not been scrubbing the control stack, leading to the possibility of
having stale pointers in the active heap area.

  * Scrubbing the control stack after scavenging it reduces if not
eliminates the random GC faults observed on PPC.

  * All of this explanation probably belongs in a document describing
the hows and whys of GC on SBCL, not merely in a commit message.

14 years ago1.0.38.3: PPC linkage-table fix.
Alastair Bridgewater [Fri, 30 Apr 2010 16:50:42 +0000 (16:50 +0000)]
1.0.38.3: PPC linkage-table fix.

  * arch_write_linkage_table_jmp() on PPC was overrunning the linkage
table entry space by one useless (duplicated) instruction, which loses
when updating the linkage-table if maphash returns entries in any order
other than by ascending linkage-table entry address.

14 years ago1.0.38.2: Gencgc error-checking fixes.
Alastair Bridgewater [Fri, 30 Apr 2010 16:48:10 +0000 (16:48 +0000)]
1.0.38.2: Gencgc error-checking fixes.

  * Use %p instead of %x in error messages to avoid truncating pointers
to 32 bits on 64 bit platforms.

  * Count pointers to thread stack spaces as being valid (presuming that
they are created by dynamic-extent allocation).

  * Count pointers to funcallable_instance_tramp as being valid (not an
issue on x86oids, but it's a boxed pointer on non-x86oid platforms).