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 1828 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1839 break; | 1839 break; |
1840 case UnaryOpIC::GENERIC: | 1840 case UnaryOpIC::GENERIC: |
1841 GenerateGenericStub(masm); | 1841 GenerateGenericStub(masm); |
1842 break; | 1842 break; |
1843 } | 1843 } |
1844 } | 1844 } |
1845 | 1845 |
1846 | 1846 |
1847 void UnaryOpStub::GenerateTypeTransition(MacroAssembler* masm) { | 1847 void UnaryOpStub::GenerateTypeTransition(MacroAssembler* masm) { |
1848 // Argument is in a0 and v0 at this point, so we can overwrite a0. | 1848 // Argument is in a0 and v0 at this point, so we can overwrite a0. |
1849 // Push this stub's key. Although the operation and the type info are | 1849 __ li(a2, Operand(Smi::FromInt(op_))); |
1850 // encoded into the key, the encoding is opaque, so push them too. | 1850 __ li(a1, Operand(Smi::FromInt(mode_))); |
1851 __ li(a2, Operand(Smi::FromInt(MinorKey()))); | |
1852 __ li(a1, Operand(Smi::FromInt(op_))); | |
1853 __ li(a0, Operand(Smi::FromInt(operand_type_))); | 1851 __ li(a0, Operand(Smi::FromInt(operand_type_))); |
1854 | |
1855 __ Push(v0, a2, a1, a0); | 1852 __ Push(v0, a2, a1, a0); |
1856 | 1853 |
1857 __ TailCallExternalReference( | 1854 __ TailCallExternalReference( |
1858 ExternalReference(IC_Utility(IC::kUnaryOp_Patch), | 1855 ExternalReference(IC_Utility(IC::kUnaryOp_Patch), masm->isolate()), 4, 1); |
1859 masm->isolate()), | |
1860 4, | |
1861 1); | |
1862 } | 1856 } |
1863 | 1857 |
1864 | 1858 |
1865 // TODO(svenpanne): Use virtual functions instead of switch. | 1859 // TODO(svenpanne): Use virtual functions instead of switch. |
1866 void UnaryOpStub::GenerateSmiStub(MacroAssembler* masm) { | 1860 void UnaryOpStub::GenerateSmiStub(MacroAssembler* masm) { |
1867 switch (op_) { | 1861 switch (op_) { |
1868 case Token::SUB: | 1862 case Token::SUB: |
1869 GenerateSmiStubSub(masm); | 1863 GenerateSmiStubSub(masm); |
1870 break; | 1864 break; |
1871 case Token::BIT_NOT: | 1865 case Token::BIT_NOT: |
(...skipping 5014 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6886 __ mov(result, zero_reg); | 6880 __ mov(result, zero_reg); |
6887 __ Ret(); | 6881 __ Ret(); |
6888 } | 6882 } |
6889 | 6883 |
6890 | 6884 |
6891 #undef __ | 6885 #undef __ |
6892 | 6886 |
6893 } } // namespace v8::internal | 6887 } } // namespace v8::internal |
6894 | 6888 |
6895 #endif // V8_TARGET_ARCH_MIPS | 6889 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |