harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gshiman...@apache.org
Subject svn commit: r512263 - /harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_native_em64t.cpp
Date Tue, 27 Feb 2007 14:26:24 GMT
Author: gshimansky
Date: Tue Feb 27 06:26:20 2007
New Revision: 512263

URL: http://svn.apache.org/viewvc?view=rev&rev=512263
Log:
Applied HARMONY-3249 and HARMONY-3250 - fixes for interpreter native calling
conventions on windows x86_64

Tests passes on SuSE9 x86_64


Modified:
    harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_native_em64t.cpp

Modified: harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_native_em64t.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_native_em64t.cpp?view=diff&rev=512263&r1=512262&r2=512263
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_native_em64t.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_native_em64t.cpp Tue Feb 27 06:26:20
2007
@@ -90,7 +90,11 @@
     int sz = method->get_num_arg_slots();
 
     int n_ints = 0;
+#ifdef _WIN32 /* important difference in calling conventions */
+#define n_fps n_ints
+#else
     int n_fps = 0;
+#endif
     int n_stacks = 0;
     uword *out_args = (uword*) ALLOC_FRAME(8 + sizeof(char) + (MAX_REG_FLOATS + sz + 2) *
sizeof(uword));
     uword *fps = out_args + 1;
@@ -292,10 +296,14 @@
 
     M2N_ALLOC_MACRO;
     
-    word sz = method->get_num_arg_slots();
+    int sz = method->get_num_arg_slots();
 
     int n_ints = 0;
+#ifdef _WIN32 /* important difference in calling conventions */
+#define n_fps n_ints
+#else
     int n_fps = 0;
+#endif
     int n_stacks = 0;
     uword *out_args = (uword*) ALLOC_FRAME(8 + sizeof(char) + (MAX_REG_FLOATS + sz + 2) *
sizeof(uword));
     uword *fps = out_args + 1;
@@ -305,7 +313,7 @@
     frame.This = *(method->get_class()->get_class_handle());
     ints[n_ints++] = (uword) get_jni_native_intf();
     ints[n_ints++] = (uword) &frame.This; 
-    word pos = sz - 1;
+    int pos = sz - 1;
     uword arg;
 
     const char *mtype = method->get_descriptor()->bytes + 1;
@@ -574,7 +582,11 @@
            << method->get_descriptor()->bytes << endl);
 
     int n_ints = 0;
+#ifdef _WIN32 /* important difference in calling conventions */
+#define n_fps n_ints
+#else
     int n_fps = 0;
+#endif
     int n_stacks = 0;
     uword *out_args = (uword*) ALLOC_FRAME(8 + sizeof(char) + (MAX_REG_FLOATS + sz + 2) *
sizeof(uword));
     uword *fps = out_args + 1;
@@ -583,7 +595,7 @@
 
     ints[n_ints++] = (uword) get_jni_native_intf();
     ints[n_ints++] = (uword) &frame.This;
-    word pos = sz - 2;
+    int pos = sz - 2;
 
     GenericFunctionPointer f = interpreterGetNativeMethodAddr(method);
     if (f == 0) {



Mime
View raw message