[llvm-commits] CVS: llvm-java/lib/Compiler/Compiler.cpp BasicBlockBuilder.h
Alkis Evlogimenos
alkis at cs.uiuc.edu
Fri Feb 4 11:53:02 PST 2005
Changes in directory llvm-java/lib/Compiler:
Compiler.cpp updated: 1.215 -> 1.216
BasicBlockBuilder.h updated: 1.4 -> 1.5
---
Log message:
Pass the return address to the do_jsr call when parsing the
bytecode.
Modify the basic block builder to build basic blocks for jsr/rets as
well.
On a jsr push a dummy value on the operand stack so that we have a
valid operand stack.
---
Diffs of the changes: (+11 -7)
BasicBlockBuilder.h | 5 +++++
Compiler.cpp | 13 ++++++-------
2 files changed, 11 insertions(+), 7 deletions(-)
Index: llvm-java/lib/Compiler/Compiler.cpp
diff -u llvm-java/lib/Compiler/Compiler.cpp:1.215 llvm-java/lib/Compiler/Compiler.cpp:1.216
--- llvm-java/lib/Compiler/Compiler.cpp:1.215 Fri Feb 4 00:36:22 2005
+++ llvm-java/lib/Compiler/Compiler.cpp Fri Feb 4 13:52:50 2005
@@ -1938,14 +1938,13 @@
new ReturnInst(NULL, currentBB_);
}
- void do_jsr(unsigned target) {
- // assert(0 && "not implemented");
- std::cerr << "WARNING: jsr is not implemented and ignored!\n";
+ void do_jsr(unsigned target, unsigned retAddress) {
+ // FIXME: this is currently a noop.
+ push(llvm::Constant::getNullValue(Type::IntTy));
}
void do_ret(unsigned index) {
- // assert(0 && "not implemented");
- std::cerr << "WARNING: ret is not implemented and ignored!\n";
+ // FIXME: this is currently a noop.
}
void do_switch(unsigned defTarget, const SwitchCases& sw) {
@@ -2357,12 +2356,12 @@
}
void do_monitorenter() {
- // FIXME: This is currently a noop
+ // FIXME: This is currently a noop.
pop(ObjectBaseRefTy);
}
void do_monitorexit() {
- // FIXME: This is currently a noop
+ // FIXME: This is currently a noop.
pop(ObjectBaseRefTy);
}
Index: llvm-java/lib/Compiler/BasicBlockBuilder.h
diff -u llvm-java/lib/Compiler/BasicBlockBuilder.h:1.4 llvm-java/lib/Compiler/BasicBlockBuilder.h:1.5
--- llvm-java/lib/Compiler/BasicBlockBuilder.h:1.4 Thu Feb 3 16:37:32 2005
+++ llvm-java/lib/Compiler/BasicBlockBuilder.h Fri Feb 4 13:52:50 2005
@@ -156,6 +156,11 @@
getOrCreateBasicBlockAt(f);
}
+ void do_jsr(unsigned t, unsigned r) {
+ getOrCreateBasicBlockAt(t);
+ getOrCreateBasicBlockAt(r);
+ }
+
void do_switch(unsigned defTarget, const SwitchCases& sw) {
for (unsigned i = 0, e = sw.size(); i != e; ++i) {
unsigned target = sw[i].second;
More information about the llvm-commits
mailing list