| 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 917 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 928 (lhs_.is(r1) && rhs_.is(r0))); | 928 (lhs_.is(r1) && rhs_.is(r0))); |
| 929 | 929 |
| 930 Label slow; // Call builtin. | 930 Label slow; // Call builtin. |
| 931 Label not_smis, both_loaded_as_doubles, lhs_not_nan; | 931 Label not_smis, both_loaded_as_doubles, lhs_not_nan; |
| 932 | 932 |
| 933 if (include_smi_compare_) { | 933 if (include_smi_compare_) { |
| 934 Label not_two_smis, smi_done; | 934 Label not_two_smis, smi_done; |
| 935 __ orr(r2, r1, r0); | 935 __ orr(r2, r1, r0); |
| 936 __ tst(r2, Operand(kSmiTagMask)); | 936 __ tst(r2, Operand(kSmiTagMask)); |
| 937 __ b(ne, ¬_two_smis); | 937 __ b(ne, ¬_two_smis); |
| 938 __ sub(r0, r1, r0, SetCC); | 938 __ mov(r1, Operand(r1, ASR, 1)); |
| 939 __ b(vc, &smi_done); | 939 __ sub(r0, r1, Operand(r0, ASR, 1)); |
| 940 // Correct the sign in case of overflow. | |
| 941 __ rsb(r0, r0, Operand(0, RelocInfo::NONE)); | |
| 942 __ bind(&smi_done); | |
| 943 __ Ret(); | 940 __ Ret(); |
| 944 __ bind(¬_two_smis); | 941 __ bind(¬_two_smis); |
| 945 } else if (FLAG_debug_code) { | 942 } else if (FLAG_debug_code) { |
| 946 __ orr(r2, r1, r0); | 943 __ orr(r2, r1, r0); |
| 947 __ tst(r2, Operand(kSmiTagMask)); | 944 __ tst(r2, Operand(kSmiTagMask)); |
| 948 __ Assert(nz, "CompareStub: unexpected smi operands."); | 945 __ Assert(nz, "CompareStub: unexpected smi operands."); |
| 949 } | 946 } |
| 950 | 947 |
| 951 // NOTICE! This code is only reached after a smi-fast-case check, so | 948 // NOTICE! This code is only reached after a smi-fast-case check, so |
| 952 // it is certain that at least one operand isn't a smi. | 949 // it is certain that at least one operand isn't a smi. |
| (...skipping 3774 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4727 __ bind(&string_add_runtime); | 4724 __ bind(&string_add_runtime); |
| 4728 __ TailCallRuntime(Runtime::kStringAdd, 2, 1); | 4725 __ TailCallRuntime(Runtime::kStringAdd, 2, 1); |
| 4729 } | 4726 } |
| 4730 | 4727 |
| 4731 | 4728 |
| 4732 #undef __ | 4729 #undef __ |
| 4733 | 4730 |
| 4734 } } // namespace v8::internal | 4731 } } // namespace v8::internal |
| 4735 | 4732 |
| 4736 #endif // V8_TARGET_ARCH_ARM | 4733 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |