- Timestamp:
- Apr 18, 2007, 2:19:56 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/x8664-call/ccl/compiler/X86/x86-disassemble.lisp
r6003 r6296 2350 2350 ;; If the instruction is a MOV or PUSH whose source operand 2351 2351 ;; is relative to the FN register, generate a constant reference. 2352 ;; If the instruction is adding a displacement to RIP, note 2353 ;; the effective address as a label reference. 2352 2354 (let* ((op0 (x86-di-op0 instruction)) 2353 2355 (op1 (x86-di-op1 instruction)) … … 2359 2361 (x86::x86-reg64 13) 2360 2362 (x86::x86-reg32 6)))))) 2363 (is-rip (thing) 2364 (if (and (typep thing 'x86::x86-register-operand) 2365 (x86-ds-mode-64 ds)) 2366 (let* ((entry (x86::x86-register-operand-entry thing))) 2367 (eq entry (svref x86::*x8664-register-entries* 102))))) 2361 2368 (is-ra0 (thing) 2362 2369 (if (typep thing 'x86::x86-register-operand) … … 2385 2392 (or (null scale) (eql 0 scale))) 2386 2393 (let* ((disp (x86::x86-memory-operand-disp thing))) 2394 (and disp (early-x86-lap-expression-value disp))))) 2395 (is-rip-ea (thing) 2396 (and (typep thing 'x86::x86-memory-operand) 2397 (is-rip (x86::x86-memory-operand-base thing)) 2398 (null (x86::x86-memory-operand-index thing)) 2399 (let* ((scale (x86::x86-memory-operand-scale thing))) 2400 (or (null scale) (eql 0 scale))) 2401 (let* ((disp (x86::x86-memory-operand-disp thing))) 2387 2402 (and disp (early-x86-lap-expression-value disp)))))) 2388 2403 (case flag … … 2391 2406 (:lea 2392 2407 (let* ((disp )) 2393 ( when(or (and (setq disp (is-fn-ea op0)) (> disp 0))2408 (if (or (and (setq disp (is-fn-ea op0)) (> disp 0)) 2394 2409 (and (setq disp (is-ra0-ea op0)) (< disp 0) (is-fn op1))) 2395 2410 (let* ((label-ea (+ entry-ea (abs disp)))) … … 2400 2415 `(- (:^ ,label-ea)) 2401 2416 `(:^ ,label-ea)))) 2402 (push label-ea (x86-ds-pending-labels ds))))))) 2417 (push label-ea (x86-ds-pending-labels ds)))) 2418 (if (and (setq disp (is-rip-ea op0)) (< disp 0) (is-fn op1)) 2419 (progn 2420 (setf (x86::x86-memory-operand-disp op0) 2421 (parse-x86-lap-expression `(:^ ,entry-ea))) 2422 (push entry-ea (x86-ds-pending-labels ds))))))) 2403 2423 (:jump 2404 2424 (let* ((disp (is-disp-only op0)))
Note:
See TracChangeset
for help on using the changeset viewer.
