Changeset 5873


Ignore:
Timestamp:
Feb 10, 2007, 9:15:01 PM (18 years ago)
Author:
Gary Byers
Message:

alloc-c-frame vinsn takes "extra" word count, not total byte count.

Fix handling of $undo-x86-c-frame in x862-nlexit. (Need to check the
PPC case, as well.)

File:
1 edited

Legend:

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

    r5774 r5873  
    48624862    (with-x86-local-vinsn-macros (seg)
    48634863      (when (neq 0 nlevels)
    4864         (let* ((numnlispareas 0))
    4865           (declare (fixnum numnlispareas))
    4866           (flet ((popnlispareas ()
    4867                    (dotimes (i numnlispareas)
     4864        (let* ((num-temp-frames 0)
     4865               (num-c-frames 0))
     4866          (declare (fixnum numnlispareas num-c-frames))
     4867          (flet ((pop-temp-frames ()
     4868                   (dotimes (i num-temp-frames)
    48684869                     (! discard-temp-frame)))
     4870                 (pop-c-frames ()
     4871                   (dotimes (i num-c-frames)
     4872                     (! discard-c-frame)))
    48694873                 (throw-through-numnthrow-catch-frames ()
    48704874                   (when (neq 0 numnthrow)
     
    48814885            (while (%i> n dest)
    48824886              (cond ((eql $undocatch (setq reason (aref *x862-undo-because* (setq n (%i- n 1)))))
    4883                      (popnlispareas)
     4887                     (pop-temp-frames)
     4888                     (pop-c-frames)
    48844889                     (setq numnthrow (%i+ numnthrow 1) lastcatch n))
    48854890                    ((eql $undostkblk reason)
    48864891                     (throw-through-numnthrow-catch-frames)
    4887                      (incf numnlispareas))
     4892                     (incf num-temp-frames))
    48884893                    ((eql $undo-x86-c-frame reason)
    4889                      (! discard-c-frame))))
     4894                     (throw-through-numnthrow-catch-frames)
     4895                     (incf num-c-frames))))
    48904896            (throw-through-numnthrow-catch-frames)
    48914897            (setq i lastcatch)
     
    49104916                      (! slide-values))
    49114917                    (! adjust-vsp vdiff)))))
    4912             (setq numnlispareas 0)
     4918            (setq num-temp-frames 0 num-c-frames 0)
    49134919            (while (%i> lastcatch dest)
    49144920              (let ((reason (aref *x862-undo-because* (setq lastcatch (%i- lastcatch 1)))))
     
    49164922                                               (x862-decode-stack (aref *x862-undo-stack* lastcatch))))
    49174923                (if (eq reason $undostkblk)
    4918                   (incf numnlispareas))
     4924                  (incf num-temp-frames))
     4925                (if (eq reason $undo-x86-c-frame)
     4926                  (incf num-c-frames))
    49194927                (if (%i> cstack target-cstack)
    49204928                  (error "bug: adjust foreign stack ??"))
    49214929                ;; else what's going on? $sp-stkcons, for one thing
    49224930                (setq cstack target-cstack)))
    4923             (popnlispareas)))
     4931            (pop-temp-frames)
     4932            (pop-c-frames)))
    49244933        vstack))))
    49254934
     
    83078316        (when (zerop total-words)
    83088317          (setq simple-foreign-args nil))
    8309         (! alloc-c-frame (ash (+ 8 (logandc2 (1+ total-words) 1))
    8310                               *x862-target-fixnum-shift*)))
     8318        (! alloc-c-frame total-words))
    83118319      (x862-open-undo $undo-x86-c-frame)
    83128320      (setq ngpr-args 0)
     
    84218429        (when (null argspecs)
    84228430          (setq simple-foreign-args t))
    8423         (! alloc-c-frame (ash (+ 8 (logandc2 (1+ total-words) 1))
    8424                               *x862-target-fixnum-shift*)))
     8431        (! alloc-c-frame total-words))
    84258432      (x862-open-undo $undo-x86-c-frame)
    84268433      (setq single-float-offset (+ other-offset nother-words))
Note: See TracChangeset for help on using the changeset viewer.