| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 2620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2631 | 2631 |
| 2632 // Compare two smis if required. | 2632 // Compare two smis if required. |
| 2633 if (include_smi_compare_) { | 2633 if (include_smi_compare_) { |
| 2634 Label non_smi, smi_done; | 2634 Label non_smi, smi_done; |
| 2635 __ mov(ecx, Operand(edx)); | 2635 __ mov(ecx, Operand(edx)); |
| 2636 __ or_(ecx, Operand(eax)); | 2636 __ or_(ecx, Operand(eax)); |
| 2637 __ test(ecx, Immediate(kSmiTagMask)); | 2637 __ test(ecx, Immediate(kSmiTagMask)); |
| 2638 __ j(not_zero, &non_smi, not_taken); | 2638 __ j(not_zero, &non_smi, not_taken); |
| 2639 __ sub(edx, Operand(eax)); // Return on the result of the subtraction. | 2639 __ sub(edx, Operand(eax)); // Return on the result of the subtraction. |
| 2640 __ j(no_overflow, &smi_done); | 2640 __ j(no_overflow, &smi_done); |
| 2641 __ neg(edx); // Correct sign in case of overflow. | 2641 __ not_(edx); // Correct sign in case of overflow. edx is never 0 here. |
| 2642 __ bind(&smi_done); | 2642 __ bind(&smi_done); |
| 2643 __ mov(eax, edx); | 2643 __ mov(eax, edx); |
| 2644 __ ret(0); | 2644 __ ret(0); |
| 2645 __ bind(&non_smi); | 2645 __ bind(&non_smi); |
| 2646 } else if (FLAG_debug_code) { | 2646 } else if (FLAG_debug_code) { |
| 2647 __ mov(ecx, Operand(edx)); | 2647 __ mov(ecx, Operand(edx)); |
| 2648 __ or_(ecx, Operand(eax)); | 2648 __ or_(ecx, Operand(eax)); |
| 2649 __ test(ecx, Immediate(kSmiTagMask)); | 2649 __ test(ecx, Immediate(kSmiTagMask)); |
| 2650 __ Assert(not_zero, "Unexpected smi operands."); | 2650 __ Assert(not_zero, "Unexpected smi operands."); |
| 2651 } | 2651 } |
| (...skipping 1998 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4650 // tagged as a small integer. | 4650 // tagged as a small integer. |
| 4651 __ bind(&runtime); | 4651 __ bind(&runtime); |
| 4652 __ TailCallRuntime(Runtime::kStringCompare, 2, 1); | 4652 __ TailCallRuntime(Runtime::kStringCompare, 2, 1); |
| 4653 } | 4653 } |
| 4654 | 4654 |
| 4655 #undef __ | 4655 #undef __ |
| 4656 | 4656 |
| 4657 } } // namespace v8::internal | 4657 } } // namespace v8::internal |
| 4658 | 4658 |
| 4659 #endif // V8_TARGET_ARCH_IA32 | 4659 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |