Ignore:
Timestamp:
Dec 22, 2009, 10:28:03 PM (10 years ago)
Author:
gz
Message:

Improved compilation for some fixnum operations, %svref (r13247-r13253 from trunk)

Location:
branches/working-0711/ccl
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/working-0711/ccl

  • branches/working-0711/ccl/compiler/X86/X8664/x8664-vinsns.lisp

    r13306 r13332  
    12431243  (negq (:% val)))
    12441244
     1245(define-x8664-vinsn handle-fixnum-overflow-inline
     1246    (()
     1247     ((val :lisp)
     1248      (no-overflow :label))
     1249     ((header (:u64 #.x8664::imm0))
     1250      (scaled-size (:u64 #.x8664::imm1))
     1251      (freeptr (:lisp #.x8664::allocptr))))
     1252  (jo :overflow)
     1253  (:uuo-section)
     1254  :overflow
     1255  (movq (:%q val) (:%q scaled-size))
     1256  (btcq (:$ub 63) (:%q scaled-size))
     1257  (sarq (:$ub x8664::fixnumshift) (:%q scaled-size))
     1258  (btcq (:$ub 60) (:%q scaled-size))
     1259  (movd (:%q scaled-size) (:%mmx x8664::mm0))
     1260  (movq (:$l x8664::two-digit-bignum-header) (:%q header))
     1261  (movq (:$l (- 16 x8664::fulltag-misc)) (:%q scaled-size))
     1262  (subq (:%q scaled-size) (:rcontext x8664::tcr.save-allocptr))
     1263  (movq (:rcontext x8664::tcr.save-allocptr) (:%q freeptr))
     1264  (rcmpq (:%q freeptr) (:rcontext x8664::tcr.save-allocbase))
     1265  (:byte #x77) (:byte #x02)             ;(ja :no-trap)
     1266  (uuo-alloc)
     1267  :no-trap
     1268  (movq (:%q header) (:@ x8664::misc-header-offset (:%q freeptr)))
     1269  (andb (:$b (lognot x8664::fulltagmask)) (:rcontext x8664::tcr.save-allocptr))
     1270  ((:not (:pred = freeptr
     1271                (:apply %hard-regspec-value val)))
     1272   (movq (:%q freeptr) (:%q val)))
     1273  (movq (:%mmx x8664::mm0) (:@ x8664::misc-data-offset (:%q val)))
     1274  (jmp no-overflow))
     1275
     1276   
    12451277;;; This handles the 1-bit overflow from addition/subtraction/unary negation
    12461278(define-x8664-vinsn set-bigits-and-header-for-fixnum-overflow
Note: See TracChangeset for help on using the changeset viewer.