+ /* get information from method header */
+
+ code = *((codeinfo **) (pv + CodeinfoPointer));
+ framesize = *((int32_t *) (pv + FrameSize));
+ assert(code);
+ assert(framesize > sizeof(stackframeinfo) + sizeof(localref_table));
+
+ /* get the methodinfo */
+
+ m = code->m;
+ assert(m);
+
+ /* calculate needed values */
+
+#if defined(__ALPHA__) || defined(__ARM__)
+ datasp = currentsp + framesize - SIZEOF_VOID_P;
+ javasp = currentsp + framesize;
+ javara = *((uint8_t **) datasp);
+ arg_regs = (uint64_t *) currentsp;
+ arg_stack = (uint64_t *) javasp;
+#elif defined(__MIPS__) || defined(__S390__)
+ /* MIPS and S390 always uses 8 bytes to store the RA */
+ datasp = currentsp + framesize - 8;
+ javasp = currentsp + framesize;
+ javara = *((uint8_t **) datasp);
+#elif defined(__I386__) || defined (__M68K__) || defined (__X86_64__)
+ datasp = currentsp + framesize;
+ javasp = currentsp + framesize + SIZEOF_VOID_P;
+ javara = *((uint8_t **) datasp);
+ arg_regs = (uint64_t *) currentsp;
+ arg_stack = (uint64_t *) javasp;
+#elif defined(__POWERPC__) || defined(__POWERPC64__)
+ datasp = currentsp + framesize;
+ javasp = currentsp + framesize;
+ javara = *((uint8_t **) (datasp + LA_LR_OFFSET));
+ arg_regs = (uint64_t *) (currentsp + LA_SIZE + 4 * SIZEOF_VOID_P);
+ arg_stack = (uint64_t *) javasp;
+#else
+ /* XXX is was unable to do this port for SPARC64, sorry. (-michi) */
+ /* XXX maybe we need to pass the RA as argument there */
+ vm_abort("codegen_start_native_call: unsupported architecture");
+#endif
+
+#if !defined(NDEBUG)
+# if defined(__POWERPC__) || defined (__X86_64__)
+ /* print the call-trace if necesarry */
+
+ if (opt_TraceJavaCalls)
+ trace_java_call_enter(m, arg_regs, arg_stack);
+# endif
+#endif
+