Skip to content
Snippets Groups Projects
  1. Feb 05, 2010
    • rtoy's avatar
      Implement a fast fround for single and double floats. This is enabled · d611150a
      rtoy authored
      everywhere except for x87 builds since there is a possible roundoff
      issue due to the 80-bit registers for x87.
      
      This is some 2-3 times faster than the existing fround function.
      
      code/float.lisp:
      o Implementations of %unary-fround/single-float,
        %unary-fround/double-float, and %unary-fround.  Declare the first
        two as inline too.
      
      compiler/float-tran.lisp:
      o Tell compiler about %unary-fround.
      o Transform fround to a call to %unary-fround.
      o Transform %unary-fround to special versions for single and double
        float arguments.
      d611150a
  2. Jan 31, 2010
  3. Jan 22, 2010
    • rtoy's avatar
      Fix handling of debug sources. When trying to read the source form · df5b19cf
      rtoy authored
      from the source file, the file is opened using the default external
      format.  This is not right if the file was compiled using a different
      external format, and we try to read it using the default format.
      
      compiler/debug-dump.lisp:
      o Set the INFO slot to the external format used to source files.
      
      code/debug-info.lisp:
      o Add comment that the INFO slot contains the external format for
        :FILES.  (It was previously unused.)
      
      code/debug.lisp:
      o Open the source file with the same format as used to compile the
        file.
      df5b19cf
    • rtoy's avatar
      If a trace-file or error-file is specified, open the file with the · 1a712ca4
      rtoy authored
      same external format used for reading the file.  This ensures that
      these files will make sense if the source file makes sense for the
      given external format.
      1a712ca4
  4. Nov 30, 2009
    • rtoy's avatar
      Add support for static arrays that are not moved by GC. This is based · 7badf899
      rtoy authored
      on an idea from Carl and Lynn Quam's foreign vector code that he sent
      many years ago.  The static arrays will be GCed if nothing references
      them.
      
      The static arrays are currently limited to strings, 8, 16, and 32-bit
      integers (signed and unsigned), single and double floats, and complex
      single and double floats.  Static arrays are not adjustable because
      adjusting an array can change the address if the array grows.  (Ok
      if the array shrinks, but not implemented.)
      
      To indicate a static array, the data portion of the vector header word
      is set to 1.  It is normally 0 for all other Lisp vectors.
      
      code/array.lisp:
      o Add :ALLOCATION keyword arg to MAKE-ARRAY to allow allocation of
        static vectors.  Do the appropriate thing for static arrays.
      o Add MAKE-STATIC-VECTOR.  This is Lynn's foreign vector stuff
        rewritten in Lisp instead of the original mix of Lisp and C.
      o Add STATIC-ARRAY-P to tell if an array is static or not.
      o Signal errors in MAKE-ARRAY and ADJUST-ARRAY for invalid options
        with static arrays.
      
      code/describe.lisp:
      o Indicate if the array is static.
      
      compiler/fndb.lisp:
      o Tell compiler about new keyword argument, :allocation, for
        MAKE-ARRAY.
      7badf899
  5. Nov 25, 2009
  6. Nov 04, 2009
  7. 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
  8. Oct 28, 2009
    • rtoy's avatar
      Revert previous change. Instead, make the arithmetic vops for mixing · 69e201b4
      rtoy authored
      complex and floats ensure that the float is converted to a complex
      with the correct imaginary part.  The failed tests from Maxima
      (rtest_gamma) now pass.  (Almost.  The required tolerance is a little
      too tight for sse2, mostly due to a slightly inaccurate exp function.
      But that's libc's fault, not CMUCL's fault.)
      69e201b4
    • rtoy's avatar
      o Fix critical issue where the conversion of integers to floats left · 4e386db8
      rtoy authored
        junk in the high part of the xmm register.  This causes some tests
        in maxima to fail.
      o Same fix for adding/subtracting a complex and a float.
      
      The vops need to be examined carefully to make sure we keep the
      invariant that the high part is zero for double-float values in XMM
      registers.
      4e386db8
  9. Oct 10, 2009
  10. Sep 28, 2009
  11. Sep 15, 2009
    • rtoy's avatar
      Add support for the Unicode word break algorithm for · fc0eb65b
      rtoy authored
      STRING-CAPITALIZE.  Not sure about the appropriate interface, though.
      
      code/string.lisp:
      o Add Unicode word break algorithm.  Based on Scheme code by William
        Clinger.  Used with permission.
      o Update STRING-CAPITALIZE to take another keyword arg to indicate if
        we should use the Unicode word break algorithm.  Default is not to
        use the Unicode algorithm.
      
      compiler/fndb.lisp:
      o Update defknown for string-capitalize.
      
      i18n/tests/WordBreakTest.txt:
      o New test file for the word break algorithm
      
      i18n/tests/word-break-test.lisp:
      o New file to run the word break test.
      fc0eb65b
  12. Sep 09, 2009
  13. Aug 11, 2009
    • rtoy's avatar
      Some symbol cleanups. · 36b8abb9
      rtoy authored
      code/exports.lisp:
      o Import STREAM:SET-SYSTEM-EXTERNAL-FORMAT into the EXT package.
      o Define and export %sin-quick, %cos-quick, and %tan-quick only for
        x87 builds.
      
      compiler/float-tran.lisp:
      o Only apply defknowns and deftransforms for %sin-quick, %cos-quick,
        and %tan-quick for x87 builds.
      36b8abb9
  14. Aug 10, 2009
    • rtoy's avatar
      Fixes from Paul Foley: · 94ed0111
      rtoy authored
      o Standard streams no longer change formats when
        *default-external-format* changes.  Use
        stream:set-system-external-format instead, or (setf
        external-format).
      o char-to-octets properly handles surrogate characters being written.
      o Makes simple-streams work again.
      
      This change needs to be cross-compiled.  2009-07 binaries work for
      cross-compiling using the 19e/boot-2008-05-cross-unicode-*.lisp
      cross-compile script.
      94ed0111
  15. Jul 02, 2009
    • rtoy's avatar
      boot-2009-07.lisp: · 67fc4ac5
      rtoy authored
      o Bootstrap file needed to compile this change (because the current
        shrink-vector derive-type optimizer didn't handle union types).
      
      compiler/fndb.lisp:
      o Make the compiler warn if the result of lisp::shrink-vector is not
        used.  This is a problem because the compiler doesn't know that
        shrink-vector destructively modifies the length of a vector.  As a
        partial solution, warn the user if the result of shrink-vector is
        not.
      
      code/hash-new.lisp:
      code/seq.lisp:
      o Make sure the result of shrink-vector is used, to get rid of a new
        compiler warning.
      
      code/unidata.lisp:
      o Modify %unicode-full-case so that it doesn't use shrink-vector
        anymore.
      
      compiler/seqtran.lisp:
      o Fix shrink-vector derive-type optimizer to handle union types.
      
      tools/build-unidata.lisp:
      o Fix typo that someone got in.
      o Make sure the result of shrink-vector is used, to get rid of a new
        compiler warning.
      67fc4ac5
  16. Jun 16, 2009
    • rtoy's avatar
      compiler/x86/float-sse2.lisp: · e220506c
      rtoy authored
      o Add vop for conjugate of complex single and double floats.
      
      compiler/float-tran.lisp:
      o Disable deftransform for conjugate.  All platforms with complex fp
        vops support conjugate.
      e220506c
  17. Jun 15, 2009
    • rtoy's avatar
      compiler/float-tran.lisp: · 5a98a234
      rtoy authored
      o Sparc has a vop for complex conjugate, so we can disable the
        deftransform.
      o Both sparc and x86 have a vop to do float - complex, so disable that
        transform too.
      
      compiler/sparc/float.lisp:
      o Fix the float-complex vop to do the right thing wrt contagion.
      o Remove some old commented out vop for complex*complex and
        complex/complex.
      5a98a234
    • rtoy's avatar
      o Fix deftransforms to do contagion correctly: · 2b772630
      rtoy authored
        - complex + real
        - complex - real
        - real + complex
      o Clean up comments and fix erroneous ones.
      2b772630
    • rtoy's avatar
      Fix issue with complex contagion on sparc. The vops for complex+real · f1399c10
      rtoy authored
      and complex-real didn't compute the imaginary part correctly; we need
      to add (or subtract) 0 to get the correct signed zero.
      
      (+ #c(1d0 -0d0) 1d0) -> #c(2d0 0d0), not #c(2d0 -0d0)
      
      code/sparc-svr4-vm.lisp:
      o Define *FP-CONSTANT-0F0* and *FP-CONSTANT-0D0*, floating point
        zeroes.
      
      compiler/generic/new-genesis.lisp:
      o Initialize *FP-CONSTANT-0F0* and *FP-CONSTANT-0D0* during genesis.
      
      compiler/sparc/parms.lisp:
      o Add *FP-CONSTANT-0F0* and *FP-CONSTANT-0D0* to the static symbols so
        vops can access them easily.  For bootstrapping purposes, we steal
        the spare-9 and sparc-8 symbols.
      
      compiler/sparc/float.lisp:
      o Update vops for complex + float and complex - float.  Need to add
        (or subtract) 0 to the imaginary part to get the correct signed
        zero.
      o Update vop for float+complex as above.
      f1399c10
    • rtoy's avatar
      code/numbers.lisp: · 3934a9cb
      rtoy authored
      o Do appropriate contagion when computing a complex + real or complex
        - real.  (+ #c(1d0 -0d0)  1d0) should be #c(2d0 0d0), not #c(2d0
          -0d0).
      
      compiler/x86/float-sse2.lisp:
      o Update vops for computing complex +/- float and float + complex to
        do appropriate contagion so that the imaginary part has the correct
        sign (as above for numbers.lisp).
      3934a9cb
  18. Jun 14, 2009
  19. Jun 13, 2009
  20. Jun 12, 2009
  21. Jun 11, 2009
  22. Mar 18, 2009
    • rtoy's avatar
      code/irrat-dd.lisp: · 8bd5d96d
      rtoy authored
      o Declare POLY-EVAL and POLY-EVAL-1 as maybe-inline functions so they
        can be semi-inlined.
      
      code/irrat.lisp:
      o I don't think there's any real reason to make the local function
        REAL-EXPT inline.  It's very big and local function call is already
        good enough.
      
      compiler/float-tran.lisp:
      o Change some functions to be maybe-inline instead of inline to save
        on space for the the larger double-double functions:  SUB-DD,
        SUB-D-DD, SUB-DD-D, SPLIT.  Semi-inline should be good enough for
        these large functions, saving on cache memory, local function
        calling sequence should be good enough.
      8bd5d96d
  23. Mar 11, 2009
  24. Jan 09, 2009
  25. 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
  26. Dec 30, 2008
  27. Dec 22, 2008
  28. Dec 05, 2008
    • rtoy's avatar
      Fix Trac #25. · 2011760d
      rtoy authored
      Don't set continuation-dest to continuation-next in FLUSH-DEAD-CODE
      when safety is 3.  Just don't do anything.  The generated code remains but
      doesn't deliver the result anywhere, but that's ok in SAFE mode.
      2011760d
  29. Nov 26, 2008
    • rtoy's avatar
      compiler/srctran.lisp: · 967464f7
      rtoy authored
      o Remove the %ldb change in rev 1.164 to workaround in ticket #20.
      o Delay the logand optimizer so that it runs later.  This allows type
        propagation a chance to converge before we run the logand
        optimizer.  This fixes ticket #20 and #21.  This may increase
        compilation time since the IR1 optimizations will run more often due
        to logand changes.
      
      general-info/release-19f.txt:
      o Update for modular arith fixes
      o Update ticket #15 since we have SSE2 now.
      967464f7
  30. Nov 24, 2008
  31. Nov 16, 2008
  32. Nov 14, 2008
    • rtoy's avatar
      float-tran.lisp: · 7264ddad
      rtoy authored
      o Remove the deftransform for real + complex and real * complex.
      o Always enable the transform for real - complex.
      
      x86/float-sse2.lisp:
      o Add vop to do real + complex
      o Add vop to do real * complex
      7264ddad
Loading