OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_ARM64 | 7 #if V8_TARGET_ARCH_ARM64 |
8 | 8 |
9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
10 #include "src/ic-inl.h" | 10 #include "src/ic-inl.h" |
(...skipping 1227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1238 | 1238 |
1239 | 1239 |
1240 // TODO(all): The so-called scratch registers are significant in some cases. For | 1240 // TODO(all): The so-called scratch registers are significant in some cases. For |
1241 // example, KeyedStoreStubCompiler::registers()[3] (x3) is actually used for | 1241 // example, KeyedStoreStubCompiler::registers()[3] (x3) is actually used for |
1242 // KeyedStoreCompiler::transition_map(). We should verify which registers are | 1242 // KeyedStoreCompiler::transition_map(). We should verify which registers are |
1243 // actually scratch registers, and which are important. For now, we use the same | 1243 // actually scratch registers, and which are important. For now, we use the same |
1244 // assignments as ARM to remain on the safe side. | 1244 // assignments as ARM to remain on the safe side. |
1245 | 1245 |
1246 Register* LoadStubCompiler::registers() { | 1246 Register* LoadStubCompiler::registers() { |
1247 // receiver, name, scratch1, scratch2, scratch3, scratch4. | 1247 // receiver, name, scratch1, scratch2, scratch3, scratch4. |
1248 static Register registers[] = { x0, x2, x3, x1, x4, x5 }; | 1248 Register receiver = LoadIC::ReceiverRegister(); |
| 1249 Register name = LoadIC::NameRegister(); |
| 1250 static Register registers[] = { receiver, name, x3, x1, x4, x5 }; |
1249 return registers; | 1251 return registers; |
1250 } | 1252 } |
1251 | 1253 |
1252 | 1254 |
1253 Register* KeyedLoadStubCompiler::registers() { | 1255 Register* KeyedLoadStubCompiler::registers() { |
1254 // receiver, name/key, scratch1, scratch2, scratch3, scratch4. | 1256 // receiver, name, scratch1, scratch2, scratch3, scratch4. |
1255 static Register registers[] = { x1, x0, x2, x3, x4, x5 }; | 1257 Register receiver = KeyedLoadIC::ReceiverRegister(); |
| 1258 Register name = KeyedLoadIC::NameRegister(); |
| 1259 static Register registers[] = { receiver, name, x2, x3, x4, x5 }; |
1256 return registers; | 1260 return registers; |
1257 } | 1261 } |
1258 | 1262 |
1259 | 1263 |
1260 Register StoreStubCompiler::value() { | 1264 Register StoreStubCompiler::value() { |
1261 return x0; | 1265 return x0; |
1262 } | 1266 } |
1263 | 1267 |
1264 | 1268 |
1265 Register* StoreStubCompiler::registers() { | 1269 Register* StoreStubCompiler::registers() { |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1468 | 1472 |
1469 // Miss case, call the runtime. | 1473 // Miss case, call the runtime. |
1470 __ Bind(&miss); | 1474 __ Bind(&miss); |
1471 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); | 1475 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); |
1472 } | 1476 } |
1473 | 1477 |
1474 | 1478 |
1475 } } // namespace v8::internal | 1479 } } // namespace v8::internal |
1476 | 1480 |
1477 #endif // V8_TARGET_ARCH_ARM64 | 1481 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |