[llvm-commits] CVS: llvm-java/lib/Compiler/Compiler.cpp

Alkis Evlogimenos alkis at cs.uiuc.edu
Wed May 26 20:16:01 PDT 2004


Changes in directory llvm-java/lib/Compiler:

Compiler.cpp updated: 1.33 -> 1.34

---
Log message:

Implement the unary neg.


---
Diffs of the changes:  (+3 -1)

Index: llvm-java/lib/Compiler/Compiler.cpp
diff -u llvm-java/lib/Compiler/Compiler.cpp:1.33 llvm-java/lib/Compiler/Compiler.cpp:1.34
--- llvm-java/lib/Compiler/Compiler.cpp:1.33	Wed May 26 20:04:20 2004
+++ llvm-java/lib/Compiler/Compiler.cpp	Wed May 26 20:13:06 2004
@@ -401,7 +401,9 @@
         }
 
         void do_neg(unsigned bcI) {
-            assert(0 && "not implemented");
+            Value* v1 = opStack_.top(); opStack_.pop();
+            opStack_.push(
+                BinaryOperator::createNeg(v1, TMP, getBBAt(bcI)));
         }
 
         void do_shl(unsigned bcI) {





More information about the llvm-commits mailing list