mirror of
https://github.com/corda/corda.git
synced 2025-01-06 05:04:20 +00:00
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:
parent
5354e36530
commit
141862470b
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user