From 709e57ae4f12ea16020993e6afa88edd5bed5908 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Wed, 1 Dec 2010 11:21:17 +0800 Subject: [PATCH] llvmpipe: Fix build errors on x86. The errors were introduced by efc82aef35a2aac5d2ed9774f6d28f2626796416. --- src/gallium/drivers/llvmpipe/lp_state_setup.c | 7 ++++--- src/gallium/drivers/llvmpipe/lp_test_sincos.c | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/gallium/drivers/llvmpipe/lp_state_setup.c b/src/gallium/drivers/llvmpipe/lp_state_setup.c index ec3fdcadf4b..ad751b9ef42 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_setup.c +++ b/src/gallium/drivers/llvmpipe/lp_state_setup.c @@ -562,11 +562,12 @@ finalize_function(struct gallivm_state *gallivm, /* XXX: Generic code: */ static void -lp_emit_emms(LLVMBuilderRef builder) +lp_emit_emms(struct gallivm_state *gallivm) { #ifdef PIPE_ARCH_X86 /* Avoid corrupting the FPU stack on 32bit OSes. */ - lp_build_intrinsic(builder, "llvm.x86.mmx.emms", LLVMVoidType(), NULL, 0); + lp_build_intrinsic(gallivm->builder, "llvm.x86.mmx.emms", + LLVMVoidTypeInContext(gallivm->context), NULL, 0); #endif } @@ -720,7 +721,7 @@ generate_setup_variant(struct gallivm_state *gallivm, init_args(gallivm, &args, variant); emit_tri_coef(gallivm, &variant->key, &args); - lp_emit_emms(builder); + lp_emit_emms(gallivm); LLVMBuildRetVoid(builder); variant->jit_function = finalize_function(gallivm, builder, diff --git a/src/gallium/drivers/llvmpipe/lp_test_sincos.c b/src/gallium/drivers/llvmpipe/lp_test_sincos.c index 77f6cb4b79c..066d633d443 100644 --- a/src/gallium/drivers/llvmpipe/lp_test_sincos.c +++ b/src/gallium/drivers/llvmpipe/lp_test_sincos.c @@ -137,7 +137,7 @@ test_sincos(struct gallivm_state *gallivm, unsigned verbose, FILE *fp) #else /* !PIPE_ARCH_SSE */ static boolean -test_sincos(unsigned verbose, FILE *fp) +test_sincos(struct gallivm_state *gallivm, unsigned verbose, FILE *fp) { return TRUE; } -- 2.30.2