Skip to content

Commit

Permalink
x86: Fix disassemble annotation of negative offsets.
Browse files Browse the repository at this point in the history
FDEFNs can now end up being located at negative signed word locations.
  • Loading branch information
stassats committed May 7, 2018
1 parent dc896dd commit 049f84f
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/compiler/x86/target-insts.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -213,13 +213,13 @@
(when (and offset (or firstp (not (zerop offset))))
(unless (or firstp (minusp offset))
(write-char #\+ stream))
(if firstp
(progn
(princ16 offset stream)
(or (minusp offset)
(nth-value 1 (note-code-constant-absolute offset dstate))
(maybe-note-assembler-routine offset nil dstate)))
(princ offset stream))))))
(cond (firstp
(princ16 offset stream)
(let ((offset (ldb (byte 32 0) offset)))
(or (nth-value 1 (note-code-constant-absolute offset dstate))
(maybe-note-assembler-routine offset nil dstate))))
(t
(princ offset stream)))))))
(write-char #\] stream))

;;;; interrupt instructions
Expand Down

0 comments on commit 049f84f

Please sign in to comment.