X64: Ensure that unary subtraction returns a zero-extended smi, if it returns a smi.
Review URL: http://codereview.chromium.org/195101 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2900 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
677c043fee
commit
412a146825
@ -6320,7 +6320,7 @@ void UnarySubStub::Generate(MacroAssembler* masm) {
|
||||
// Also enter it if the value of the smi is Smi::kMinValue
|
||||
__ testl(rax, Immediate(0x7FFFFFFE));
|
||||
__ j(zero, &special);
|
||||
__ neg(rax);
|
||||
__ negl(rax);
|
||||
__ jmp(&done);
|
||||
|
||||
__ bind(&special);
|
||||
|
@ -309,3 +309,6 @@ Array.prototype[1] = 1;
|
||||
assertEquals(1, arr.pop());
|
||||
assertEquals(0, arr.pop());
|
||||
Array.prototype[1] = undefined;
|
||||
|
||||
// Test http://code.google.com/p/chromium/issues/detail?id=21860
|
||||
Array.prototype.push.apply([], [1].splice(0, -(-1 % 5)));
|
||||
|
Loading…
Reference in New Issue
Block a user