Changeset 13457


Ignore:
Timestamp:
Feb 23, 2010, 6:08:58 AM (9 years ago)
Author:
gb
Message:

Try to tighten up %IASR, %ILSR vinsns: use CMOV instead of branching,
avoid partial register writes.

Location:
trunk/source/compiler/X86
Files:
2 edited

Legend:

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

    r13446 r13457  
    22222222  (movl (:%l count) (:%l temp))
    22232223  (sarl (:$ub x8632::fixnumshift) (:%l temp))
    2224   (rcmpl (:%l temp) (:$l 31))
    2225   (cmovbw (:%w temp) (:%w shiftcount))
     2224  (movl (:$l 31) (:%l shiftcount))
     2225  (rcmpl (:%l temp) (:%l shiftcount))
     2226  (cmovbel (:%l temp) (:%l shiftcount))
    22262227  (movl (:%l src) (:%l temp))
    2227   (jae :shift-max)
    22282228  (sarl (:%shift x8632::cl) (:%l temp))
    2229   (jmp :done)
    2230   :shift-max
    2231   (sarl (:$ub 31) (:%l temp))
    2232   :done
    22332229  (andl (:$l (lognot x8632::fixnummask)) (:%l temp))
    22342230  (movl (:%l temp) (:%l dest)))
     
    22412237  (movl (:%l count) (:%l temp))
    22422238  (sarl (:$ub x8632::fixnumshift) (:%l temp))
    2243   (rcmpl (:%l temp) (:$l 31))
    2244   (cmovbw (:%w temp) (:%w shiftcount))
     2239  (movl (:$l 31) (:%l shiftcount))
     2240  (rcmpl (:%l temp) (:%l shiftcount))
     2241  (cmovbel (:%l temp) (:%l shiftcount))
    22452242  (movl (:%l src) (:%l temp))
    2246   (jae :shift-max)
    22472243  (shrl (:%shift x8632::cl) (:%l temp))
    2248   (jmp :done)
    2249   :shift-max
    2250   (shrl (:$ub 31) (:%l temp))
    2251   :done
    2252   (andb (:$b (lognot x8632::fixnummask)) (:%b temp))
     2244  (andl (:$b (lognot x8632::fixnummask)) (:%l temp))
    22532245  (movl (:%l temp) (:%l dest)))
    22542246
  • trunk/source/compiler/X86/X8664/x8664-vinsns.lisp

    r13248 r13457  
    27152715  (movq (:%q count) (:%q temp))
    27162716  (sarq (:$ub x8664::fixnumshift) (:%q temp))
    2717   (rcmpq (:%q temp) (:$l 63))
    2718   (cmovbw (:%w temp) (:%w shiftcount))
     2717  (movl (:$l 63) (:%l shiftcount))
     2718  (rcmpq (:%q temp) (:%q shiftcount))
     2719  (cmovbel (:%l temp) (:%l shiftcount))
    27192720  (movq (:%q src) (:%q temp))
    2720   (jae :shift-max)
    27212721  (sarq (:%shift x8664::cl) (:%q temp))
    2722   (jmp :done)
    2723   :shift-max
    2724   (sarq (:$ub 63) (:%q temp))
    2725   :done
    2726   (andb (:$b (lognot x8664::fixnummask)) (:%b temp))
     2722  (andq (:$b (lognot x8664::fixnummask)) (:%q temp))
    27272723  (movq (:%q temp) (:%q dest)))
    27282724
     
    27342730  (movq (:%q count) (:%q temp))
    27352731  (sarq (:$ub x8664::fixnumshift) (:%q temp))
    2736   (rcmpq (:%q temp) (:$l 63))
    2737   (cmovbw (:%w temp) (:%w shiftcount))
     2732  (movl (:$l 63) (:%l shiftcount))
     2733  (rcmpq (:%q temp) (:%q shiftcount))
     2734  (cmovbel (:%l temp) (:%l shiftcount))
    27382735  (movq (:%q src) (:%q temp))
    2739   (jae :shift-max)
    27402736  (shrq (:%shift x8664::cl) (:%q temp))
    2741   (jmp :done)
    2742   :shift-max
    2743   (shrq (:$ub 63) (:%q temp))
    2744   :done
    2745   (andb (:$b (lognot x8664::fixnummask)) (:%b temp))
     2737  (andq (:$b (lognot x8664::fixnummask)) (:%q temp))
    27462738  (movq (:%q temp) (:%q dest)))
     2739
    27472740
    27482741(define-x8664-vinsn %iasr-c (((dest :imm))
Note: See TracChangeset for help on using the changeset viewer.