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 17, 2012
  3. Jan 04, 2012
  4. Dec 23, 2011
    • Raymond Toy's avatar
      Fix more compiler warnings. · 771b7ee4
      Raymond Toy authored
      Linux-os.c:
      o Fix warning about pointer to int warning.
      
      lisp.c:
      o Linux needs time.h to define tzset.
      o Fix warning about unused result from getwcd.  If getcwd fails, we
        now just exit with a message because we can't find anything.
      771b7ee4
  5. Nov 04, 2011
  6. Sep 24, 2011
    • Raymond Toy's avatar
      Fix Trac ticket:46. · 44a8f0c7
      Raymond Toy authored
      Make the size of all spaces configurable from the command line.
      
      code/commandline.lisp:
      o Define the switches so lisp doesn't complain.
      
      general-info/lisp.1:
      o Document new switches.
      
      general-info/release-20c.txt:
      o Update
      
      lisp/Darwin-os.c
      lisp/FreeBSD-os.c
      lisp/Linux-os.c
      lisp/NetBSD-os.c
      lisp/backtrace.c
      lisp/cgc.c
      lisp/gencgc.c
      lisp/os-common.c
      lisp/ppc-validate.h
      lisp/purify.c
      lisp/solaris-os.c
      lisp/sparc-arch.c
      lisp/sparc-validate.h
      lisp/x86-validate.h:
      lisp/validate.c
      o Basically rename CONTROL_STACK_SIZE, BINDING_STACK_SIZE,
        READ_ONLY_SPACE_SIZE, and STATIC_SPACE_SIZE to control_stack_size,
        binding_stack_size, read_only_space_size, and static_space_size,
        respectively.
      
      lisp/coreparse.c
      o Check the space size in the core file against the allocated size.
        If the allocated space is too small, print an error message and
        exit.
      
      lisp/globals.c
      o Define new variables for the allocated size of spaces.
      
      lisp/globals.h
      o Declare the new variables for the size of the spaces.
      
      lisp/lisp.c
      o Set the default values of the spaces.
      o Parse the new command-line flags and set the space sizes.
      
      lisp/sunos-os.c:
      o Added os_init0 (that we forgot last time).
      
      lisp/x86-assem.S:
      o Change $CONTROL_STACK_END to GNAME(control_stack_end) to get the
        correct end of the stack.
      44a8f0c7
  7. Sep 01, 2011
    • rtoy's avatar
      Add os_init0 to allow for some really early OS inits. · dafb9e03
      rtoy authored
      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.
      dafb9e03
  8. Dec 26, 2010
  9. Jun 22, 2010
    • rtoy's avatar
      Make previous changes build for x87. · 139c4f23
      rtoy authored
      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.
      139c4f23
    • rtoy's avatar
      Revert the previous change to fix debug:arg/trace issue. Instead, use · 1fea054f
      rtoy authored
      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.
      1fea054f
  10. Feb 01, 2010
    • rtoy's avatar
      Linux-os.c: · 0f0aed07
      rtoy authored
      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 *.
      0f0aed07
    • rtoy's avatar
      Patch from Stelian Ionescu on cmucl-imp, 2010/02/01: · 911be032
      rtoy authored
          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.
      911be032
  11. 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
  12. Oct 15, 2009
  13. Jan 06, 2009
    • agoncharov's avatar
      · c2323072
      agoncharov authored
      * code/exports.lisp -- Added a missing quote characher.
      * lisp/FreeBSD-os.c -- Fixed the switch to the SSE2 mode, in line with other OSes.
      * lisp/Linux-os.c -- Fixed a comment (sse != sse2)
      c2323072
  14. Jan 05, 2009
    • rtoy's avatar
      Fix for handling arithmetic errors with x87. · 9edd3c4b
      rtoy authored
      Use bootstrap-2009-01-1.lisp to bootstrap this change.
      
      code/float-trap.lisp:
      o FLOATING-POINT-MODES for :X87 needs to massage the results into the
        expected format (SSE2 MXCSR order).
      o Update for changed VOP names too.
      
      compiler/x86/float.lisp:
      o Rename the floating-point-modes and set-floating-point-modes VOPS to
        x87-floating-point-modes and set-x87-floating-point-modes.  Change
        the translations accordingly too.
      
      compiler/x86/parms.lisp:
      o The float property bytes have been updated to match the SSE2 MXCSR
        register for both SSE2 and X87 builds because the code assumes SSE2
        format.
      
      lisp/Linux-os.c:
      o Don't OR in the SSE2 modes if we're not running an SSE2 build.
        Doing this can erroneously mask out exceptions because the Lisp code
        didn't set up the sse2 modes.  (This happens if you select the x87
        core on a chip that supports sse2.)
      
      lisp/globals.h:
      o Declare fpu_mode.
      
      lisp/lisp.c:
      o Set fpu_mode to be the mode determined from the core file.  Needed
        in Linux-os.c to process the SSE2 modes correctly with an x87 core
        on a sse2-capable chip.
      9edd3c4b
  15. Dec 10, 2008
  16. Dec 07, 2008
  17. Nov 12, 2008
  18. Sep 16, 2008
  19. Jan 03, 2008
    • cshapiro's avatar
      Switch the FreeBSD port to use the common floating point trap handling · 9495c516
      cshapiro authored
      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.
      9495c516
  20. Dec 17, 2007
  21. Dec 14, 2007
  22. Jul 31, 2007
  23. Jul 30, 2007
  24. 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
  25. Jul 15, 2007
  26. Jul 13, 2007
  27. Nov 07, 2006
  28. Mar 17, 2006
    • rtoy's avatar
      lisp/Linux-os.c: · 7575e738
      rtoy authored
      o Add function get_h_errno to extract h_errno.
      
      code/internet.lisp:
      o On Linux, call the get_h_errno function to get h_errno instead of
        calling __h_errno_location ourselves since that's not part of the
        public API.
      7575e738
  29. Sep 15, 2005
  30. Apr 24, 2005
  31. Dec 24, 2004
    • rtoy's avatar
      From Helmut Eller, cmucl-imp, 2004-10-05: · 627128ba
      rtoy authored
          on Linux/x86, the Lisp signal handler for SIGSEGV overwrites the
          beginning of the control stack.
      
          For SIGSEGV we use an extra signal stack and when the signal isn't
          handled by the GC or by the stack overflow handler we call eventually
          call_into_lisp.  call_into_lisp tests whether the current stack
          pointer points to the normal control stack.  But the test fails
          because we use the extra signal stack, so call_into_lisp just sets the
          stack pointer to the beginning of the normal control stack. This is
          not much fun for debugging because the backtrace is truncated and it's
          also no longer possible to throw to the top-level-catcher because its
          frame was overwritten.
      
          I tried to fix that with the patch below.  The idea is to switch back
          to the normal stack before calling the Lisp handler.  The patch may
          not be very elegant but it is at least short  :) .
      627128ba
  32. Oct 19, 2004
  33. Sep 11, 2004
    • rtoy's avatar
      Port of SBCL's float-accuracy compilation policy. Intended to make · 571091c7
      rtoy authored
      double-float-epsilon actually be epsilon on x86.  No effect on other
      ports.
      
      The default precision is now 53-bit (double-float) instead of 64-bit
      (80-bit floats).  However, to preserve C expectations, all calls to C
      have the precision set to 64-bit.  This slows down calls to C, but we
      try to make syscalls and such fast by not changing precision for the
      call.
      
      By default ext:float-accuracy is 3.
      
      Use boot7.lisp to bootstrap.
      571091c7
  34. Jul 08, 2004
  35. Jun 07, 2004