From: Brian Paul Date: Thu, 4 Mar 2010 15:36:26 +0000 (-0700) Subject: gallivm: added lp_build_negate() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7d230dae70e8caa67cc6bd7501f892d44c40a5d4;p=mesa.git gallivm: added lp_build_negate() --- diff --git a/src/gallium/auxiliary/gallivm/lp_bld_arit.c b/src/gallium/auxiliary/gallivm/lp_bld_arit.c index bbce31f9eb2..f60a7a213ac 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_arit.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_arit.c @@ -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) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_arit.h b/src/gallium/auxiliary/gallivm/lp_bld_arit.h index da84b7ca02d..2d19ec06b43 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_arit.h +++ b/src/gallium/auxiliary/gallivm/lp_bld_arit.h @@ -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);