Smaller instruction to test negative number on ia32
BUG= R=jkummerow@chromium.org Review URL: https://codereview.chromium.org/23361030 Patch from Weiliang Lin <weiliang.lin2@gmail.com>. git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16335 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
e146b6e148
commit
b071f9884d
@ -606,7 +606,7 @@ int DisassemblerIA32::D1D3C1Instruction(byte* data) {
|
|||||||
}
|
}
|
||||||
ASSERT_NE(NULL, mnem);
|
ASSERT_NE(NULL, mnem);
|
||||||
AppendToBuffer("%s %s,", mnem, NameOfCPURegister(rm));
|
AppendToBuffer("%s %s,", mnem, NameOfCPURegister(rm));
|
||||||
if (imm8 > 0) {
|
if (imm8 >= 0) {
|
||||||
AppendToBuffer("%d", imm8);
|
AppendToBuffer("%d", imm8);
|
||||||
} else {
|
} else {
|
||||||
AppendToBuffer("cl");
|
AppendToBuffer("cl");
|
||||||
|
@ -1787,8 +1787,8 @@ void LCodeGen::DoShiftI(LShiftI* instr) {
|
|||||||
case Token::ROR:
|
case Token::ROR:
|
||||||
__ ror_cl(ToRegister(left));
|
__ ror_cl(ToRegister(left));
|
||||||
if (instr->can_deopt()) {
|
if (instr->can_deopt()) {
|
||||||
__ test(ToRegister(left), Immediate(0x80000000));
|
__ test(ToRegister(left), ToRegister(left));
|
||||||
DeoptimizeIf(not_zero, instr->environment());
|
DeoptimizeIf(sign, instr->environment());
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Token::SAR:
|
case Token::SAR:
|
||||||
@ -1797,8 +1797,8 @@ void LCodeGen::DoShiftI(LShiftI* instr) {
|
|||||||
case Token::SHR:
|
case Token::SHR:
|
||||||
__ shr_cl(ToRegister(left));
|
__ shr_cl(ToRegister(left));
|
||||||
if (instr->can_deopt()) {
|
if (instr->can_deopt()) {
|
||||||
__ test(ToRegister(left), Immediate(0x80000000));
|
__ test(ToRegister(left), ToRegister(left));
|
||||||
DeoptimizeIf(not_zero, instr->environment());
|
DeoptimizeIf(sign, instr->environment());
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Token::SHL:
|
case Token::SHL:
|
||||||
@ -1814,8 +1814,8 @@ void LCodeGen::DoShiftI(LShiftI* instr) {
|
|||||||
switch (instr->op()) {
|
switch (instr->op()) {
|
||||||
case Token::ROR:
|
case Token::ROR:
|
||||||
if (shift_count == 0 && instr->can_deopt()) {
|
if (shift_count == 0 && instr->can_deopt()) {
|
||||||
__ test(ToRegister(left), Immediate(0x80000000));
|
__ test(ToRegister(left), ToRegister(left));
|
||||||
DeoptimizeIf(not_zero, instr->environment());
|
DeoptimizeIf(sign, instr->environment());
|
||||||
} else {
|
} else {
|
||||||
__ ror(ToRegister(left), shift_count);
|
__ ror(ToRegister(left), shift_count);
|
||||||
}
|
}
|
||||||
@ -1827,8 +1827,8 @@ void LCodeGen::DoShiftI(LShiftI* instr) {
|
|||||||
break;
|
break;
|
||||||
case Token::SHR:
|
case Token::SHR:
|
||||||
if (shift_count == 0 && instr->can_deopt()) {
|
if (shift_count == 0 && instr->can_deopt()) {
|
||||||
__ test(ToRegister(left), Immediate(0x80000000));
|
__ test(ToRegister(left), ToRegister(left));
|
||||||
DeoptimizeIf(not_zero, instr->environment());
|
DeoptimizeIf(sign, instr->environment());
|
||||||
} else {
|
} else {
|
||||||
__ shr(ToRegister(left), shift_count);
|
__ shr(ToRegister(left), shift_count);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user