diff options
author | Richard Sandiford <[email protected]> | 2014-07-21 16:53:35 +0100 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2014-09-16 22:16:58 +0100 |
commit | 605734780eec08200c3f82c010a0cc7d39651d8e (patch) | |
tree | c4fae26478e7ff39584da4c7367e880e91ffb6c9 | |
parent | efe8fc687db0140d5aa177fb51c093f81b78b2dc (diff) |
gallivm: Fix uses of 2^24
Fallback cases in lp_bld_arit.c used 2^24 to mean "2 to the power 24",
but in C it's "2 xor 24", i.e. 26. Fixed by using 1<< instead.
Signed-off-by: Richard Sandiford <[email protected]>
Reviewed-by: Roland Scheidegger <[email protected]>
Cc: "10.2 10.3" <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
(cherry picked from commit 1a65629ccc590fe04a97b6df63d73e349b793619)
-rw-r--r-- | src/gallium/auxiliary/gallivm/lp_bld_arit.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_arit.c b/src/gallium/auxiliary/gallivm/lp_bld_arit.c index 3d341442708..6ef0d6af409 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_arit.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_arit.c @@ -1850,7 +1850,7 @@ lp_build_trunc(struct lp_build_context *bld, const struct lp_type type = bld->type; struct lp_type inttype; struct lp_build_context intbld; - LLVMValueRef cmpval = lp_build_const_vec(bld->gallivm, type, 2^24); + LLVMValueRef cmpval = lp_build_const_vec(bld->gallivm, type, 1<<24); LLVMValueRef trunc, res, anosign, mask; LLVMTypeRef int_vec_type = bld->int_vec_type; LLVMTypeRef vec_type = bld->vec_type; @@ -1905,7 +1905,7 @@ lp_build_round(struct lp_build_context *bld, const struct lp_type type = bld->type; struct lp_type inttype; struct lp_build_context intbld; - LLVMValueRef cmpval = lp_build_const_vec(bld->gallivm, type, 2^24); + LLVMValueRef cmpval = lp_build_const_vec(bld->gallivm, type, 1<<24); LLVMValueRef res, anosign, mask; LLVMTypeRef int_vec_type = bld->int_vec_type; LLVMTypeRef vec_type = bld->vec_type; @@ -1958,7 +1958,7 @@ lp_build_floor(struct lp_build_context *bld, const struct lp_type type = bld->type; struct lp_type inttype; struct lp_build_context intbld; - LLVMValueRef cmpval = lp_build_const_vec(bld->gallivm, type, 2^24); + LLVMValueRef cmpval = lp_build_const_vec(bld->gallivm, type, 1<<24); LLVMValueRef trunc, res, anosign, mask; LLVMTypeRef int_vec_type = bld->int_vec_type; LLVMTypeRef vec_type = bld->vec_type; @@ -2027,7 +2027,7 @@ lp_build_ceil(struct lp_build_context *bld, const struct lp_type type = bld->type; struct lp_type inttype; struct lp_build_context intbld; - LLVMValueRef cmpval = lp_build_const_vec(bld->gallivm, type, 2^24); + LLVMValueRef cmpval = lp_build_const_vec(bld->gallivm, type, 1<<24); LLVMValueRef trunc, res, anosign, mask, tmp; LLVMTypeRef int_vec_type = bld->int_vec_type; LLVMTypeRef vec_type = bld->vec_type; |