Skip to content
  1. Sep 01, 2012
    • Raymond Toy's avatar
      Clean up RCS ids · eeab7066
      Raymond Toy authored
       * Get rid of the RCS Header stuff.  They're meaningless in git.
       * Add public domain comment to some of the files if the only comment
         was the RCS header.
      eeab7066
  2. Feb 04, 2012
  3. Jan 04, 2012
  4. Nov 04, 2011
  5. Nov 02, 2009
    • rtoy's avatar
      Revert previous changes. They were supposed to go on · d01310f2
      rtoy authored
      amd64-dd-branch.
      d01310f2
    • rtoy's avatar
      This large checkin brings the amd64 port up-to-date with the current · 2bafb654
      rtoy authored
      sources.  No real attempt has been made to make it work, but the
      cross-compile does create a kernel.core, and the C code compiles (on
      openSuSE 10.3).  The resulting kernel.core does not yet work.
      
      Use cross-x86-amd64.lisp as the cross-compile script.  This is
      intended to be cross-compiled using the 20a release for Linux, and
      only supports x87.  The sse2 support has not be ported yet.
      
      tools/cross-scripts/cross-x86-amd64.lisp:
      o Update cross-compile with some missing constants, and frob new
        symbols.
      
      tools/clean-target.sh:
      o Remove amd64f files too.
      
      code/pred.lisp:
      o Define predicates for double-doubles for bootstrapping to work
        around recursive known function problems with these predicates.
      
      code/sap.lisp:
      o Define int-sap with (unsigned-byte 64) type declaration.  (May not
        be needed?)
      
      code/unix-glibc2.lisp:
      o Build fails defining map_failed to (int-sap -1).  Just hard-wire to
        0 for now so we can build.
      
      compiler/float-tran.lisp:
      o Add missing conditional for %complex-double-double-float.
      
      compiler/amd64/float.lisp:
      o Merge double-double support for amd64.  Not really tested yet.
      
      compiler/amd64/parms.lisp:
      o Update to match x86 build.  In particular, get the space address
        correct and update the static symbols.
      
      compiler/amd64/type-vops.lisp:
      o DYLAN-FUNCTION-HEADER-TYPE no longer exists.
      
      compiler/amd64/vm.lisp:
      o Add double-double storage classes and register definitions.
      
      lisp/Config.amd64:
      o Bring in line with Config.x86 and friends.
      
      lisp/Linux-os.c:
      o Bring amd64 code up-to-date with x86/linux code.
      
      lisp/Linux-os.h
      o Need to include sys/ucontext.h to get ucontext defined.  (Why?)
      o Also define __USE_GNU so we get the register offsets in the ucontext
        defined.  (Why?)
      
      lisp/amd64-arch.c:
      o Change struct sigcontext to os_context_t.
      o Use SC_PC instead of context->sc_pc.
      o Merge some changes in from x86 version, like SC_EFLAGS.  May need
        more work.
      
      lisp/amd64-assem.s:
      o Use rbx instead of ebx for jmp.
      
      lisp/amd64-lispregs.h:
      o Define SC_REG, SC_PC, SC_SP using the new x86 style.
      
      lisp/backtrace.c:
      o Remove inline assembly for now until I figure out what the amd64
        version should be.
      
      lisp/gencgc.c:
      o Conditionalize out weak hash table support for now.
      
      lisp/gencgc.h:
      o Set PAGE_SIZE for amd64.  (Is 4096 right?)
      
      lisp/globals.h:
      o Export current_dynamic_space_free_pointer and
        current_auto_gc_trigger like for x86.
      2bafb654
  6. Jul 07, 2009
  7. Jan 20, 2009
  8. Sep 11, 2008
  9. Sep 08, 2008
    • rtoy's avatar
      Fix long-standing bug where C-c sometimes causes a segfault on · 572f5c8f
      rtoy authored
      Solaris.  The issue is that the siginfo_t is documented to be NULL
      sometimes on Solaris.  Also, it appears that at most we only care
      about the si_code field of a siginfo_t, so we only fill in the si_code
      field when the siginfo_t parameter is not NULL.  Otherwise use 0.
      (Carl suggested this solution.)
      
      Also, the Lisp signal handlers appear to ignore the siginfo_t argument
      anyway.
      572f5c8f
  10. Mar 15, 2008
    • agoncharov's avatar
      Getting rid of some compiler warnings: · 44e0351e
      agoncharov authored
        * Eliminate `printf' format string and the following arguments
          conflicts.
      
        * A variable may be used uninitialized.
      
        * A variable may be defined but not used.
      44e0351e
  11. Dec 14, 2007
  12. Dec 04, 2007
  13. Nov 16, 2007
  14. Sep 04, 2007
  15. Jul 25, 2007
    • cshapiro's avatar
      Use sa_sigaction signal handlers on Linux. The glibc definition of · 342beebb
      cshapiro authored
      sigset_t is different from the one used in the Linux kernel.  This means
      that we cannot make assignments of sigset_t objects without corrupting
      memory.  To work around this problem we update uc_sigmask differently
      on Linux than on other systems.  Also, remove x87 control word updates
      since the x87 is setup correctly inside call_into_lisp.
      342beebb
  16. Jul 15, 2007
  17. Jul 06, 2007
  18. Jan 01, 2007
  19. Nov 08, 2006
  20. Nov 07, 2006
  21. Sep 15, 2005
  22. Oct 15, 2004
    • cwang's avatar
      typo · d89e9cd4
      cwang authored
      d89e9cd4
  23. Aug 02, 2004
  24. Jul 13, 2004
    • pmai's avatar
      First merge of the C side of the OS X/Darwin port. Besides adding Darwin · eb44537a
      pmai authored
      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.
      eb44537a
  25. Jul 08, 2004
    • rtoy's avatar
      Fix more compiler warnings: · fcb4d9e1
      rtoy authored
      * interrupt.c: oldcont isn't used.
      
      * interrupt.c, monitor.c, validate.c:  Initialize some variables that
        the compiler thinks might be used without initialization.
      fcb4d9e1
  26. Jul 07, 2004
  27. Jun 18, 2004
  28. May 20, 2004
  29. May 19, 2004
  30. May 04, 2004
  31. Nov 01, 2003
  32. Oct 24, 2003
    • toy's avatar
      Add support for x86 heap-overflow checking. · 10d10ac0
      toy authored
      	* x86-assem.S (multiple_value_return): Add new functions to handle
      	heap overflow warnings and errors.
      
      	* x86-arch.c (sigtrap_handler): Add cases for the two new heap
      	overflow traps.
      
      	* interrupt.c (interrupt_handle_space_overflow): Add support for
      	x86.
      
      	* parms.lisp (static-symbols): Add new static symbols for heap
      	overflow checking.  Add new trap types for heap overflow
      	checking.
      10d10ac0
    • toy's avatar
      Add support for catching heap overflows, similar to the control stack · 3e309c44
      toy authored
      overflow checking.  Enable with :heap-overflow-check.  We reserve some
      number of pages on the heap.  When the heap reaches the reserved
      pages, an overflow warning is signalled.  The reserved pages are set
      0.  This allows some additional allocation to happen during debugging,
      if necessary.  If another overflow happens, we throw to top-level.
      
      Sparc only right now.
      
      	* lisp/sparc-assem.S (_do_dynamic_space_overflow_error): New
      	function to handle a heap overflow error.
      	(_do_dynamic_space_overflow_warning): New function to handle heap
      	overflow warning.
      
      	* lisp/sparc-arch.c (sigill_handler): Handle the two new traps
      	caused by heap overflows.
      
      	* lisp/interrupt.c (interrupt_handle_space_overflow): New function
      	to handle interrupt caused by heap space overflows.
      
      	* lisp/gencgc.c (handle_heap_overflow): New function to handle
      	heap overflows.
      	(gc_alloc_new_region): Use handle_heap_overflow.
      	(gc_alloc_large): Use handle_heap_overflow
      
      	* compiler/sparc/parms.lisp (static-symbols): Add new static
      	symbols for heap overflow checking:
      	dynamic-space-overflow-error-hit and
      	dynamic-space-overflow-warning-hit.
      
      	* compiler/generic/new-genesis.lisp (finish-symbols): Initialize
      	the new dynamic-space-overflow-error-hit and
      	dynamic-space-overflow-warning-hit static symbols.
      
      	* code/lispinit.lisp (:heap-overflow-check): Add
      	heap-overflow-check to *runtime-features*, if necessary.
      	("reserved_heap_pages"): Access to alien variable for heap
      	overflow.
      	(*reserved-heap-pages*): Default number of heap pages to reserve
      	for heap overflow.
      	(%top-level): Set reserved-heap-pages to the default.
      
      	* code/interr.lisp (dynamic-space-overflow-warning-hit): Add
      	function to handle heap overflow warnings.
      	(dynamic-space-overflow-error-hit): Add function to handle heap
      	overflow error.
      
      	* code/error.lisp (heap-overflow): Add new condition type for heap
      	overflow
      3e309c44
  33. Jul 19, 2003
    • emarsden's avatar
      · 34b793ce
      emarsden authored
        - fix a signed/unsigned cast bug that was prevented the
          auto-gc-trigger from functioning correctly when using certain
          dynamic-space sizes (for platforms that don't have an internal gc
          trigger).
      
        - added a few #include files to avoid compiler warnings
      
        - changed some #ifdef semantics: DEBUG activates additional
          assertions, and PRINTNOISE activates debugging statements.
      34b793ce
  34. May 30, 2003
    • toy's avatar
      o Oops. It's i386, not x86. · f101ba1a
      toy authored
      o Remove the code in fake_foreign_function_call that was moved to
        build_fake_control_stack_frame
      f101ba1a
  35. May 29, 2003
    • toy's avatar
      Add control-stack checking for Sparc. Based on work from SBCL. · 72f0aa1e
      toy authored
      	* lisp/sunos-os.h (PROTECTION_VIOLATION_SIGNAL): Define it for
      	stack-checking.
      
      	* lisp/solaris-os.c (segv_handler): Add stack-checking support for
      	Solaris.
      
      	* lisp/os.h (os_control_stack_overflow): Give a type name to the
      	zone enums (mostly for the debugger).
      
      	* lisp/os-common.c (guard_zones): Add stack-checking support for
      	Solaris.
      	(os_control_stack_overflow): Add stack-checking support for
      	Solaris.
      
      	* lisp/interrupt.c (build_fake_control_stack_frame): New function
      	for building a stack frame without the foreign call stuff.  Used
      	for stack checking.
      	(interrupt_install_low_level_handler): Only need to install
      	alternate signal stack for x86.
      
      	* lispinit.lisp:
      	(scrub-control-stack): Rename to %scrub-control-stack to match x86
      	version so control stack guard is done.
      
      	* parms.lisp (static-symbols): Added new static symbols for
      	control stack checking.
      72f0aa1e
  36. Mar 23, 2003
    • gerd's avatar
      Optional control stack checking. This is controlled by the · 670d643f
      gerd authored
      	feature :stack-checking because it's not implemented for other
      	systems/architectures yet.  It is currently known to work on
      	FreeBSD 4.8-RC/x86 and Debian 2.2.20/x86.
      
      	* bootfiles/18e/boot3.lisp: New boot file, well, only a
      	description of the boot procedure since no boot file is needed.
      
      	* lisp/x86-validate.h (SIGNAL_STACK_START, SIGNAL_STACK_SIZE)
      	[__FreeBSD__, __linux__]: New defines.
      	(CONTROL_STACK_SIZE) {__FreeBSD__, __linux__]:
      	Adjust for signal stack.
      
      	* lisp/validate.c (validate) [RED_ZONE_HIT]: Call
      	os_guard_control_stack.  Some cleanup.
      
      	* lisp/os.h (BOTH_ZONES, YELLOW_ZONE, RED_ZONE): New enums.
      	Add function prototypes.
      
      	* lisp/interrupt.c (interrupt_install_low_level_handler)
      	[RED_ZONE_HIT]: Deliver protection violations on a dedicated
      	signal stack.
      
      	* lisp/os-common.c (os_stack_grows_down_1, os_stack_grows_down):
      	New functions.
      	(guard_zones, control_stack_zone, os_guard_control_stack)
      	(os_control_stack_overflow) [RED_ZONE_HIT]: New functions.
      	(os_control_stack_overflow) [!RED_ZONE_HIT]: Dummy function.
      
      	* lisp/Linux-os.c (sigsegv_handler) [RED_ZONE_HIT]: Handle control
      	stack overflows.
      
      	* lisp/FreeBSD-os.c: General cleansing.
      	(sigbus_handler) [RED_ZONE_HIT]: Handle control stack overflows.
      
      	* lisp/FreeBSD-os.h (PROTECTION_VIOLATION_SIGNAL): New define.
      
      	* lisp/Linux-os.h (PROTECTION_VIOLATION_SIGNAL): New define.
      
      	* compiler/x86/system.lisp (lisp::%scrub-control-stack): Change
      	defknown from sys:scrub-control-stack.
      	(%scrub-control-stack): Rename VOP.
      
      	* code/lispinit.lisp (os-guard-control-stack) [#+stack-checking]:
      	Define alien os_guard_control_stack.
      	(%scrub-control-stack) [#+x86]: New function.
      	(scrub-control-stack) [#+x86]: Call %scrub-control-stack,
      	call os-guard-control-stack if #+stack-checking.
      
      	* code/interr.lisp (yellow-zone-hit,
      	red-zone-hit) [#+stack-checking]: New functions.
      
      	* code/error.lisp (stack-overflow) [#+stack-checking]: New
      	condition.
      
      	* compiler/generic/new-genesis.lisp (finish-symbols)
      	[#+stack-checking]: Add symbols for control stack checking.
      
      	* compiler/x86/parms.lisp (static-symbols): Likewise.
      670d643f
  37. Dec 06, 2001
    • pmai's avatar
      Added specialised port to OpenBSD (2.9). Many parts of the original · 195461c1
      pmai authored
      code which were previously conditionalized on :FreeBSD, are now
      conditionalized on :BSD instead, with the :BSD feature now implying a
      4.4BSD(lite2) derived OS.  This should make future BSD-ports easier.
      FreeBSD and OpenBSD are differentiated by having either :FreeBSD or
      :OpenBSD on the features list.
      
      Currently the OpenBSD port does not have working ELF support, because
      OpenBSD 2.9 is still non-ELF by default.  So don't put ELF on the
      features list when building for OpenBSD, or fix the code to work
      correctly in this case instead.
      195461c1