[llvm-commits] CVS: llvm/tools/jello/jello.cpp
Chris Lattner
lattner at cs.uiuc.edu
Tue Dec 3 00:10:02 PST 2002
Changes in directory llvm/tools/jello:
jello.cpp updated: 1.5 -> 1.6
---
Log message:
Implement trivially simple debugger for MachineCodeEmitter interface
---
Diffs of the changes:
Index: llvm/tools/jello/jello.cpp
diff -u llvm/tools/jello/jello.cpp:1.5 llvm/tools/jello/jello.cpp:1.6
--- llvm/tools/jello/jello.cpp:1.5 Mon Dec 2 15:22:04 2002
+++ llvm/tools/jello/jello.cpp Tue Dec 3 00:09:26 2002
@@ -18,10 +18,23 @@
#include "llvm/CodeGen/MachineCodeEmitter.h"
-
+#include "llvm/CodeGen/MachineFunction.h"
struct JelloMachineCodeEmitter : public MachineCodeEmitter {
+ void startFunction(MachineFunction &F) {
+ std::cout << "\n**** Writing machine code for function: "
+ << F.getFunction()->getName() << "\n";
+ }
+ void startBasicBlock(MachineBasicBlock &BB) {
+ std::cout << "\n--- Basic Block: " << BB.getBasicBlock()->getName() << "\n";
+ }
+ void emitByte(unsigned char B) {
+ std::cout << "0x" << std::hex << (unsigned int)B << std::dec << " ";
+ }
+ void emitPCRelativeDisp(Value *V) {
+ std::cout << "<" << V->getName() << ": 0x00 0x00 0x00 0x00> ";
+ }
};
More information about the llvm-commits
mailing list