Bug 991153: fix un-qfolded nits from bbouvier's review (r=bbouvier)

This commit is contained in:
Marty Rosenberg 2014-06-25 13:16:11 -04:00
parent 5a67e1f345
commit a8aafdee85
3 changed files with 16 additions and 10 deletions

View File

@ -390,18 +390,22 @@ class VFPRegister
// s0 has 1 other aligned aliase, 2 total.
return 2 - (code_ & 1);
}
// | d0 |
// | s0 | s1 |
// if we've stored s0 and s1 in memory, we also want to say that d0
// is stored there, but it is only stored at the location where it is aligned
// e.g. at s0, not s1.
void alignedAliased(uint32_t aliasIdx, VFPRegister *ret) {
if (aliasIdx == 0) {
*ret = *this;
return;
}
JS_ASSERT(aliasIdx == 1);
if (isDouble()) {
JS_ASSERT(code_ < NumAliasedDoubles);
JS_ASSERT(aliasIdx <= 1);
*ret = singleOverlay(aliasIdx - 1);
return;
}
JS_ASSERT(aliasIdx == 1);
JS_ASSERT((code_ & 1) == 0);
*ret = doubleOverlay(aliasIdx - 1);
return;

View File

@ -204,10 +204,10 @@ struct FloatRegister {
bool operator ==(FloatRegister other) const {
return other.code_ == code_;
}
bool aliases(FloatRegister const &other) const {
bool aliases(FloatRegister other) const {
return other.code_ == code_;
}
uint32_t numAliased() {
uint32_t numAliased() const {
return 1;
}
void aliased(uint32_t aliasIdx, FloatRegister *ret) {
@ -215,13 +215,14 @@ struct FloatRegister {
*ret = *this;
}
// This function mostly exists for the ARM backend. It is to ensure that two
// floating point registers are equivalent. e.g. S0 is not equivalent to D16.
// floating point registers' types are equivalent. e.g. S0 is not equivalent
// to D16, since S0 holds a float32, and D16 holds a Double.
// Since all floating point registers on x86 and x64 are equivalent, it is
// reasonable for this function to do the same.
bool equiv(FloatRegister other) const {
return true;
}
uint32_t size() {
uint32_t size() const {
return sizeof(double);
}
uint32_t numAlignedAliased() {

View File

@ -183,7 +183,7 @@ struct FloatRegister {
bool aliases(FloatRegister other) const {
return other.code_ == code_;
}
uint32_t numAliased() {
uint32_t numAliased() const {
return 1;
}
void aliased(uint32_t aliasIdx, FloatRegister *ret) {
@ -191,16 +191,17 @@ struct FloatRegister {
*ret = *this;
}
// This function mostly exists for the ARM backend. It is to ensure that two
// floating point registers are equivalent. e.g. S0 is not equivalent to D16.
// floating point registers' types are equivalent. e.g. S0 is not equivalent
// to D16, since S0 holds a float32, and D16 holds a Double.
// Since all floating point registers on x86 and x64 are equivalent, it is
// reasonable for this function to do the same.
bool equiv(FloatRegister other) const {
return true;
}
uint32_t size() {
uint32_t size() const {
return sizeof(double);
}
uint32_t numAlignedAliased() {
uint32_t numAlignedAliased() const {
return 1;
}
void alignedAliased(uint32_t aliasIdx, FloatRegister *ret) {