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

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

Issue 242983006: Adds load/store from signed unscaled 9-bit offset w/ no writeback. (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/assembler_arm64_test.cc ('k') | runtime/vm/simulator_arm64.cc » ('j') | 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 "vm/disassembler.h" 5 #include "vm/disassembler.h"
6 6
7 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM64. 7 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM64.
8 #if defined(TARGET_ARCH_ARM64) 8 #if defined(TARGET_ARCH_ARM64)
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 10
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 PrintRegister(rn, R31IsSP); 188 PrintRegister(rn, R31IsSP);
189 if (off != 0) { 189 if (off != 0) {
190 buffer_pos_ += OS::SNPrint(current_position_in_buffer(), 190 buffer_pos_ += OS::SNPrint(current_position_in_buffer(),
191 remaining_size_in_buffer(), 191 remaining_size_in_buffer(),
192 ", #%d", 192 ", #%d",
193 off); 193 off);
194 } 194 }
195 Print("]"); 195 Print("]");
196 } else { 196 } else {
197 switch (instr->Bits(10, 2)) { 197 switch (instr->Bits(10, 2)) {
198 case 0: {
199 // rn + signed 9-bit immediate, pre-index, no writeback.
200 const int32_t imm9 = instr->SImm9Field();
201 Print("[");
202 PrintRegister(rn, R31IsSP);
203 buffer_pos_ += OS::SNPrint(current_position_in_buffer(),
204 remaining_size_in_buffer(),
205 ", #%d",
206 imm9);
207 Print("]");
208 break;
209 }
198 case 1: { 210 case 1: {
199 const int32_t imm9 = instr->SImm9Field(); 211 const int32_t imm9 = instr->SImm9Field();
200 // rn + signed 9-bit immediate, post-index, writeback. 212 // rn + signed 9-bit immediate, post-index, writeback.
201 Print("["); 213 Print("[");
202 PrintRegister(rn, R31IsSP); 214 PrintRegister(rn, R31IsSP);
203 Print("]"); 215 Print("]");
204 buffer_pos_ += OS::SNPrint(current_position_in_buffer(), 216 buffer_pos_ += OS::SNPrint(current_position_in_buffer(),
205 remaining_size_in_buffer(), 217 remaining_size_in_buffer(),
206 ", #%d !", 218 ", #%d !",
207 imm9); 219 imm9);
208 break; 220 break;
209 } 221 }
210 case 3: { 222 case 3: {
211 const int32_t imm9 = instr->SImm9Field(); 223 const int32_t imm9 = instr->SImm9Field();
212 // rn + signed 9-bit immediate, pre-index, writeback. 224 // rn + signed 9-bit immediate, pre-index, writeback.
213 Print("["); 225 Print("[");
214 PrintRegister(rn, R31IsSP); 226 PrintRegister(rn, R31IsSP);
215 buffer_pos_ += OS::SNPrint(current_position_in_buffer(), 227 buffer_pos_ += OS::SNPrint(current_position_in_buffer(),
216 remaining_size_in_buffer(), 228 remaining_size_in_buffer(),
217 ", #%d", 229 ", #%d",
218 imm9); 230 imm9);
219 Print("] !"); 231 Print("] !");
220 break; 232 break;
221 } 233 }
222 case 2: { 234 case 2: {
regis 2014/04/21 16:29:11 Should you move this case 2 before case 3?
zra 2014/04/21 20:30:32 Done.
223 const Register rm = instr->RmField(); 235 const Register rm = instr->RmField();
224 const Extend ext = instr->ExtendTypeField(); 236 const Extend ext = instr->ExtendTypeField();
225 const int s = instr->Bit(12); 237 const int s = instr->Bit(12);
226 Print("["); 238 Print("[");
227 PrintRegister(rn, R31IsSP); 239 PrintRegister(rn, R31IsSP);
228 Print(", "); 240 Print(", ");
229 PrintRegister(rm, R31IsZR); 241 PrintRegister(rm, R31IsZR);
230 buffer_pos_ += OS::SNPrint(current_position_in_buffer(), 242 buffer_pos_ += OS::SNPrint(current_position_in_buffer(),
231 remaining_size_in_buffer(), 243 remaining_size_in_buffer(),
232 " %s", 244 " %s",
(...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after
919 human_buffer, 931 human_buffer,
920 sizeof(human_buffer), 932 sizeof(human_buffer),
921 pc); 933 pc);
922 pc += instruction_length; 934 pc += instruction_length;
923 } 935 }
924 } 936 }
925 937
926 } // namespace dart 938 } // namespace dart
927 939
928 #endif // defined TARGET_ARCH_ARM 940 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « runtime/vm/assembler_arm64_test.cc ('k') | runtime/vm/simulator_arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698