mirror of
https://github.com/corda/corda.git
synced 2025-01-09 06:23:04 +00:00
add size parameter to Assembler::returnLow since the register used depends on the return value size on PowerPC
This commit is contained in:
parent
c88e3fa230
commit
324caaf98b
@ -259,7 +259,7 @@ class Assembler {
|
|||||||
|
|
||||||
virtual int stack() = 0;
|
virtual int stack() = 0;
|
||||||
virtual int thread() = 0;
|
virtual int thread() = 0;
|
||||||
virtual int returnLow() = 0;
|
virtual int returnLow(unsigned size) = 0;
|
||||||
virtual int returnHigh() = 0;
|
virtual int returnHigh() = 0;
|
||||||
|
|
||||||
virtual bool condensedAddressing() = 0;
|
virtual bool condensedAddressing() = 0;
|
||||||
|
@ -5713,7 +5713,7 @@ compileThunks(MyThread* t, Allocator* allocator, MyProcessor* p,
|
|||||||
|
|
||||||
a->popFrame();
|
a->popFrame();
|
||||||
|
|
||||||
Assembler::Register result(t->arch->returnLow());
|
Assembler::Register result(t->arch->returnLow(BytesPerWord));
|
||||||
a->apply(Jump, BytesPerWord, RegisterOperand, &result);
|
a->apply(Jump, BytesPerWord, RegisterOperand, &result);
|
||||||
|
|
||||||
a->endBlock(false)->resolve(0, 0);
|
a->endBlock(false)->resolve(0, 0);
|
||||||
|
@ -2322,7 +2322,7 @@ class CallEvent: public Event {
|
|||||||
clean(c, this, stackBefore, localsBefore, reads, popIndex);
|
clean(c, this, stackBefore, localsBefore, reads, popIndex);
|
||||||
|
|
||||||
if (resultSize and live(result)) {
|
if (resultSize and live(result)) {
|
||||||
addSite(c, result, registerSite(c, c->arch->returnLow()));
|
addSite(c, result, registerSite(c, c->arch->returnLow(resultSize)));
|
||||||
if (resultSize > BytesPerWord and live(result->high)) {
|
if (resultSize > BytesPerWord and live(result->high)) {
|
||||||
addSite(c, result->high, registerSite(c, c->arch->returnHigh()));
|
addSite(c, result->high, registerSite(c, c->arch->returnHigh()));
|
||||||
}
|
}
|
||||||
@ -2357,7 +2357,7 @@ class ReturnEvent: public Event {
|
|||||||
Event(c), value(value)
|
Event(c), value(value)
|
||||||
{
|
{
|
||||||
if (value) {
|
if (value) {
|
||||||
addRead(c, this, value, fixedRegisterRead(c, c->arch->returnLow()));
|
addRead(c, this, value, fixedRegisterRead(c, c->arch->returnLow(size)));
|
||||||
if (size > BytesPerWord) {
|
if (size > BytesPerWord) {
|
||||||
addRead(c, this, value->high,
|
addRead(c, this, value->high,
|
||||||
fixedRegisterRead(c, c->arch->returnHigh()));
|
fixedRegisterRead(c, c->arch->returnHigh()));
|
||||||
|
10
src/x86.cpp
10
src/x86.cpp
@ -1997,10 +1997,14 @@ class MyArchitecture: public Assembler::Architecture {
|
|||||||
return rbx;
|
return rbx;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual int returnLow() {
|
virtual int returnLow(unsigned) {
|
||||||
return rax;
|
return rax;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual int returnHigh() {
|
||||||
|
return (BytesPerWord == 4 ? rdx : NoRegister);
|
||||||
|
}
|
||||||
|
|
||||||
virtual bool condensedAddressing() {
|
virtual bool condensedAddressing() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -2017,10 +2021,6 @@ class MyArchitecture: public Assembler::Architecture {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual int returnHigh() {
|
|
||||||
return (BytesPerWord == 4 ? rdx : NoRegister);
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual unsigned argumentRegisterCount() {
|
virtual unsigned argumentRegisterCount() {
|
||||||
return (BytesPerWord == 4 ? 0 : 6);
|
return (BytesPerWord == 4 ? 0 : 6);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user