From 3dbb2e2b55ff3994646b23756cf55b31b684ee79 Mon Sep 17 00:00:00 2001 From: rtoy <rtoy> Date: Tue, 29 Nov 2005 14:25:46 +0000 Subject: [PATCH] We were not properly creating a unsigned 64-bit int from the two halves. This should be fixed in a different way by defining a unsigned-64 type. --- compiler/ppc/c-call.lisp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/compiler/ppc/c-call.lisp b/compiler/ppc/c-call.lisp index c765ee73f..2f52b9e2d 100644 --- a/compiler/ppc/c-call.lisp +++ b/compiler/ppc/c-call.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/c-call.lisp,v 1.17 2005/11/20 03:17:41 rtoy Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/ppc/c-call.lisp,v 1.18 2005/11/29 14:25:46 rtoy Exp $") ;;; ;;; ********************************************************************** ;;; @@ -387,12 +387,14 @@ (alien::integer-64$ ;; Get both words of a 64-bit integer and combine together, in ;; a big-endian fashion. - `(let ((hi (alien:deref (sap-alien (sys:sap+ ,sp ,offset) - (* c-call:int)))) - (lo (alien:deref (sap-alien (sys:sap+ ,sp - (+ ,offset vm:word-bytes)) - (* c-call:unsigned-int))))) - (+ (ash hi vm:word-bits) lo))) + `(let* ((hi (alien:deref (sap-alien (sys:sap+ ,sp ,offset) + ,(if (alien-integer-type-signed parsed-type) + '(* c-call:int) + '(* c-call:unsigned-int))))) + (lo (alien:deref (sap-alien (sys:sap+ ,sp + (+ ,offset vm:word-bytes)) + (* c-call:unsigned-int))))) + (+ (ash hi vm:word-bits) lo))) (alien::integer$ ;; We can access machine integers directly, but we need to get ;; the offset right, since the offset we're given is the start -- GitLab