| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 <math.h> // for isnan. | 5 #include <math.h> // for isnan. |
| 6 #include <setjmp.h> | 6 #include <setjmp.h> |
| 7 #include <stdlib.h> | 7 #include <stdlib.h> |
| 8 | 8 |
| 9 #include "vm/globals.h" | 9 #include "vm/globals.h" |
| 10 #if defined(TARGET_ARCH_ARM64) | 10 #if defined(TARGET_ARCH_ARM64) |
| (...skipping 1303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1314 const int64_t rn_val = get_register(rn, R31IsSP); | 1314 const int64_t rn_val = get_register(rn, R31IsSP); |
| 1315 const uint32_t size = instr->SzField(); | 1315 const uint32_t size = instr->SzField(); |
| 1316 uword address = 0; | 1316 uword address = 0; |
| 1317 uword wb_address = 0; | 1317 uword wb_address = 0; |
| 1318 bool wb = false; | 1318 bool wb = false; |
| 1319 if (instr->Bit(24) == 1) { | 1319 if (instr->Bit(24) == 1) { |
| 1320 // addr = rn + scaled unsigned 12-bit immediate offset. | 1320 // addr = rn + scaled unsigned 12-bit immediate offset. |
| 1321 const uint32_t imm12 = static_cast<uint32_t>(instr->Imm12Field()); | 1321 const uint32_t imm12 = static_cast<uint32_t>(instr->Imm12Field()); |
| 1322 const uint32_t offset = imm12 << size; | 1322 const uint32_t offset = imm12 << size; |
| 1323 address = rn_val + offset; | 1323 address = rn_val + offset; |
| 1324 } else if (instr->Bits(10, 2) == 0) { |
| 1325 // addr = rn + signed 9-bit immediate offset. |
| 1326 wb = false; |
| 1327 const int64_t offset = static_cast<int64_t>(instr->SImm9Field()); |
| 1328 address = rn_val + offset; |
| 1329 wb_address = rn_val; |
| 1324 } else if (instr->Bit(10) == 1) { | 1330 } else if (instr->Bit(10) == 1) { |
| 1325 // addr = rn + signed 9-bit immediate offset. | 1331 // addr = rn + signed 9-bit immediate offset. |
| 1326 wb = true; | 1332 wb = true; |
| 1327 const int64_t offset = static_cast<int64_t>(instr->SImm9Field()); | 1333 const int64_t offset = static_cast<int64_t>(instr->SImm9Field()); |
| 1328 if (instr->Bit(11) == 1) { | 1334 if (instr->Bit(11) == 1) { |
| 1329 // Pre-index. | 1335 // Pre-index. |
| 1330 address = rn_val + offset; | 1336 address = rn_val + offset; |
| 1331 wb_address = address; | 1337 wb_address = address; |
| 1332 } else { | 1338 } else { |
| 1333 // Post-index. | 1339 // Post-index. |
| (...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1996 int64_t return_value; | 2002 int64_t return_value; |
| 1997 return_value = get_register(R0); | 2003 return_value = get_register(R0); |
| 1998 return return_value; | 2004 return return_value; |
| 1999 } | 2005 } |
| 2000 | 2006 |
| 2001 } // namespace dart | 2007 } // namespace dart |
| 2002 | 2008 |
| 2003 #endif // !defined(HOST_ARCH_ARM64) | 2009 #endif // !defined(HOST_ARCH_ARM64) |
| 2004 | 2010 |
| 2005 #endif // defined TARGET_ARCH_ARM64 | 2011 #endif // defined TARGET_ARCH_ARM64 |
| OLD | NEW |