Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(100)

Side by Side Diff: runtime/vm/simulator_arm64.cc

Issue 239303008: Adds object pool, LoadImmediate, and LoadObject to ARM64. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/object_test.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 854 matching lines...) Expand 10 before | Expand all | Expand 10 after
865 } 865 }
866 } 866 }
867 867
868 // Do writeback. 868 // Do writeback.
869 if (wb) { 869 if (wb) {
870 set_register(rn, wb_address, R31IsSP); 870 set_register(rn, wb_address, R31IsSP);
871 } 871 }
872 } 872 }
873 873
874 874
875 void Simulator::DecodeLoadRegLiteral(Instr* instr) {
876 if ((instr->Bit(31) != 0) || (instr->Bit(29) != 0) ||
877 (instr->Bits(24, 3) != 0)) {
878 UnimplementedInstruction(instr);
879 }
880
881 const Register rt = instr->RtField();
882 const int64_t off = instr->SImm19Field() << 2;
883 const int64_t pc = reinterpret_cast<int64_t>(instr);
884 const int64_t address = pc + off;
885 const int64_t val = ReadX(address, instr);
886 if (instr->Bit(30)) {
887 // Format(instr, "ldrx 'rt, 'pcldr");
888 set_register(rt, val, R31IsZR);
889 } else {
890 // Format(instr, "ldrw 'rt, 'pcldr");
891 set_wregister(rt, static_cast<int32_t>(val), R31IsZR);
892 }
893 }
894
895
875 void Simulator::DecodeLoadStore(Instr* instr) { 896 void Simulator::DecodeLoadStore(Instr* instr) {
876 if (instr->IsLoadStoreRegOp()) { 897 if (instr->IsLoadStoreRegOp()) {
877 DecodeLoadStoreReg(instr); 898 DecodeLoadStoreReg(instr);
899 } else if (instr->IsLoadRegLiteralOp()) {
900 DecodeLoadRegLiteral(instr);
878 } else { 901 } else {
879 UnimplementedInstruction(instr); 902 UnimplementedInstruction(instr);
880 } 903 }
881 } 904 }
882 905
883 906
884 int64_t Simulator::ShiftOperand(uint8_t reg_size, 907 int64_t Simulator::ShiftOperand(uint8_t reg_size,
885 int64_t value, 908 int64_t value,
886 Shift shift_type, 909 Shift shift_type,
887 uint8_t amount) { 910 uint8_t amount) {
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after
1400 int64_t return_value; 1423 int64_t return_value;
1401 return_value = get_register(R0); 1424 return_value = get_register(R0);
1402 return return_value; 1425 return return_value;
1403 } 1426 }
1404 1427
1405 } // namespace dart 1428 } // namespace dart
1406 1429
1407 #endif // !defined(HOST_ARCH_ARM64) 1430 #endif // !defined(HOST_ARCH_ARM64)
1408 1431
1409 #endif // defined TARGET_ARCH_ARM64 1432 #endif // defined TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « runtime/vm/object_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698