Changeset 6295


Ignore:
Timestamp:
Apr 18, 2007, 9:18:30 AM (15 years ago)
Author:
gb
Message:

Do the right/obvious thing for memory addresses of the form (@ (: label) (% rip)).

Location:
branches/x8664-call/ccl/compiler/X86
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/x8664-call/ccl/compiler/X86/x86-asm.lisp

    r6291 r6295  
    656656           (setq memtype
    657657                 (logior (encode-operand-type :disp32s)
     658                         (encode-operand-type :label)
    658659                         (logandc2 memtype (encode-operand-type :disp)))))
    659660          (t
  • branches/x8664-call/ccl/compiler/X86/x86-lap.lisp

    r5874 r6295  
    916916         (when disp
    917917           (let* ((optype (x86::x86-instruction-extra insn))
    918                   (val (early-x86-lap-expression-value disp)))
     918                  (pcrel (and (logtest (x86::encode-operand-type :label) optype)
     919                              (typep disp 'label-x86-lap-expression)))
     920                  (val (unless pcrel (early-x86-lap-expression-value disp))))
    919921             (if (null val)
    920922               ;; We can do better job here, but (for now)
     
    922924               (let* ((frag (frag-list-current frag-list))
    923925                      (pos (frag-list-position frag-list)))
    924                  (push (make-reloc :type :expr32
    925                                    :arg disp
     926                 (push (make-reloc :type (if pcrel :branch32 :expr32)
     927                                   :arg (if pcrel (label-x86-lap-expression-label disp) disp)
    926928                                   :frag frag
    927929                                   :pos pos)
Note: See TracChangeset for help on using the changeset viewer.