зеркало из https://github.com/mozilla/gecko-dev.git
Bug 869072 - Test whether the upper 32 bits of a register are zeroed by loading
an unsigned UINT32_MAX into a register and comparing with that, since x86's cmp instruction's immediate field is a 32-bit signed field. r=sstangl
This commit is contained in:
Родитель
bf482503be
Коммит
5de49744cb
|
@ -206,15 +206,16 @@ class MacroAssemblerX64 : public MacroAssemblerX86Shared
|
|||
JS_ASSERT(src != dest);
|
||||
|
||||
JSValueShiftedTag tag = (JSValueShiftedTag)JSVAL_TYPE_TO_SHIFTED_TAG(type);
|
||||
mov(ImmShiftedTag(tag), dest);
|
||||
#ifdef DEBUG
|
||||
if (type == JSVAL_TYPE_INT32 || type == JSVAL_TYPE_BOOLEAN) {
|
||||
Label upper32BitsZeroed;
|
||||
branchPtr(Assembler::BelowOrEqual, src, Imm32(UINT32_MAX), &upper32BitsZeroed);
|
||||
movePtr(ImmWord(UINT32_MAX), dest);
|
||||
branchPtr(Assembler::BelowOrEqual, src, dest, &upper32BitsZeroed);
|
||||
breakpoint();
|
||||
bind(&upper32BitsZeroed);
|
||||
}
|
||||
#endif
|
||||
mov(ImmShiftedTag(tag), dest);
|
||||
orq(src, dest);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче