Update of /project/movitz/cvsroot/ia-x86 In directory common-lisp.net:/tmp/cvs-serv27770
Modified Files: codec.lisp Log Message: Sign-extend the displacement part of an instruction when decoding it.
Date: Sat Aug 13 22:24:05 2005 Author: ffjeld
Index: ia-x86/codec.lisp diff -u ia-x86/codec.lisp:1.6 ia-x86/codec.lisp:1.7 --- ia-x86/codec.lisp:1.6 Thu Sep 2 11:01:19 2004 +++ ia-x86/codec.lisp Sat Aug 13 22:24:04 2005 @@ -1,6 +1,6 @@ ;;;;------------------------------------------------------------------ ;;;; -;;;; Copyright (C) 2000, 2001, 2002, 2004, +;;;; Copyright (C) 2000, 2001, 2002, 2004-2005, ;;;; Department of Computer Science, University of Tromso, Norway ;;;; ;;;; Filename: codec.lisp @@ -9,7 +9,7 @@ ;;;; Created at: Thu May 4 15:16:45 2000 ;;;; Distribution: See the accompanying file COPYING. ;;;; -;;;; $Id: codec.lisp,v 1.6 2004/09/02 09:01:19 ffjeld Exp $ +;;;; $Id: codec.lisp,v 1.7 2005/08/13 20:24:04 ffjeld Exp $ ;;;; ;;;;------------------------------------------------------------------
@@ -701,11 +701,12 @@ (incf byte-pos (template-instr-immediate-numo template)) ;; displacement (setf (instr-symbolic-displacement is) - (complex (change-endian (ldb (byte (* 8 (template-instr-displacement-numo template)) - (* 8 byte-pos)) - datum) - (template-instr-displacement-numo template)) - (template-instr-displacement-numo template))) + (sign-extend-complex + (complex (change-endian (ldb (byte (* 8 (template-instr-displacement-numo template)) + (* 8 byte-pos)) + datum) + (template-instr-displacement-numo template)) + (template-instr-displacement-numo template)))) (incf byte-pos (template-instr-displacement-numo template)) ;; SIB (when (template-instr-sib-p template)