From f0a59dd4fec1621b31069bff80935a72658eca46 Mon Sep 17 00:00:00 2001
From: rtoy <rtoy>
Date: Thu, 30 Nov 2006 00:44:34 +0000
Subject: [PATCH] The value for an ADDIS instruction can be negative.  Make it
 positive before trying to use it to look up and code constant.

---
 compiler/ppc/insts.lisp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/compiler/ppc/insts.lisp b/compiler/ppc/insts.lisp
index 6038a026b..21280339b 100644
--- a/compiler/ppc/insts.lisp
+++ b/compiler/ppc/insts.lisp
@@ -7,7 +7,7 @@
 ;;; Scott Fahlman or slisp-group@cs.cmu.edu.
 ;;;
 (ext:file-comment
-  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/ppc/insts.lisp,v 1.19 2006/06/30 18:41:24 rtoy Exp $")
+  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/ppc/insts.lisp,v 1.20 2006/11/30 00:44:34 rtoy Exp $")
 ;;;
 ;;; **********************************************************************
 ;;;
@@ -192,7 +192,7 @@ about function addresses and register values.")
 	  ;; 32-bit address or value.  Make a note about this usage as
 	  ;; a Lisp assembly routine or a foreign routine.  If note,
 	  ;; just note the final value.
-	  (let ((addr (+ d (ash (cdr addis) 16))))
+	  (let ((addr (+ d (ldb (byte 32 0) (ash (cdr addis) 16)))))
 	    (or (disassem::note-code-constant-absolute addr dstate)
 		(disassem::maybe-note-assembler-routine addr t dstate)
 		(disassem::note (format nil "~A = #x~8,'0X"
-- 
GitLab