Changeset 9233


Ignore:
Timestamp:
Apr 22, 2008, 2:50:39 AM (12 years ago)
Author:
rme
Message:

unbox-u32: test for two digit and one digit bignums (not three and two like
on x8664).

character->fixnum: have to mask off the subtag part before shifting

require-fixnum: fix typo so it works

require-character: need tag vinsn temporary (could get cuter by using
byte flavor of object register when it's available)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ia32/compiler/X86/X8632/x8632-vinsns.lisp

    r9191 r9233  
    870870  (jne :bad)
    871871  (movl (:@ x8632::misc-header-offset (:%l src)) (:%l dest))
    872   (cmpl (:$l x8632::three-digit-bignum-header) (:%l dest))
    873   (je :three)
    874872  (cmpl (:$l x8632::two-digit-bignum-header) (:%l dest))
     873  (je :two)
     874  (cmpl (:$l x8632::one-digit-bignum-header) (:%l dest))
    875875  (jne :bad)
    876876  (movl (:@ x8632::misc-data-offset (:%l src)) (:%l dest))
     
    879879  :bad
    880880  (uuo-error-reg-not-type (:%l src) (:$ub arch::error-object-not-unsigned-byte-32))
    881   :three
     881  :two
    882882  (movl (:@ (+ 4 x8632::misc-data-offset) (:%l src)) (:%l dest))
    883883  (testl (:%l dest) (:%l dest))
     884  (jne :bad)
    884885  (movl (:@ x8632::misc-data-offset (:%l src)) (:%l dest))
    885   (jne :bad)
    886886  :done)
    887887
     
    982982                (:apply %hard-regspec-value src)))
    983983   (movl (:%l src) (:%l dest)))
     984
     985  ((:pred <= (:apply %hard-regspec-value dest) x8632::ebx)
     986   (xorb (:%b dest) (:%b dest)))
     987  ((:pred > (:apply %hard-regspec-value dest) x8632::ebx)
     988   (andl (:$l -256) (:%l dest)))
    984989  (shrl (:$ub (- x8632::charcode-shift x8632::fixnumshift)) (:%l dest)))
    985990
     
    21772182  ((:and (:pred > (:apply %hard-regspec-value object) x8632::eax)
    21782183         (:pred <= (:apply %hard-regspec-value object) x8632::ebx))
    2179    (testb (:%b x8632::fixnummask) (:%b object)))
     2184   (testb (:$b x8632::fixnummask) (:%b object)))
    21802185  ((:pred > (:apply %hard-regspec-value object) x8632::ebx)
    21812186   (testl (:$l x8632::fixnummask) (:%l object)))
     
    23282333
    23292334(define-x8632-vinsn require-character (()
    2330                                        ((object :lisp)))
     2335                                       ((object :lisp))
     2336                                       ((tag :u8)))
    23312337  :again
    2332   (cmpl (:$l x8632::subtag-character) (:%l object))
     2338  (movl (:%l object) (:%l tag))
     2339  (cmpb (:$b x8632::subtag-character) (:%b object))
    23332340  (je.pt :ok)
    23342341  (uuo-error-reg-not-type (:%l object) (:$ub arch::error-object-not-character))
Note: See TracChangeset for help on using the changeset viewer.