OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #include <setjmp.h> // NOLINT | 5 #include <setjmp.h> // NOLINT |
6 #include <stdlib.h> | 6 #include <stdlib.h> |
7 | 7 |
8 #include "vm/globals.h" | 8 #include "vm/globals.h" |
9 #if defined(TARGET_ARCH_DBC) | 9 #if defined(TARGET_ARCH_DBC) |
10 | 10 |
(...skipping 1961 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1972 } | 1972 } |
1973 | 1973 |
1974 { | 1974 { |
1975 BYTECODE(LoadIndexedFloat64, A_B_C); | 1975 BYTECODE(LoadIndexedFloat64, A_B_C); |
1976 uint8_t* data = SimulatorHelpers::GetTypedData(FP[rB], FP[rC], 3); | 1976 uint8_t* data = SimulatorHelpers::GetTypedData(FP[rB], FP[rC], 3); |
1977 *reinterpret_cast<uint64_t*>(&FP[rA]) = *reinterpret_cast<uint64_t*>(data); | 1977 *reinterpret_cast<uint64_t*>(&FP[rA]) = *reinterpret_cast<uint64_t*>(data); |
1978 DISPATCH(); | 1978 DISPATCH(); |
1979 } | 1979 } |
1980 | 1980 |
1981 { | 1981 { |
| 1982 BYTECODE(LoadIndexed8Float64, A_B_C); |
| 1983 ASSERT(RawObject::IsTypedDataClassId(FP[rB]->GetClassId())); |
| 1984 RawTypedData* array = reinterpret_cast<RawTypedData*>(FP[rB]); |
| 1985 RawSmi* index = RAW_CAST(Smi, FP[rC]); |
| 1986 ASSERT(SimulatorHelpers::CheckIndex(index, array->ptr()->length_)); |
| 1987 const int64_t value = |
| 1988 reinterpret_cast<int64_t*>(array->ptr()->data())[Smi::Value(index)]; |
| 1989 FP[rA] = reinterpret_cast<RawObject*>(value); |
| 1990 DISPATCH(); |
| 1991 } |
| 1992 |
| 1993 { |
1982 BYTECODE(StoreIndexedFloat64, A_B_C); | 1994 BYTECODE(StoreIndexedFloat64, A_B_C); |
1983 uint8_t* data = SimulatorHelpers::GetTypedData(FP[rA], FP[rB], 3); | 1995 uint8_t* data = SimulatorHelpers::GetTypedData(FP[rA], FP[rB], 3); |
1984 *reinterpret_cast<uint64_t*>(data) = reinterpret_cast<uint64_t>(FP[rC]); | 1996 *reinterpret_cast<uint64_t*>(data) = reinterpret_cast<uint64_t>(FP[rC]); |
1985 DISPATCH(); | 1997 DISPATCH(); |
1986 } | 1998 } |
1987 | 1999 |
1988 { | 2000 { |
| 2001 BYTECODE(StoreIndexed8Float64, A_B_C); |
| 2002 ASSERT(RawObject::IsTypedDataClassId(FP[rA]->GetClassId())); |
| 2003 RawTypedData* array = reinterpret_cast<RawTypedData*>(FP[rA]); |
| 2004 RawSmi* index = RAW_CAST(Smi, FP[rB]); |
| 2005 ASSERT(SimulatorHelpers::CheckIndex(index, array->ptr()->length_)); |
| 2006 const int64_t value = reinterpret_cast<int64_t>(FP[rC]); |
| 2007 reinterpret_cast<int64_t*>(array->ptr()->data())[Smi::Value(index)] = value; |
| 2008 DISPATCH(); |
| 2009 } |
| 2010 |
| 2011 { |
1989 BYTECODE(BoxInt32, A_D); | 2012 BYTECODE(BoxInt32, A_D); |
1990 // Casts sign-extend high 32 bits from low 32 bits. | 2013 // Casts sign-extend high 32 bits from low 32 bits. |
1991 const intptr_t value = reinterpret_cast<intptr_t>(FP[rD]); | 2014 const intptr_t value = reinterpret_cast<intptr_t>(FP[rD]); |
1992 const int32_t value32 = static_cast<int32_t>(value); | 2015 const int32_t value32 = static_cast<int32_t>(value); |
1993 FP[rA] = Smi::New(static_cast<intptr_t>(value32)); | 2016 FP[rA] = Smi::New(static_cast<intptr_t>(value32)); |
1994 DISPATCH(); | 2017 DISPATCH(); |
1995 } | 2018 } |
1996 | 2019 |
1997 { | 2020 { |
1998 BYTECODE(BoxUint32, A_D); | 2021 BYTECODE(BoxUint32, A_D); |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2105 DISPATCH(); | 2128 DISPATCH(); |
2106 } | 2129 } |
2107 | 2130 |
2108 { | 2131 { |
2109 BYTECODE(LoadIndexedFloat64, A_B_C); | 2132 BYTECODE(LoadIndexedFloat64, A_B_C); |
2110 UNREACHABLE(); | 2133 UNREACHABLE(); |
2111 DISPATCH(); | 2134 DISPATCH(); |
2112 } | 2135 } |
2113 | 2136 |
2114 { | 2137 { |
| 2138 BYTECODE(LoadIndexed8Float64, A_B_C); |
| 2139 UNREACHABLE(); |
| 2140 DISPATCH(); |
| 2141 } |
| 2142 |
| 2143 { |
2115 BYTECODE(StoreIndexedFloat64, A_B_C); | 2144 BYTECODE(StoreIndexedFloat64, A_B_C); |
2116 UNREACHABLE(); | 2145 UNREACHABLE(); |
2117 DISPATCH(); | 2146 DISPATCH(); |
2118 } | 2147 } |
2119 | 2148 |
2120 { | 2149 { |
| 2150 BYTECODE(StoreIndexed8Float64, A_B_C); |
| 2151 UNREACHABLE(); |
| 2152 DISPATCH(); |
| 2153 } |
| 2154 |
| 2155 { |
2121 BYTECODE(BoxInt32, A_D); | 2156 BYTECODE(BoxInt32, A_D); |
2122 UNREACHABLE(); | 2157 UNREACHABLE(); |
2123 DISPATCH(); | 2158 DISPATCH(); |
2124 } | 2159 } |
2125 | 2160 |
2126 { | 2161 { |
2127 BYTECODE(BoxUint32, A_D); | 2162 BYTECODE(BoxUint32, A_D); |
2128 UNREACHABLE(); | 2163 UNREACHABLE(); |
2129 DISPATCH(); | 2164 DISPATCH(); |
2130 } | 2165 } |
(...skipping 1060 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3191 pc_ = pc; | 3226 pc_ = pc; |
3192 special_[kExceptionSpecialIndex] = raw_exception; | 3227 special_[kExceptionSpecialIndex] = raw_exception; |
3193 special_[kStacktraceSpecialIndex] = raw_stacktrace; | 3228 special_[kStacktraceSpecialIndex] = raw_stacktrace; |
3194 buf->Longjmp(); | 3229 buf->Longjmp(); |
3195 UNREACHABLE(); | 3230 UNREACHABLE(); |
3196 } | 3231 } |
3197 | 3232 |
3198 } // namespace dart | 3233 } // namespace dart |
3199 | 3234 |
3200 #endif // defined TARGET_ARCH_DBC | 3235 #endif // defined TARGET_ARCH_DBC |
OLD | NEW |