OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 4609 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4620 __ TailCallRuntime(Runtime::kStringCompare, 2, 1); | 4620 __ TailCallRuntime(Runtime::kStringCompare, 2, 1); |
4621 } | 4621 } |
4622 | 4622 |
4623 void ICCompareStub::GenerateSmis(MacroAssembler* masm) { | 4623 void ICCompareStub::GenerateSmis(MacroAssembler* masm) { |
4624 ASSERT(state_ == CompareIC::SMIS); | 4624 ASSERT(state_ == CompareIC::SMIS); |
4625 NearLabel miss; | 4625 NearLabel miss; |
4626 __ JumpIfNotBothSmi(rdx, rax, &miss); | 4626 __ JumpIfNotBothSmi(rdx, rax, &miss); |
4627 | 4627 |
4628 if (GetCondition() == equal) { | 4628 if (GetCondition() == equal) { |
4629 // For equality we do not care about the sign of the result. | 4629 // For equality we do not care about the sign of the result. |
4630 __ SmiSub(rax, rax, rdx); | 4630 __ subq(rax, rdx); |
4631 } else { | 4631 } else { |
4632 NearLabel done; | 4632 NearLabel done; |
4633 __ SmiSub(rdx, rdx, rax); | 4633 __ subq(rdx, rax); |
4634 __ j(no_overflow, &done); | 4634 __ j(no_overflow, &done); |
4635 // Correct sign of result in case of overflow. | 4635 // Correct sign of result in case of overflow. |
4636 __ SmiNot(rdx, rdx); | 4636 __ SmiNot(rdx, rdx); |
4637 __ bind(&done); | 4637 __ bind(&done); |
4638 __ movq(rax, rdx); | 4638 __ movq(rax, rdx); |
4639 } | 4639 } |
4640 __ ret(0); | 4640 __ ret(0); |
4641 | 4641 |
4642 __ bind(&miss); | 4642 __ bind(&miss); |
4643 GenerateMiss(masm); | 4643 GenerateMiss(masm); |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4781 __ Integer32ToSmi(result, result); | 4781 __ Integer32ToSmi(result, result); |
4782 __ ret(0); | 4782 __ ret(0); |
4783 } | 4783 } |
4784 | 4784 |
4785 | 4785 |
4786 #undef __ | 4786 #undef __ |
4787 | 4787 |
4788 } } // namespace v8::internal | 4788 } } // namespace v8::internal |
4789 | 4789 |
4790 #endif // V8_TARGET_ARCH_X64 | 4790 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |