From 5c3168d5026e25eb5cc361addeec2b78d65edf2e Mon Sep 17 00:00:00 2001 From: Abdulaziz Ghuloum Date: Fri, 14 Nov 2008 02:35:56 -0500 Subject: [PATCH] - fixed a bug in bytevector-ieee-double-ref which only showed up under the followingconditions: - ikarus is compiled as 64-bit - index is a multiple of 8 - endianness is big. --- scheme/last-revision | 2 +- scheme/pass-specify-rep-primops.ss | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/scheme/last-revision b/scheme/last-revision index e889d75..f4236d2 100644 --- a/scheme/last-revision +++ b/scheme/last-revision @@ -1 +1 @@ -1673 +1674 diff --git a/scheme/pass-specify-rep-primops.ss b/scheme/pass-specify-rep-primops.ss index 222675e..266bb82 100644 --- a/scheme/pass-specify-rep-primops.ss +++ b/scheme/pass-specify-rep-primops.ss @@ -2004,9 +2004,11 @@ [floff (- disp-flonum-data vector-tag)]) (with-tmp ([x (prm 'alloc (K (align flonum-size)) (K vector-tag))]) (prm 'mset x (K (- vector-tag)) (K flonum-tag)) - (with-tmp ([x0 (prm 'mref (T bv) (K bvoff))]) - (prm 'bswap! x0 x0) - (prm 'mset x (K floff) x0)) + (with-tmp ([t (prm 'int+ (T bv) + (prm 'sra (T i) (K fx-shift)))]) + (with-tmp ([x0 (prm 'mref t (K bvoff))]) + (prm 'bswap! x0 x0) + (prm 'mset x (K floff) x0))) x))])])