| OLD | NEW |
| 1 // Copyright 2007-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2007-2008 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 1500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1511 "al", "cl", "dl", "bl", "ah", "ch", "dh", "bh" | 1511 "al", "cl", "dl", "bl", "ah", "ch", "dh", "bh" |
| 1512 }; | 1512 }; |
| 1513 | 1513 |
| 1514 | 1514 |
| 1515 static const char* xmm_regs[8] = { | 1515 static const char* xmm_regs[8] = { |
| 1516 "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7" | 1516 "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7" |
| 1517 }; | 1517 }; |
| 1518 | 1518 |
| 1519 | 1519 |
| 1520 const char* NameConverter::NameOfAddress(byte* addr) const { | 1520 const char* NameConverter::NameOfAddress(byte* addr) const { |
| 1521 static v8::internal::EmbeddedVector<char, 32> tmp_buffer; | 1521 v8::internal::OS::SNPrintF(tmp_buffer_, "%p", addr); |
| 1522 v8::internal::OS::SNPrintF(tmp_buffer, "%p", addr); | 1522 return tmp_buffer_.start(); |
| 1523 return tmp_buffer.start(); | |
| 1524 } | 1523 } |
| 1525 | 1524 |
| 1526 | 1525 |
| 1527 const char* NameConverter::NameOfConstant(byte* addr) const { | 1526 const char* NameConverter::NameOfConstant(byte* addr) const { |
| 1528 return NameOfAddress(addr); | 1527 return NameOfAddress(addr); |
| 1529 } | 1528 } |
| 1530 | 1529 |
| 1531 | 1530 |
| 1532 const char* NameConverter::NameOfCPURegister(int reg) const { | 1531 const char* NameConverter::NameOfCPURegister(int reg) const { |
| 1533 if (0 <= reg && reg < 8) return cpu_regs[reg]; | 1532 if (0 <= reg && reg < 8) return cpu_regs[reg]; |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1592 fprintf(f, " "); | 1591 fprintf(f, " "); |
| 1593 } | 1592 } |
| 1594 fprintf(f, " %s\n", buffer.start()); | 1593 fprintf(f, " %s\n", buffer.start()); |
| 1595 } | 1594 } |
| 1596 } | 1595 } |
| 1597 | 1596 |
| 1598 | 1597 |
| 1599 } // namespace disasm | 1598 } // namespace disasm |
| 1600 | 1599 |
| 1601 #endif // V8_TARGET_ARCH_IA32 | 1600 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |