Changeset 12359


Ignore:
Timestamp:
Jul 3, 2009, 2:31:59 AM (10 years ago)
Author:
gz
Message:

Code coverage fixes from 0711 branch (r12348 and r12358)

Location:
trunk/source/compiler
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/compiler/X86/x862.lisp

    r12327 r12359  
    221221(defvar *x862-fname* nil)
    222222(defvar *x862-ra0* nil)
     223(defvar *x862-codecoverage-reg* nil)
    223224
    224225(defvar *x862-allocptr* nil)
     
    516517           (*x862-temp0* (target-arch-case (:x8632 x8632::temp0)
    517518                                           (:x8664 x8664::temp0)))
     519           (*x862-codecoverage-reg* *x862-temp0*)
    518520           (*x862-temp1* (target-arch-case (:x8632 x8632::temp1)
    519521                                           (:x8664 x8664::temp1)))
     
    12431245      (when ,code-note
    12441246        (with-x86-local-vinsn-macros (,seg-var)
    1245           (x862-store-immediate ,seg-var ,code-note *x862-temp0*)
    1246           (! misc-set-immediate-c-node 0 *x862-temp0* 1)))
     1247          (x862-store-immediate ,seg-var ,code-note *x862-codecoverage-reg*)
     1248          (! misc-set-immediate-c-node 0 *x862-codecoverage-reg* 1)))
    12471249      (prog1
    12481250          (progn
     
    32173219(defun x862-two-targeted-reg-forms (seg aform areg bform breg)
    32183220  (let* ((avar (nx2-lexical-reference-p aform))
    3219          (atriv (and (x862-trivial-p bform) (nx2-node-gpr-p breg)))
     3221         (atriv (and (x862-trivial-p bform areg) (nx2-node-gpr-p breg)))
    32203222         (aconst (and (not atriv) (or (x86-side-effect-free-form-p aform)
    32213223                                      (if avar (nx2-var-not-set-by-form-p avar bform)))))
     
    32603262         (cnode (nx2-node-gpr-p creg))
    32613263         (atriv (or (null aform)
    3262                     (and (x862-trivial-p bform)
    3263                          (x862-trivial-p cform)
     3264                    (and (x862-trivial-p bform areg)
     3265                         (x862-trivial-p cform areg)
    32643266                         bnode
    32653267                         cnode)))
    32663268         (btriv (or (null bform)
    3267                     (and (x862-trivial-p cform)
     3269                    (and (x862-trivial-p cform breg)
    32683270                         cnode)))
    32693271         (aconst (and (not atriv)
     
    33043306         (dnode (nx2-node-gpr-p dreg))
    33053307         (atriv (or (null aform)
    3306                     (and (x862-trivial-p bform)
    3307                          (x862-trivial-p cform)
    3308                          (x862-trivial-p dform)
     3308                    (and (x862-trivial-p bform areg)
     3309                         (x862-trivial-p cform areg)
     3310                         (x862-trivial-p dform areg)
    33093311                         bnode
    33103312                         cnode
    33113313                         dnode)))
    33123314         (btriv (or (null bform)
    3313                     (and (x862-trivial-p cform)
    3314                          (x862-trivial-p dform)
     3315                    (and (x862-trivial-p cform breg)
     3316                         (x862-trivial-p dform breg)
    33153317                         cnode
    33163318                         dnode)))
    33173319         (ctriv (or (null cform)
    3318                     (and (x862-trivial-p dform)
     3320                    (and (x862-trivial-p dform creg)
    33193321                         dnode)))
    33203322         (aconst (and (not atriv)
     
    48214823;;; "Trivial" means can be evaluated without allocating or modifying registers.
    48224824;;; Interim definition, which will probably stay here forever.
    4823 (defun x862-trivial-p (form &aux op bits)
     4825(defun x862-trivial-p (form &optional reg &aux op bits)
    48244826  (setq form (nx-untyped-form form))
    48254827  (and
     
    48384840         (or (%ilogbitp $vbitpunted (setq bits (nx-var-bits (cadr form))))
    48394841             (neq (%ilogior (%ilsl $vbitclosed 1) (%ilsl $vbitsetq 1))
    4840                   (%ilogand (%ilogior (%ilsl $vbitclosed 1) (%ilsl $vbitsetq 1)) bits)))))))
     4842                  (%ilogand (%ilogior (%ilsl $vbitclosed 1) (%ilsl $vbitsetq 1)) bits)))))
     4843   (or (and reg (neq (hard-regspec-value reg) *x862-codecoverage-reg*))
     4844       (not (code-note-p (acode-note form))))))
    48414845
    48424846
  • trunk/source/compiler/nx-basic.lisp

    r12300 r12359  
    6161  (when note
    6262    (assert *nx-acode-note-map*)
    63     (setf (gethash acode *nx-acode-note-map*) note)))
     63    ;; Only record if have a unique key
     64    (unless (or (atom acode)
     65                (nx-null acode)
     66                (nx-t acode))
     67      (setf (gethash acode *nx-acode-note-map*) note))))
    6468
    6569
Note: See TracChangeset for help on using the changeset viewer.