Actually add RCX, plus RDI and RSI on Unix.

And switch to a register order that consistently prefers callee-save to
caller-save.  phire suggested putting rdi/rsi first, even though they're
caller-save, to save code space; this is more conservative and I can do
that later.
This commit is contained in:
comex 2014-09-02 23:18:38 -04:00
parent 8dea26762d
commit 100a7ac97b

View File

@ -200,9 +200,9 @@ const int* GPRRegCache::GetAllocationOrder(size_t& count)
{
// R12, when used as base register, for example in a LEA, can generate bad code! Need to look into this.
#ifdef _WIN32
RSI, RDI, R13, R14, R8, R9, R10, R11, R12, //, RCX
RSI, RDI, R13, R14, R8, R9, R10, R11, R12, RCX
#else
R13, R14, R8, R9, R10, R11, R12, //, RCX
R12, R13, R14, RSI, RDI, R8, R9, R10, R11, RCX
#endif
};
count = sizeof(allocationOrder) / sizeof(const int);