mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-06 00:55:37 +00:00
Bug 1013906 - Assert on condition in branchTest32. r=bhackett
This commit is contained in:
parent
9bf227c086
commit
71fc5f478e
@ -978,6 +978,7 @@ class MacroAssemblerARMCompat : public MacroAssemblerARM
|
||||
ma_b(label, c);
|
||||
}
|
||||
void branchTest32(Condition cond, Register lhs, Register rhs, Label *label) {
|
||||
JS_ASSERT(cond == Zero || cond == NonZero || cond == Signed || cond == NotSigned);
|
||||
// x86 likes test foo, foo rather than cmp foo, #0.
|
||||
// Convert the former into the latter.
|
||||
if (lhs == rhs && (cond == Zero || cond == NonZero))
|
||||
@ -987,6 +988,7 @@ class MacroAssemblerARMCompat : public MacroAssemblerARM
|
||||
ma_b(label, cond);
|
||||
}
|
||||
void branchTest32(Condition cond, Register lhs, Imm32 imm, Label *label) {
|
||||
JS_ASSERT(cond == Zero || cond == NonZero || cond == Signed || cond == NotSigned);
|
||||
ma_tst(lhs, imm);
|
||||
ma_b(label, cond);
|
||||
}
|
||||
|
@ -238,14 +238,17 @@ class MacroAssemblerX86Shared : public Assembler
|
||||
j(cond, label);
|
||||
}
|
||||
void branchTest32(Condition cond, Register lhs, Register rhs, Label *label) {
|
||||
JS_ASSERT(cond == Zero || cond == NonZero || cond == Signed || cond == NotSigned);
|
||||
testl(lhs, rhs);
|
||||
j(cond, label);
|
||||
}
|
||||
void branchTest32(Condition cond, Register lhs, Imm32 imm, Label *label) {
|
||||
JS_ASSERT(cond == Zero || cond == NonZero || cond == Signed || cond == NotSigned);
|
||||
testl(lhs, imm);
|
||||
j(cond, label);
|
||||
}
|
||||
void branchTest32(Condition cond, const Address &address, Imm32 imm, Label *label) {
|
||||
JS_ASSERT(cond == Zero || cond == NonZero || cond == Signed || cond == NotSigned);
|
||||
testl(Operand(address), imm);
|
||||
j(cond, label);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user