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 bbce31f..f60a7a2 100644 (file)
@@ -669,6 +669,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 da84b7c..2d19ec0 100644 (file)
@@ -117,6 +117,10 @@ 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);