Index: /trunk/source/level-1/x86-trap-support.lisp
===================================================================
--- /trunk/source/level-1/x86-trap-support.lisp	(revision 14967)
+++ /trunk/source/level-1/x86-trap-support.lisp	(revision 14968)
@@ -342,7 +342,10 @@
                         (type (simple-array (unsigned-byte 8) (*)) containing-object))
         (aref containing-object (the fixnum (+ byte-offset delta))))
-      ;; xcf.relative-pc is a fixnum, but it might be negative.
-      (let* ((encoded-pc (%get-ptr xcf-ptr target::xcf.relative-pc))
-	     (pc (ash (%ptr-to-int encoded-pc) (- target::fixnumshift))))
+      ;; xcf.relative-pc is a fixnum containing the high half of the
+      ;; absolute PC; xcf.ra0 is a fixnum containing the low half
+      (let* ((high-half byte-offset)
+             (low-half (%get-object xcf-ptr target::xcf.ra0))
+	     (pc #+64-bit-target (dpb high-half (byte 32 32) low-half)
+                 #+32-bit-target (dpb high-half (byte 16 16) low-half)))
 	(%get-unsigned-byte (%int-to-ptr pc) delta)))))
 
Index: /trunk/source/lisp-kernel/x86-exceptions.c
===================================================================
--- /trunk/source/lisp-kernel/x86-exceptions.c	(revision 14967)
+++ /trunk/source/lisp-kernel/x86-exceptions.c	(revision 14968)
@@ -474,5 +474,11 @@
   } else {
     containing_uvector = lisp_nil;
-    relative_pc = abs_pc << fixnumshift;
+#if WORD_SIZE == 64
+    relative_pc = ((abs_pc >> 32) & 0xffffffff) << fixnumshift;
+    tra = (abs_pc & 0xffffffff) << fixnumshift;
+#else
+    relative_pc = ((abs_pc >> 16) & 0xffff) << fixnumshift;
+    tra = (abs_pc & 0xffff) << fixnumshift;
+#endif
   }
   push_on_lisp_stack(xp,(LispObj)(tcr->xframe->prev));
