| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/crankshaft/s390/lithium-s390.h" | 5 #include "src/crankshaft/s390/lithium-s390.h" |
| 6 | 6 |
| 7 #include <sstream> | 7 #include <sstream> |
| 8 | 8 |
| 9 #include "src/crankshaft/hydrogen-osr.h" | 9 #include "src/crankshaft/hydrogen-osr.h" |
| 10 #include "src/crankshaft/lithium-inl.h" | 10 #include "src/crankshaft/lithium-inl.h" |
| (...skipping 1796 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1807 } else { | 1807 } else { |
| 1808 UNREACHABLE(); | 1808 UNREACHABLE(); |
| 1809 return NULL; | 1809 return NULL; |
| 1810 } | 1810 } |
| 1811 } | 1811 } |
| 1812 | 1812 |
| 1813 LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) { | 1813 LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) { |
| 1814 LOperand* context = UseFixed(instr->context(), cp); | 1814 LOperand* context = UseFixed(instr->context(), cp); |
| 1815 LOperand* global_object = | 1815 LOperand* global_object = |
| 1816 UseFixed(instr->global_object(), LoadDescriptor::ReceiverRegister()); | 1816 UseFixed(instr->global_object(), LoadDescriptor::ReceiverRegister()); |
| 1817 LOperand* vector = NULL; | 1817 LOperand* vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister()); |
| 1818 if (instr->HasVectorAndSlot()) { | |
| 1819 vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister()); | |
| 1820 } | |
| 1821 LLoadGlobalGeneric* result = | 1818 LLoadGlobalGeneric* result = |
| 1822 new (zone()) LLoadGlobalGeneric(context, global_object, vector); | 1819 new (zone()) LLoadGlobalGeneric(context, global_object, vector); |
| 1823 return MarkAsCall(DefineFixed(result, r2), instr); | 1820 return MarkAsCall(DefineFixed(result, r2), instr); |
| 1824 } | 1821 } |
| 1825 | 1822 |
| 1826 LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) { | 1823 LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) { |
| 1827 LOperand* context = UseRegisterAtStart(instr->value()); | 1824 LOperand* context = UseRegisterAtStart(instr->value()); |
| 1828 LInstruction* result = | 1825 LInstruction* result = |
| 1829 DefineAsRegister(new (zone()) LLoadContextSlot(context)); | 1826 DefineAsRegister(new (zone()) LLoadContextSlot(context)); |
| 1830 if (instr->RequiresHoleCheck() && instr->DeoptimizesOnHole()) { | 1827 if (instr->RequiresHoleCheck() && instr->DeoptimizesOnHole()) { |
| (...skipping 21 matching lines...) Expand all Loading... |
| 1852 | 1849 |
| 1853 LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) { | 1850 LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) { |
| 1854 LOperand* obj = UseRegisterAtStart(instr->object()); | 1851 LOperand* obj = UseRegisterAtStart(instr->object()); |
| 1855 return DefineAsRegister(new (zone()) LLoadNamedField(obj)); | 1852 return DefineAsRegister(new (zone()) LLoadNamedField(obj)); |
| 1856 } | 1853 } |
| 1857 | 1854 |
| 1858 LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) { | 1855 LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) { |
| 1859 LOperand* context = UseFixed(instr->context(), cp); | 1856 LOperand* context = UseFixed(instr->context(), cp); |
| 1860 LOperand* object = | 1857 LOperand* object = |
| 1861 UseFixed(instr->object(), LoadDescriptor::ReceiverRegister()); | 1858 UseFixed(instr->object(), LoadDescriptor::ReceiverRegister()); |
| 1862 LOperand* vector = NULL; | 1859 LOperand* vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister()); |
| 1863 if (instr->HasVectorAndSlot()) { | |
| 1864 vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister()); | |
| 1865 } | |
| 1866 | 1860 |
| 1867 LInstruction* result = | 1861 LInstruction* result = |
| 1868 DefineFixed(new (zone()) LLoadNamedGeneric(context, object, vector), r2); | 1862 DefineFixed(new (zone()) LLoadNamedGeneric(context, object, vector), r2); |
| 1869 return MarkAsCall(result, instr); | 1863 return MarkAsCall(result, instr); |
| 1870 } | 1864 } |
| 1871 | 1865 |
| 1872 LInstruction* LChunkBuilder::DoLoadFunctionPrototype( | 1866 LInstruction* LChunkBuilder::DoLoadFunctionPrototype( |
| 1873 HLoadFunctionPrototype* instr) { | 1867 HLoadFunctionPrototype* instr) { |
| 1874 return AssignEnvironment(DefineAsRegister( | 1868 return AssignEnvironment(DefineAsRegister( |
| 1875 new (zone()) LLoadFunctionPrototype(UseRegister(instr->function())))); | 1869 new (zone()) LLoadFunctionPrototype(UseRegister(instr->function())))); |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1921 result = AssignEnvironment(result); | 1915 result = AssignEnvironment(result); |
| 1922 } | 1916 } |
| 1923 return result; | 1917 return result; |
| 1924 } | 1918 } |
| 1925 | 1919 |
| 1926 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { | 1920 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { |
| 1927 LOperand* context = UseFixed(instr->context(), cp); | 1921 LOperand* context = UseFixed(instr->context(), cp); |
| 1928 LOperand* object = | 1922 LOperand* object = |
| 1929 UseFixed(instr->object(), LoadDescriptor::ReceiverRegister()); | 1923 UseFixed(instr->object(), LoadDescriptor::ReceiverRegister()); |
| 1930 LOperand* key = UseFixed(instr->key(), LoadDescriptor::NameRegister()); | 1924 LOperand* key = UseFixed(instr->key(), LoadDescriptor::NameRegister()); |
| 1931 LOperand* vector = NULL; | 1925 LOperand* vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister()); |
| 1932 if (instr->HasVectorAndSlot()) { | |
| 1933 vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister()); | |
| 1934 } | |
| 1935 | 1926 |
| 1936 LInstruction* result = DefineFixed( | 1927 LInstruction* result = DefineFixed( |
| 1937 new (zone()) LLoadKeyedGeneric(context, object, key, vector), r2); | 1928 new (zone()) LLoadKeyedGeneric(context, object, key, vector), r2); |
| 1938 return MarkAsCall(result, instr); | 1929 return MarkAsCall(result, instr); |
| 1939 } | 1930 } |
| 1940 | 1931 |
| 1941 LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) { | 1932 LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) { |
| 1942 if (!instr->is_fixed_typed_array()) { | 1933 if (!instr->is_fixed_typed_array()) { |
| 1943 DCHECK(instr->elements()->representation().IsTagged()); | 1934 DCHECK(instr->elements()->representation().IsTagged()); |
| 1944 bool needs_write_barrier = instr->NeedsWriteBarrier(); | 1935 bool needs_write_barrier = instr->NeedsWriteBarrier(); |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1981 LOperand* context = UseFixed(instr->context(), cp); | 1972 LOperand* context = UseFixed(instr->context(), cp); |
| 1982 LOperand* obj = | 1973 LOperand* obj = |
| 1983 UseFixed(instr->object(), StoreDescriptor::ReceiverRegister()); | 1974 UseFixed(instr->object(), StoreDescriptor::ReceiverRegister()); |
| 1984 LOperand* key = UseFixed(instr->key(), StoreDescriptor::NameRegister()); | 1975 LOperand* key = UseFixed(instr->key(), StoreDescriptor::NameRegister()); |
| 1985 LOperand* val = UseFixed(instr->value(), StoreDescriptor::ValueRegister()); | 1976 LOperand* val = UseFixed(instr->value(), StoreDescriptor::ValueRegister()); |
| 1986 | 1977 |
| 1987 DCHECK(instr->object()->representation().IsTagged()); | 1978 DCHECK(instr->object()->representation().IsTagged()); |
| 1988 DCHECK(instr->key()->representation().IsTagged()); | 1979 DCHECK(instr->key()->representation().IsTagged()); |
| 1989 DCHECK(instr->value()->representation().IsTagged()); | 1980 DCHECK(instr->value()->representation().IsTagged()); |
| 1990 | 1981 |
| 1991 LOperand* slot = NULL; | 1982 LOperand* slot = FixedTemp(VectorStoreICDescriptor::SlotRegister()); |
| 1992 LOperand* vector = NULL; | 1983 LOperand* vector = FixedTemp(VectorStoreICDescriptor::VectorRegister()); |
| 1993 if (instr->HasVectorAndSlot()) { | |
| 1994 slot = FixedTemp(VectorStoreICDescriptor::SlotRegister()); | |
| 1995 vector = FixedTemp(VectorStoreICDescriptor::VectorRegister()); | |
| 1996 } | |
| 1997 | 1984 |
| 1998 LStoreKeyedGeneric* result = | 1985 LStoreKeyedGeneric* result = |
| 1999 new (zone()) LStoreKeyedGeneric(context, obj, key, val, slot, vector); | 1986 new (zone()) LStoreKeyedGeneric(context, obj, key, val, slot, vector); |
| 2000 return MarkAsCall(result, instr); | 1987 return MarkAsCall(result, instr); |
| 2001 } | 1988 } |
| 2002 | 1989 |
| 2003 LInstruction* LChunkBuilder::DoTransitionElementsKind( | 1990 LInstruction* LChunkBuilder::DoTransitionElementsKind( |
| 2004 HTransitionElementsKind* instr) { | 1991 HTransitionElementsKind* instr) { |
| 2005 if (IsSimpleMapChangeTransition(instr->from_kind(), instr->to_kind())) { | 1992 if (IsSimpleMapChangeTransition(instr->from_kind(), instr->to_kind())) { |
| 2006 LOperand* object = UseRegister(instr->object()); | 1993 LOperand* object = UseRegister(instr->object()); |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2069 LOperand* temp = needs_write_barrier_for_map ? TempRegister() : NULL; | 2056 LOperand* temp = needs_write_barrier_for_map ? TempRegister() : NULL; |
| 2070 | 2057 |
| 2071 return new (zone()) LStoreNamedField(obj, val, temp); | 2058 return new (zone()) LStoreNamedField(obj, val, temp); |
| 2072 } | 2059 } |
| 2073 | 2060 |
| 2074 LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) { | 2061 LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) { |
| 2075 LOperand* context = UseFixed(instr->context(), cp); | 2062 LOperand* context = UseFixed(instr->context(), cp); |
| 2076 LOperand* obj = | 2063 LOperand* obj = |
| 2077 UseFixed(instr->object(), StoreDescriptor::ReceiverRegister()); | 2064 UseFixed(instr->object(), StoreDescriptor::ReceiverRegister()); |
| 2078 LOperand* val = UseFixed(instr->value(), StoreDescriptor::ValueRegister()); | 2065 LOperand* val = UseFixed(instr->value(), StoreDescriptor::ValueRegister()); |
| 2079 LOperand* slot = NULL; | 2066 LOperand* slot = FixedTemp(VectorStoreICDescriptor::SlotRegister()); |
| 2080 LOperand* vector = NULL; | 2067 LOperand* vector = FixedTemp(VectorStoreICDescriptor::VectorRegister()); |
| 2081 if (instr->HasVectorAndSlot()) { | |
| 2082 slot = FixedTemp(VectorStoreICDescriptor::SlotRegister()); | |
| 2083 vector = FixedTemp(VectorStoreICDescriptor::VectorRegister()); | |
| 2084 } | |
| 2085 | |
| 2086 LStoreNamedGeneric* result = | 2068 LStoreNamedGeneric* result = |
| 2087 new (zone()) LStoreNamedGeneric(context, obj, val, slot, vector); | 2069 new (zone()) LStoreNamedGeneric(context, obj, val, slot, vector); |
| 2088 return MarkAsCall(result, instr); | 2070 return MarkAsCall(result, instr); |
| 2089 } | 2071 } |
| 2090 | 2072 |
| 2091 LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) { | 2073 LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) { |
| 2092 LOperand* context = UseFixed(instr->context(), cp); | 2074 LOperand* context = UseFixed(instr->context(), cp); |
| 2093 LOperand* left = UseFixed(instr->left(), r3); | 2075 LOperand* left = UseFixed(instr->left(), r3); |
| 2094 LOperand* right = UseFixed(instr->right(), r2); | 2076 LOperand* right = UseFixed(instr->right(), r2); |
| 2095 return MarkAsCall( | 2077 return MarkAsCall( |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2276 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2258 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
| 2277 LOperand* object = UseRegister(instr->object()); | 2259 LOperand* object = UseRegister(instr->object()); |
| 2278 LOperand* index = UseTempRegister(instr->index()); | 2260 LOperand* index = UseTempRegister(instr->index()); |
| 2279 LLoadFieldByIndex* load = new (zone()) LLoadFieldByIndex(object, index); | 2261 LLoadFieldByIndex* load = new (zone()) LLoadFieldByIndex(object, index); |
| 2280 LInstruction* result = DefineSameAsFirst(load); | 2262 LInstruction* result = DefineSameAsFirst(load); |
| 2281 return AssignPointerMap(result); | 2263 return AssignPointerMap(result); |
| 2282 } | 2264 } |
| 2283 | 2265 |
| 2284 } // namespace internal | 2266 } // namespace internal |
| 2285 } // namespace v8 | 2267 } // namespace v8 |
| OLD | NEW |