On Aug 16, 2007, at 5:25 AM, Paolo Molaro wrote:
On 08/16/07 Ron Blaschke wrote:
The optimization done by the parrot jit is invalid for the x86 C
calling
convention: the area of memory containing the passed arguments
can be used as scratch space by the called function.
If you can make sure it's not harmful that way you could still use it
when calling parrot's own jitted functions which could use a different
calling convention, but it is wrong when interoperating with other code
(gcc can generate the same issues, so it's not just VC).
lupus
--
-----------------------------------------------------------------
[EMAIL PROTECTED] debian/rules
[EMAIL PROTECTED] Monkeys do it better
Let's go with a Microsoft blog about it,
<http://blogs.msdn.com/oldnewthing/archive/2004/01/08/48616.aspx>.
With __stdcall, the callee cleans the stack. With __cdecl(used
everywhere else, and in part of windows), the caller cleans the stack.
If the ops are converted to __cdecl, it should help fix it(since the
function shouldn't logically assume anything about how much stack space
is available for clobbering). I'm having trouble finding anything
about who owns the stack space. My personal view is that the caller
owns that stack space, since it can also be used to store local
variables, i.e. don't move around data that's in order for calling a
function.