mirror of
https://github.com/corda/corda.git
synced 2025-01-07 13:38:47 +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);
|
default: abort(t);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (t->arch->argumentFootprint(footprint)
|
unsigned parameterFootprint = methodParameterFootprint(t, method);
|
||||||
|
if (t->arch->argumentFootprint(parameterFootprint)
|
||||||
> t->arch->stackAlignmentInWords())
|
> t->arch->stackAlignmentInWords())
|
||||||
{
|
{
|
||||||
t->stack = static_cast<uintptr_t*>(t->stack)
|
t->stack = static_cast<uintptr_t*>(t->stack)
|
||||||
+ (t->arch->argumentFootprint(footprint)
|
+ (t->arch->argumentFootprint(parameterFootprint)
|
||||||
- t->arch->stackAlignmentInWords());
|
- t->arch->stackAlignmentInWords());
|
||||||
}
|
}
|
||||||
|
|
||||||
t->stack = static_cast<uintptr_t*>(t->stack)
|
t->stack = static_cast<uintptr_t*>(t->stack)
|
||||||
- t->arch->frameReturnAddressSize();
|
+ t->arch->frameReturnAddressSize();
|
||||||
} else {
|
} else {
|
||||||
result = 0;
|
result = 0;
|
||||||
}
|
}
|
||||||
@ -5139,7 +5140,8 @@ invoke(Thread* thread, object method, ArgumentList* arguments)
|
|||||||
(t, reinterpret_cast<void*>(methodAddress(t, method)),
|
(t, reinterpret_cast<void*>(methodAddress(t, method)),
|
||||||
arguments->array + arguments->position,
|
arguments->array + arguments->position,
|
||||||
count * BytesPerWord,
|
count * BytesPerWord,
|
||||||
t->arch->alignFrameSize(count) * BytesPerWord,
|
t->arch->alignFrameSize(count + t->arch->frameFootprint(0))
|
||||||
|
* BytesPerWord,
|
||||||
returnType);
|
returnType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user