зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
4a4be1c6e4
Коммит
633b6844ca
|
@ -396,10 +396,12 @@ class TypedRegisterSet
|
|||
#endif
|
||||
}
|
||||
T getAny() const {
|
||||
JS_ASSERT(!empty());
|
||||
int ireg;
|
||||
JS_FLOOR_LOG2(ireg, bits_);
|
||||
return T::FromCode(ireg);
|
||||
// The choice of first or last here is mostly arbitrary, as they are
|
||||
// about the same speed on popular architectures. We choose first, as
|
||||
// it has the advantage of using the "lower" registers more often. These
|
||||
// registers are sometimes more efficient (e.g. optimized encodings for
|
||||
// EAX on x86).
|
||||
return getFirst();
|
||||
}
|
||||
T getFirst() const {
|
||||
JS_ASSERT(!empty());
|
||||
|
|
Загрузка…
Ссылка в новой задаче