mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 885169 - Reverse the default register allocation order so that low registers like eax on x86/x64 are preferred over high registers. r=h4writer
This commit is contained in:
parent
cd69f653fc
commit
0562f7aa5d
@ -396,10 +396,12 @@ class TypedRegisterSet
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
T getAny() const {
|
T getAny() const {
|
||||||
JS_ASSERT(!empty());
|
// The choice of first or last here is mostly arbitrary, as they are
|
||||||
int ireg;
|
// about the same speed on popular architectures. We choose first, as
|
||||||
JS_FLOOR_LOG2(ireg, bits_);
|
// it has the advantage of using the "lower" registers more often. These
|
||||||
return T::FromCode(ireg);
|
// registers are sometimes more efficient (e.g. optimized encodings for
|
||||||
|
// EAX on x86).
|
||||||
|
return getFirst();
|
||||||
}
|
}
|
||||||
T getFirst() const {
|
T getFirst() const {
|
||||||
JS_ASSERT(!empty());
|
JS_ASSERT(!empty());
|
||||||
|
Loading…
Reference in New Issue
Block a user