mirror of
https://github.com/corda/corda.git
synced 2025-02-02 17:21:06 +00:00
fix CallEvent::popIndex calculation
This commit is contained in:
parent
50529969f9
commit
fd99691b00
@ -2247,11 +2247,14 @@ clean(Context* c, Value* v, unsigned popIndex)
|
|||||||
(c, static_cast<MemorySite*>(s)->offset)
|
(c, static_cast<MemorySite*>(s)->offset)
|
||||||
>= popIndex))
|
>= popIndex))
|
||||||
{
|
{
|
||||||
if (false) {
|
if (false and
|
||||||
|
s->match(c, SiteMask(1 << MemoryOperand, 0, AnyFrameIndex)))
|
||||||
|
{
|
||||||
char buffer[256]; s->toString(c, buffer, 256);
|
char buffer[256]; s->toString(c, buffer, 256);
|
||||||
fprintf(stderr, "remove %s from %p at %d pop index %d\n",
|
fprintf(stderr, "remove %s from %p at %d pop offset 0x%x\n",
|
||||||
buffer, v, offsetToFrameIndex
|
buffer, v, offsetToFrameIndex
|
||||||
(c, static_cast<MemorySite*>(s)->offset), popIndex);
|
(c, static_cast<MemorySite*>(s)->offset),
|
||||||
|
frameIndexToOffset(c, popIndex));
|
||||||
}
|
}
|
||||||
it.remove(c);
|
it.remove(c);
|
||||||
}
|
}
|
||||||
@ -2425,25 +2428,20 @@ class CallEvent: public Event {
|
|||||||
}
|
}
|
||||||
|
|
||||||
-- footprint;
|
-- footprint;
|
||||||
|
|
||||||
if (footprint == 0 and (flags & Compiler::TailJump) == 0) {
|
|
||||||
stackArgumentIndex = s->index + c->localFootprint;
|
|
||||||
}
|
|
||||||
|
|
||||||
++ frameIndex;
|
++ frameIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((flags & Compiler::TailJump) == 0) {
|
if ((flags & Compiler::TailJump) == 0) {
|
||||||
if (stackArgumentFootprint == 0) {
|
stackArgumentIndex = c->localFootprint;
|
||||||
stackArgumentIndex = (stackBefore ? stackBefore->index + 1 : 0)
|
if (stackBefore) {
|
||||||
+ c->localFootprint;
|
stackArgumentIndex += stackBefore->index + 1 - stackArgumentFootprint;
|
||||||
}
|
}
|
||||||
|
|
||||||
popIndex
|
popIndex
|
||||||
= c->alignedFrameSize
|
= c->alignedFrameSize
|
||||||
|
+ c->parameterFootprint
|
||||||
- c->arch->frameFooterSize()
|
- c->arch->frameFooterSize()
|
||||||
- (stackBefore ? stackBefore->index + 1 - stackArgumentFootprint : 0)
|
- stackArgumentIndex;
|
||||||
- c->localFootprint;
|
|
||||||
|
|
||||||
assert(c, static_cast<int>(popIndex) >= 0);
|
assert(c, static_cast<int>(popIndex) >= 0);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user