Skip to content

Commit

Permalink
x86: use modular addition when decoding call displacement
Browse files Browse the repository at this point in the history
  • Loading branch information
snuglas committed May 10, 2018
1 parent 0257865 commit 7189279
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/compiler/x86/insts.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@

(define-arg-type displacement
:sign-extend t
:use-label (lambda (value dstate) (+ (dstate-next-addr dstate) value))
:use-label (lambda (value dstate)
(ldb (byte 32 0) (+ (dstate-next-addr dstate) value)))
:printer (lambda (value stream dstate)
(maybe-note-assembler-routine value nil dstate)
(print-label value stream dstate)))
Expand Down

0 comments on commit 7189279

Please sign in to comment.