gallivm: added lp_build_negate()
authorBrian Paul <brianp@vmware.com>
Thu, 4 Mar 2010 15:36:26 +0000 (08:36 -0700)
committerBrian Paul <brianp@vmware.com>
Thu, 4 Mar 2010 17:53:26 +0000 (10:53 -0700)
src/gallium/auxiliary/gallivm/lp_bld_arit.c
src/gallium/auxiliary/gallivm/lp_bld_arit.h

index bbce31f9eb20ee7870c767d913b759570719bea1..f60a7a213accc1aa88f965a02d1e7de076551108 100644 (file)
@@ -668,6 +668,14 @@ lp_build_abs(struct lp_build_context *bld,
 }
 
 
+LLVMValueRef
+lp_build_negate(struct lp_build_context *bld,
+                LLVMValueRef a)
+{
+   return LLVMBuildNeg(bld->builder, a, "");
+}
+
+
 LLVMValueRef
 lp_build_sgn(struct lp_build_context *bld,
              LLVMValueRef a)
index da84b7ca02db061ca5c79ced23f4a9c805464c32..2d19ec06b4348d7f6d258bd22a58380347eb7836 100644 (file)
@@ -116,6 +116,10 @@ LLVMValueRef
 lp_build_abs(struct lp_build_context *bld,
              LLVMValueRef a);
 
+LLVMValueRef
+lp_build_negate(struct lp_build_context *bld,
+                LLVMValueRef a);
+
 LLVMValueRef
 lp_build_sgn(struct lp_build_context *bld,
              LLVMValueRef a);