| 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 Register receiver = LoadIC::kReceiverRegister; | 1248 static Register registers[] = { x0, x2, x3, x1, x4, x5 }; |
| 1249 Register name = LoadIC::kNameRegister; | |
| 1250 static Register registers[] = { receiver, name, x3, x1, x4, x5 }; | |
| 1251 return registers; | 1249 return registers; |
| 1252 } | 1250 } |
| 1253 | 1251 |
| 1254 | 1252 |
| 1255 Register* KeyedLoadStubCompiler::registers() { | 1253 Register* KeyedLoadStubCompiler::registers() { |
| 1256 // receiver, name, scratch1, scratch2, scratch3, scratch4. | 1254 // receiver, name/key, scratch1, scratch2, scratch3, scratch4. |
| 1257 Register receiver = KeyedLoadIC::kReceiverRegister; | 1255 static Register registers[] = { x1, x0, x2, x3, x4, x5 }; |
| 1258 Register name = KeyedLoadIC::kNameRegister; | |
| 1259 static Register registers[] = { receiver, name, x2, x3, x4, x5 }; | |
| 1260 return registers; | 1256 return registers; |
| 1261 } | 1257 } |
| 1262 | 1258 |
| 1263 | 1259 |
| 1264 Register StoreStubCompiler::value() { | 1260 Register StoreStubCompiler::value() { |
| 1265 return x0; | 1261 return x0; |
| 1266 } | 1262 } |
| 1267 | 1263 |
| 1268 | 1264 |
| 1269 Register* StoreStubCompiler::registers() { | 1265 Register* StoreStubCompiler::registers() { |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1472 | 1468 |
| 1473 // Miss case, call the runtime. | 1469 // Miss case, call the runtime. |
| 1474 __ Bind(&miss); | 1470 __ Bind(&miss); |
| 1475 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); | 1471 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); |
| 1476 } | 1472 } |
| 1477 | 1473 |
| 1478 | 1474 |
| 1479 } } // namespace v8::internal | 1475 } } // namespace v8::internal |
| 1480 | 1476 |
| 1481 #endif // V8_TARGET_ARCH_ARM64 | 1477 #endif // V8_TARGET_ARCH_ARM64 |
| OLD | NEW |