Changeset 10859


Ignore:
Timestamp:
Sep 24, 2008, 7:18:30 AM (11 years ago)
Author:
gb
Message:

UNBOX-S32: check for 1-digit bignum, not 2.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/compiler/X86/X8632/x8632-vinsns.lisp

    r10754 r10859  
    980980  (:anchored-uuo (uuo-error-reg-not-type (:%l src) (:$ub arch::error-object-not-unsigned-byte-32))))
    981981
    982 ;;; xxx -- review this again later
     982;;; an object is of type (SIGNED-BYTE 32) iff
     983;;; a) it's a fixnum
     984;;; b) it's a bignum with exactly one digit.
    983985(define-x8632-vinsn unbox-s32 (((dest :s32))
    984986                               ((src :lisp)))
     
    989991  (testl (:$l x8632::fixnummask) (:%l src))
    990992  (je :done)
    991   ;; May be a 2-digit bignum
     993  ;; May be a 1-digit bignum
    992994  (movl (:%l src) (:%l dest))
    993995  (andl (:$b x8632::tagmask) (:%l dest))
    994996  (cmpl (:$b x8632::tag-misc) (:%l dest))
    995997  (jne :bad)
    996   (cmpl (:$l x8632::two-digit-bignum-header) (:@ x8632::misc-header-offset (:%l src)))
     998  (cmpl (:$l x8632::one-digit-bignum-header) (:@ x8632::misc-header-offset (:%l src)))
    997999  (movl (:@ x8632::misc-data-offset (:%l src)) (:%l dest))
    9981000  (jne :bad)
Note: See TracChangeset for help on using the changeset viewer.