From 86bdd48a66eae6c0e10a3322b653a9afea3ac62e Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Tue, 15 Jan 2008 18:01:11 -0700 Subject: [PATCH] when invoking Java methods from native code on 32-bit systems, push 32-bit halves of 64-bit values in reverse order since they are reversed again when pushed on the stack --- src/compile.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/compile.cpp b/src/compile.cpp index dba3b01419..584bb6d5c5 100644 --- a/src/compile.cpp +++ b/src/compile.cpp @@ -4242,7 +4242,10 @@ class ArgumentList { if (BytesPerWord == 8) { memcpy(array + position + 1, &v, 8); } else { - memcpy(array + position, &v, 8); + // push words in reverse order, since they will be switched back + // when pushed on the stack: + array[position] = v >> 32; + array[position + 1] = v; } objectMask[position] = false; objectMask[position + 1] = false;