| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 1284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1295 | 1295 |
| 1296 | 1296 |
| 1297 //------------------------------------------------------------------------------ | 1297 //------------------------------------------------------------------------------ |
| 1298 | 1298 |
| 1299 namespace disasm { | 1299 namespace disasm { |
| 1300 | 1300 |
| 1301 namespace v8i = v8::internal; | 1301 namespace v8i = v8::internal; |
| 1302 | 1302 |
| 1303 | 1303 |
| 1304 const char* NameConverter::NameOfAddress(byte* addr) const { | 1304 const char* NameConverter::NameOfAddress(byte* addr) const { |
| 1305 static v8::internal::EmbeddedVector<char, 32> tmp_buffer; | 1305 v8::internal::OS::SNPrintF(tmp_buffer_, "%p", addr); |
| 1306 v8::internal::OS::SNPrintF(tmp_buffer, "%p", addr); | 1306 return tmp_buffer_.start(); |
| 1307 return tmp_buffer.start(); | |
| 1308 } | 1307 } |
| 1309 | 1308 |
| 1310 | 1309 |
| 1311 const char* NameConverter::NameOfConstant(byte* addr) const { | 1310 const char* NameConverter::NameOfConstant(byte* addr) const { |
| 1312 return NameOfAddress(addr); | 1311 return NameOfAddress(addr); |
| 1313 } | 1312 } |
| 1314 | 1313 |
| 1315 | 1314 |
| 1316 const char* NameConverter::NameOfCPURegister(int reg) const { | 1315 const char* NameConverter::NameOfCPURegister(int reg) const { |
| 1317 return assembler::arm::Registers::Name(reg); | 1316 return assembler::arm::Registers::Name(reg); |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1373 pc += d.InstructionDecode(buffer, pc); | 1372 pc += d.InstructionDecode(buffer, pc); |
| 1374 fprintf(f, "%p %08x %s\n", | 1373 fprintf(f, "%p %08x %s\n", |
| 1375 prev_pc, *reinterpret_cast<int32_t*>(prev_pc), buffer.start()); | 1374 prev_pc, *reinterpret_cast<int32_t*>(prev_pc), buffer.start()); |
| 1376 } | 1375 } |
| 1377 } | 1376 } |
| 1378 | 1377 |
| 1379 | 1378 |
| 1380 } // namespace disasm | 1379 } // namespace disasm |
| 1381 | 1380 |
| 1382 #endif // V8_TARGET_ARCH_ARM | 1381 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |