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

Side by Side Diff: src/arm/disasm-arm.cc

Issue 11428137: ARM: Make use of d16-d31 when available. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years 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
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 // Print the register name according to the active name converter. 185 // Print the register name according to the active name converter.
186 void Decoder::PrintRegister(int reg) { 186 void Decoder::PrintRegister(int reg) {
187 Print(converter_.NameOfCPURegister(reg)); 187 Print(converter_.NameOfCPURegister(reg));
188 } 188 }
189 189
190 // Print the VFP S register name according to the active name converter. 190 // Print the VFP S register name according to the active name converter.
191 void Decoder::PrintSRegister(int reg) { 191 void Decoder::PrintSRegister(int reg) {
192 Print(VFPRegisters::Name(reg, false)); 192 Print(VFPRegisters::Name(reg, false));
193 } 193 }
194 194
195 // Print the VFP D register name according to the active name converter. 195 // Print the VFP D register name according to the active name converter.
196 void Decoder::PrintDRegister(int reg) { 196 void Decoder::PrintDRegister(int reg) {
197 Print(VFPRegisters::Name(reg, true)); 197 Print(VFPRegisters::Name(reg, true));
198 } 198 }
199 199
200 200
201 // These shift names are defined in a way to match the native disassembler 201 // These shift names are defined in a way to match the native disassembler
202 // formatting. See for example the command "objdump -d <binary file>". 202 // formatting. See for example the command "objdump -d <binary file>".
203 static const char* const shift_names[kNumberOfShifts] = { 203 static const char* const shift_names[kNumberOfShifts] = {
204 "lsl", "lsr", "asr", "ror" 204 "lsl", "lsr", "asr", "ror"
205 }; 205 };
(...skipping 1130 matching lines...) Expand 10 before | Expand all | Expand 10 after
1336 } 1336 }
1337 break; 1337 break;
1338 } 1338 }
1339 default: 1339 default:
1340 Unknown(instr); // Not used by V8. 1340 Unknown(instr); // Not used by V8.
1341 } 1341 }
1342 } else if (instr->CoprocessorValue() == 0xB) { 1342 } else if (instr->CoprocessorValue() == 0xB) {
1343 switch (instr->OpcodeValue()) { 1343 switch (instr->OpcodeValue()) {
1344 case 0x2: 1344 case 0x2:
1345 // Load and store double to two GP registers 1345 // Load and store double to two GP registers
1346 if (instr->Bits(7, 4) != 0x1) { 1346 if (instr->Bits(7, 6) != 0 || instr->Bit(4) != 1) {
1347 Unknown(instr); // Not used by V8. 1347 Unknown(instr); // Not used by V8.
1348 } else if (instr->HasL()) { 1348 } else if (instr->HasL()) {
1349 Format(instr, "vmov'cond 'rt, 'rn, 'Dm"); 1349 Format(instr, "vmov'cond 'rt, 'rn, 'Dm");
1350 } else { 1350 } else {
1351 Format(instr, "vmov'cond 'Dm, 'rt, 'rn"); 1351 Format(instr, "vmov'cond 'Dm, 'rt, 'rn");
1352 } 1352 }
1353 break; 1353 break;
1354 case 0x8: 1354 case 0x8:
1355 case 0xA:
1355 if (instr->HasL()) { 1356 if (instr->HasL()) {
1356 Format(instr, "vldr'cond 'Dd, ['rn - 4*'imm08@00]"); 1357 Format(instr, "vldr'cond 'Dd, ['rn - 4*'imm08@00]");
1357 } else { 1358 } else {
1358 Format(instr, "vstr'cond 'Dd, ['rn - 4*'imm08@00]"); 1359 Format(instr, "vstr'cond 'Dd, ['rn - 4*'imm08@00]");
1359 } 1360 }
1360 break; 1361 break;
1361 case 0xC: 1362 case 0xC:
1363 case 0xE:
1362 if (instr->HasL()) { 1364 if (instr->HasL()) {
1363 Format(instr, "vldr'cond 'Dd, ['rn + 4*'imm08@00]"); 1365 Format(instr, "vldr'cond 'Dd, ['rn + 4*'imm08@00]");
1364 } else { 1366 } else {
1365 Format(instr, "vstr'cond 'Dd, ['rn + 4*'imm08@00]"); 1367 Format(instr, "vstr'cond 'Dd, ['rn + 4*'imm08@00]");
1366 } 1368 }
1367 break; 1369 break;
1368 case 0x4: 1370 case 0x4:
1369 case 0x5: 1371 case 0x5:
1370 case 0x9: { 1372 case 0x6:
1373 case 0x7:
1374 case 0x9:
1375 case 0xB: {
1371 bool to_vfp_register = (instr->VLValue() == 0x1); 1376 bool to_vfp_register = (instr->VLValue() == 0x1);
1372 if (to_vfp_register) { 1377 if (to_vfp_register) {
1373 Format(instr, "vldm'cond'pu 'rn'w, {'Dd-'Dd+}"); 1378 Format(instr, "vldm'cond'pu 'rn'w, {'Dd-'Dd+}");
1374 } else { 1379 } else {
1375 Format(instr, "vstm'cond'pu 'rn'w, {'Dd-'Dd+}"); 1380 Format(instr, "vstm'cond'pu 'rn'w, {'Dd-'Dd+}");
1376 } 1381 }
1377 break; 1382 break;
1378 } 1383 }
1379 default: 1384 default:
1380 Unknown(instr); // Not used by V8. 1385 Unknown(instr); // Not used by V8.
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
1534 pc += d.InstructionDecode(buffer, pc); 1539 pc += d.InstructionDecode(buffer, pc);
1535 fprintf(f, "%p %08x %s\n", 1540 fprintf(f, "%p %08x %s\n",
1536 prev_pc, *reinterpret_cast<int32_t*>(prev_pc), buffer.start()); 1541 prev_pc, *reinterpret_cast<int32_t*>(prev_pc), buffer.start());
1537 } 1542 }
1538 } 1543 }
1539 1544
1540 1545
1541 } // namespace disasm 1546 } // namespace disasm
1542 1547
1543 #endif // V8_TARGET_ARCH_ARM 1548 #endif // V8_TARGET_ARCH_ARM
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698