Ignore:
Timestamp:
Mar 28, 2010, 11:55:52 AM (10 years ago)
Author:
gb
Message:

In the vinsns and subprims for special variable reference, try to
use CMOVs rather than branches.

File:
1 edited

Legend:

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

    r13457 r13561  
    33803380  :resume
    33813381  (movl (:@ x8632::symbol.binding-index (:%l src)) (:%l idx))
     3382  (xorl (:%l table) (:%l table))
    33823383  (rcmpl (:%l idx) (:@ (:%seg :rcontext) x8632::tcr.tlb-limit))
     3384  (cmovael (:%l table) (:%l idx))
    33833385  (movl (:@ (:%seg :rcontext) x8632::tcr.tlb-pointer) (:%l table))
    3384   (jae :symbol)
    33853386  (movl (:@ (:%l table) (:%l idx)) (:%l dest))
    33863387  (cmpl (:$l x8632::subtag-no-thread-local-binding) (:%l dest))
    3387   (jne :test)
    3388   :symbol
    3389   (movl (:@ x8632::symbol.vcell (:%l src)) (:%l dest))
    3390   :test
     3388  (cmovel (:@ x8632::symbol.vcell (:%l src)) (:%l dest))
    33913389  (cmpl (:$l x8632::unbound-marker) (:%l dest))
    33923390  (je :bad)
     
    34053403(define-x8632-vinsn %ref-symbol-value-inline (((dest :lisp))
    34063404                                              ((src (:lisp (:ne dest))))
    3407                                               ((table :imm)
    3408                                                (idx :imm)))
     3405                                              ((idx :imm)))
     3406  ;; binding index 0 always contains a no-thread-local-binding
     3407  ;; marker, so treat out-of-range indices as 0 to avoid branches.
    34093408  (movl (:@ x8632::symbol.binding-index (:%l src)) (:%l idx))
     3409  (xorl (:% dest) (:% dest))
    34103410  (rcmpl (:%l idx) (:@ (:%seg :rcontext) x8632::tcr.tlb-limit))
    3411   (jae :symbol)
     3411  (cmovael (:% dest) (:% idx))
    34123412  (addl (:@ (:%seg :rcontext) x8632::tcr.tlb-pointer) (:%l idx))
    34133413  (movl (:@ (:%l idx)) (:%l dest))
    34143414  (cmpl (:$l x8632::subtag-no-thread-local-binding) (:%l dest))
    3415   (jne :done)
    3416   :symbol
    3417   (movl (:@ x8632::symbol.vcell (:%l src)) (:%l dest))
    3418   :done)
     3415  (cmovel (:@ x8632::symbol.vcell (:%l src)) (:%l dest)))
    34193416
    34203417(define-x8632-vinsn ref-interrupt-level (((dest :imm))
Note: See TracChangeset for help on using the changeset viewer.