Changeset 5224


Ignore:
Timestamp:
Sep 20, 2006, 3:14:40 AM (18 years ago)
Author:
Gary Byers
Message:

vinsns for signed/unsigned byte 8,16,32,64. Tighten up some signed-byte boxing.

File:
1 edited

Legend:

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

    r5213 r5224  
    25592559  (movq (:%q object) (:%q tag))
    25602560  (shlq (:$ub (- x8664::nbits-in-word (+ 8 x8664::fixnumshift))) (:%q tag))
    2561   (sarq (:$ub (- x8664::nbits-in-word (+ 8 x8664::fixnumshift))) (:%q tag))
     2561  (sarq (:$ub (- x8664::nbits-in-word 8)) (:%q tag))
     2562  (shlq (:$ub x8664::fixnumshift) (:%q tag))
    25622563  (cmpq (:%q object) (:%q tag))
    2563   (jne.pn :bad)
    2564   (testb (:$b x8664::fixnummask) (:%b object))
    2565   (je.pt :bad)
     2564  (je.pt :ok)
    25662565  :bad
    25672566  (uuo-error-reg-not-type (:%q object) (:$ub arch::error-object-not-signed-byte-8))
     
    25732572                                ((tag :u32)))
    25742573  :again
    2575   (movl (:$l (lognot (ash #xff x8664::fixnumshift))) (:%l tag))
     2574  (movq (:$l (lognot (ash #xff x8664::fixnumshift))) (:%q tag))
    25762575  (andq (:% object) (:% tag))
    25772576  (je.pt :ok)
     
    25862585  (movq (:%q object) (:%q tag))
    25872586  (shlq (:$ub (- x8664::nbits-in-word (+ 16 x8664::fixnumshift))) (:%q tag))
    2588   (sarq (:$ub (- x8664::nbits-in-word (+ 16 x8664::fixnumshift))) (:%q tag))
     2587  (sarq (:$ub (- x8664::nbits-in-word 16)) (:%q tag))
     2588  (shlq (:$ub x8664::fixnumshift) (:%q tag))
    25892589  (cmpq (:%q object) (:%q tag))
    2590   (jne.pn :bad)
    2591   (testb (:$b x8664::fixnummask) (:%b object))
    2592   (je.pt :bad)
     2590  (je.pt :ok)
    25932591  :bad
    25942592  (uuo-error-reg-not-type (:%q object) (:$ub arch::error-object-not-signed-byte-16))
     
    26002598                                ((tag :u32)))
    26012599  :again
    2602   (movl (:$l (lognot (ash #xffff x8664::fixnumshift))) (:%l tag))
     2600  (movq (:$l (lognot (ash #xffff x8664::fixnumshift))) (:%q tag))
    26032601  (andq (:% object) (:% tag))
    26042602  (je.pt :ok)
     
    26132611  (movq (:%q object) (:%q tag))
    26142612  (shlq (:$ub (- x8664::nbits-in-word (+ 32 x8664::fixnumshift))) (:%q tag))
    2615   (sarq (:$ub (- x8664::nbits-in-word (+ 32 x8664::fixnumshift))) (:%q tag))
     2613  (sarq (:$ub (- x8664::nbits-in-word 32)) (:%q tag))
     2614  (shlq (:$ub x8664::fixnumshift) (:%q tag))
    26162615  (cmpq (:%q object) (:%q tag))
    26172616  (jne.pn :bad)
     
    26512650  :ok)
    26522651
    2653 (define-x8664-vinsn require-s64 (()
     2652(define-x8664-vinsn require-u64 (()
    26542653                                ((object :lisp))
    26552654                                ((tag :s64)))
     
    26642663  (je :two)
    26652664  (cmpq (:$l x8664::three-digit-bignum-header) (:@ x8664::misc-header-offset (:%q object)))
    2666   (je.pn :bad)
     2665  (jne.pn :bad)
    26672666  (cmpl (:$b 0) (:@ (+ x8664::misc-data-offset 8) (:%q object)))
    26682667  (je :ok)
     
    26742673  :ok-if-non-negative
    26752674  (testq (:%q tag) (:%q tag))
    2676   (jl :bad)
     2675  (js :bad)
    26772676  :ok)
    26782677
Note: See TracChangeset for help on using the changeset viewer.