Changeset 5177


Ignore:
Timestamp:
Sep 8, 2006, 5:52:38 PM (18 years ago)
Author:
Gary Byers
Message:

FIXNUM->CHAR returns NIL for values in the surrogate-pairs range.
(There are other things that it could plausibly return NIL for.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ccl/compiler/X86/X8664/x8664-vinsns.lisp

    r5150 r5177  
    30913091(define-x8664-vinsn fixnum->char (((dest :lisp))
    30923092                                  ((src :imm))
    3093                                   ())
    3094   (movq (:%q src) (:%q dest))
    3095   (shlq (:$ub (- x8664::charcode-shift x8664::fixnumshift)) (:%q dest))
    3096   (movb (:$b x8664::subtag-character) (:%b dest)))
     3093                                  ((temp :u32)))
     3094  (movl (:%l src) (:%l temp))
     3095  (sarl (:$ub (+ x8664::fixnumshift 11)) (:%l temp))
     3096  (cmpl (:$b (ash #xd800 -11))(:%l temp))
     3097  (movl (:$l x8664::nil-value) (:%l temp))
     3098  (cmovel (:%l temp) (:%l dest))
     3099  (je :done)
     3100  ((:not (:pred =
     3101                (:apply %hard-regspec-value dest)
     3102                (:apply %hard-regspec-value src)))
     3103   (movl (:%l src) (:%l dest)))
     3104  (shll (:$ub (- x8664::charcode-shift x8664::fixnumshift)) (:%l dest))
     3105  (addb (:$b x8664::subtag-character) (:%b dest))
     3106  :done)
    30973107
    30983108
Note: See TracChangeset for help on using the changeset viewer.