fix stack pointer adjustment in invokeNative2; pad frame size using Architecture::frameFootprint in MyProcessor::invoke to conform to new calling convention

This commit is contained in:
Joel Dice 2009-04-25 17:33:42 -06:00
parent 5354e36530
commit 141862470b

View File

@ -4836,16 +4836,17 @@ invokeNative2(MyThread* t, object method)
default: abort(t);
}
if (t->arch->argumentFootprint(footprint)
unsigned parameterFootprint = methodParameterFootprint(t, method);
if (t->arch->argumentFootprint(parameterFootprint)
> t->arch->stackAlignmentInWords())
{
t->stack = static_cast<uintptr_t*>(t->stack)
+ (t->arch->argumentFootprint(footprint)
+ (t->arch->argumentFootprint(parameterFootprint)
- t->arch->stackAlignmentInWords());
}
t->stack = static_cast<uintptr_t*>(t->stack)
- t->arch->frameReturnAddressSize();
+ t->arch->frameReturnAddressSize();
} else {
result = 0;
}
@ -5139,7 +5140,8 @@ invoke(Thread* thread, object method, ArgumentList* arguments)
(t, reinterpret_cast<void*>(methodAddress(t, method)),
arguments->array + arguments->position,
count * BytesPerWord,
t->arch->alignFrameSize(count) * BytesPerWord,
t->arch->alignFrameSize(count + t->arch->frameFootprint(0))
* BytesPerWord,
returnType);
}