mirror of
https://github.com/corda/corda.git
synced 2025-01-23 04:48:09 +00:00
freeze registers in CallEvent::compile to ensure they are not used as temporaries by the assmebler
This commit is contained in:
parent
0245a94ab8
commit
630fde86f7
@ -2465,10 +2465,25 @@ class CallEvent: public Event {
|
|||||||
assert(c, framePointerSurrogate == 0
|
assert(c, framePointerSurrogate == 0
|
||||||
or framePointerSurrogate->source->type(c) == RegisterOperand);
|
or framePointerSurrogate->source->type(c) == RegisterOperand);
|
||||||
|
|
||||||
int ras = (returnAddressSurrogate ? static_cast<RegisterSite*>
|
int ras;
|
||||||
(returnAddressSurrogate->source)->number : NoRegister);
|
if (returnAddressSurrogate) {
|
||||||
int fps = (framePointerSurrogate ? static_cast<RegisterSite*>
|
returnAddressSurrogate->source->freeze(c, returnAddressSurrogate);
|
||||||
(framePointerSurrogate->source)->number : NoRegister);
|
|
||||||
|
ras = static_cast<RegisterSite*>
|
||||||
|
(returnAddressSurrogate->source)->number;
|
||||||
|
} else {
|
||||||
|
ras = NoRegister;
|
||||||
|
}
|
||||||
|
|
||||||
|
int fps;
|
||||||
|
if (framePointerSurrogate) {
|
||||||
|
framePointerSurrogate->source->freeze(c, framePointerSurrogate);
|
||||||
|
|
||||||
|
fps = static_cast<RegisterSite*>
|
||||||
|
(framePointerSurrogate->source)->number;
|
||||||
|
} else {
|
||||||
|
fps = NoRegister;
|
||||||
|
}
|
||||||
|
|
||||||
int offset
|
int offset
|
||||||
= static_cast<int>(c->arch->argumentFootprint(stackArgumentFootprint))
|
= static_cast<int>(c->arch->argumentFootprint(stackArgumentFootprint))
|
||||||
@ -2488,7 +2503,15 @@ class CallEvent: public Event {
|
|||||||
padIndex, padding);
|
padIndex, padding);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((flags & Compiler::TailJump) == 0) {
|
if (flags & Compiler::TailJump) {
|
||||||
|
if (returnAddressSurrogate) {
|
||||||
|
returnAddressSurrogate->source->thaw(c, returnAddressSurrogate);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (framePointerSurrogate) {
|
||||||
|
framePointerSurrogate->source->thaw(c, framePointerSurrogate);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
unsigned footprint = c->arch->argumentFootprint(stackArgumentFootprint);
|
unsigned footprint = c->arch->argumentFootprint(stackArgumentFootprint);
|
||||||
if (footprint > c->arch->stackAlignmentInWords()) {
|
if (footprint > c->arch->stackAlignmentInWords()) {
|
||||||
Assembler::Register stack(c->arch->stack());
|
Assembler::Register stack(c->arch->stack());
|
||||||
|
Loading…
Reference in New Issue
Block a user