[commit] r2442 - Get Alien marshalling loop correct for stack-grows-down Cog/Stack VMs.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[commit] r2442 - Get Alien marshalling loop correct for stack-grows-down Cog/Stack VMs.

commits-3
 
Author: eliot
Date: 2011-07-04 19:42:09 -0700 (Mon, 04 Jul 2011)
New Revision: 2442

Modified:
   trunk/platforms/Cross/plugins/IA32ABI/dabusiness.h
Log:
Get Alien marshalling loop correct for stack-grows-down Cog/Stack VMs.


Modified: trunk/platforms/Cross/plugins/IA32ABI/dabusiness.h
===================================================================
--- trunk/platforms/Cross/plugins/IA32ABI/dabusiness.h 2011-07-05 01:44:47 UTC (rev 2441)
+++ trunk/platforms/Cross/plugins/IA32ABI/dabusiness.h 2011-07-05 02:42:09 UTC (rev 2442)
@@ -19,7 +19,7 @@
 #if STACKVM /* Need to access args downwards from first arg */
   if (numArgs < 0)
  for (i = size = 0; --i >= numArgs;) {
- sqInt arg = argVector[i];
+ sqInt arg = argVector[0-i];
  if (objIsAlien(arg) && sizeField(arg))
  size += moduloPOT(sizeof(long),abs(sizeField(arg)));
  else /* assume an integer or pointer.  check below. */
@@ -58,7 +58,7 @@
 #if STACKVM /* Need to access args downwards from first arg */
   if (numArgs < 0)
  for (i = size = 0; --i >= numArgs;) {
- sqInt arg = argVector[i];
+ sqInt arg = argVector[0-i];
  if (isSmallInt(arg)) {
  *(long *)argvec = intVal(arg);
  argvec += sizeof(long);