Changeset 9160


Ignore:
Timestamp:
Apr 15, 2008, 5:05:46 AM (12 years ago)
Author:
rme
Message:

%define-x8632-lap-function: tweaks to get :code-size to DTRT.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ia32/compiler/X86/x86-lap.lisp

    r9122 r9160  
    15111511    (x86-lap-directive frag-list :align 2)
    15121512    (when *x86-lap-fixed-code-words*
    1513       (x86-lap-directive frag-list :org (ash *x86-lap-fixed-code-words* 2)))
     1513      ;; We have a code-size that we're trying to get to.  We need to
     1514      ;; include the self-reference table in the code-size, so decrement
     1515      ;; the size of the padding we would otherwise insert by the srt size.
     1516      (let ((srt-words 1))              ;for zero between end of code and srt
     1517        (do-dll-nodes (frag frag-list)
     1518          (dolist (reloc (frag-relocs frag))
     1519            (when (eq (reloc-type reloc) :self)
     1520              (incf srt-words))))
     1521        (decf *x86-lap-fixed-code-words* srt-words)
     1522        (if (plusp *x86-lap-fixed-code-words*)
     1523          (x86-lap-directive frag-list :org (ash *x86-lap-fixed-code-words* 2)))))
    15141524    ;; self reference table
    15151525    (x86-lap-directive frag-list :long 0)
Note: See TracChangeset for help on using the changeset viewer.