On Wed, 2009-10-21 at 19:29 +0200, Tomasz Grabiec wrote: > > + if (xmm_count < 8) { > > + map->reg = args_map_alloc_xmm(xmm_count++); > > + map->stack_index = -1; > > + } else { > > + map->reg = MACH_REG_UNASSIGNED; > > + map->stack_index = stack_count++; > > + } > > I think the ->stack_index is set incorrectly for J_DOUBLE. It is later > used as an argument to get_local_slot(), and slots (according to JVM > spec) have always 32-bit, so we must reserve 2 slots for J_DOUBLE and > J_LONG. We don't have to handle the access to the higher slot, but we > need to reserve 2. > > While at it I'd like to point out something related. The struct > vm_method's field ->args_count is the number of 32-bit slots which are > reserved for arguments. It is arch-independent (java-level) and counts 2 > slots for J_DOUBLE and J_LONG arguments. I think that this variable is > used inappropriately in many places, as if it counted 1 slot for > J_DOUBLE and J_LONG.
Yeah, that looks broken to me too. I went ahead and applied the patch as it affects x86-64 only and is an improvement over the current situation. Eduard, care to send an incremental patch to fix this up? Pekka ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Jatovm-devel mailing list Jatovm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jatovm-devel