From a62fcbea30189cfa3d5daef36498f2ae79e93742 Mon Sep 17 00:00:00 2001 From: Johann Date: Tue, 30 Apr 2013 18:22:10 -0700 Subject: [PATCH] Automatically flag intrinsic files Change-Id: Iee9894615265d42aa23c43a4183924953aedb0c6 --- build/make/Makefile | 12 ++++++++++++ vp8/vp8cx.mk | 10 ---------- vp9/vp9_common.mk | 8 -------- vp9/vp9cx.mk | 5 ----- vp9/vp9dx.mk | 4 ---- 5 files changed, 12 insertions(+), 27 deletions(-) diff --git a/build/make/Makefile b/build/make/Makefile index 4ac5bcf1f..de71c6133 100644 --- a/build/make/Makefile +++ b/build/make/Makefile @@ -103,6 +103,18 @@ test:: .PHONY: testdata testdata:: +# Add compiler flags for intrinsic files +$(BUILD_PFX)%_mmx.c.d: CFLAGS += -mmmx +$(BUILD_PFX)%_mmx.c.o: CFLAGS += -mmmx +$(BUILD_PFX)%_sse2.c.d: CFLAGS += -msse2 +$(BUILD_PFX)%_sse2.c.o: CFLAGS += -msse2 +$(BUILD_PFX)%_sse3.c.d: CFLAGS += -msse3 +$(BUILD_PFX)%_sse3.c.o: CFLAGS += -msse3 +$(BUILD_PFX)%_ssse3.c.d: CFLAGS += -mssse3 +$(BUILD_PFX)%_ssse3.c.o: CFLAGS += -mssse3 +$(BUILD_PFX)%_sse4.c.d: CFLAGS += -msse4.1 +$(BUILD_PFX)%_sse4.c.o: CFLAGS += -msse4.1 + $(BUILD_PFX)%.c.d: %.c $(if $(quiet),@echo " [DEP] $@") $(qexec)mkdir -p $(dir $@) diff --git a/vp8/vp8cx.mk b/vp8/vp8cx.mk index 7d1904aaf..cd091f39a 100644 --- a/vp8/vp8cx.mk +++ b/vp8/vp8cx.mk @@ -91,18 +91,8 @@ VP8_CX_SRCS-$(HAVE_SSE2) += encoder/x86/dct_sse2.asm VP8_CX_SRCS-$(HAVE_SSE2) += encoder/x86/fwalsh_sse2.asm VP8_CX_SRCS-$(HAVE_SSE2) += encoder/x86/quantize_sse2.c -# TODO(johann) make this generic -ifeq ($(HAVE_SSE2),yes) -vp8/encoder/x86/quantize_sse2.c.o: CFLAGS += -msse2 -vp8/encoder/x86/quantize_sse2.c.d: CFLAGS += -msse2 -endif - ifeq ($(CONFIG_TEMPORAL_DENOISING),yes) VP8_CX_SRCS-$(HAVE_SSE2) += encoder/x86/denoising_sse2.c -ifeq ($(HAVE_SSE2),yes) -vp8/encoder/x86/denoising_sse2.c.o: CFLAGS += -msse2 -vp8/encoder/x86/denoising_sse2.c.d: CFLAGS += -msse2 -endif endif VP8_CX_SRCS-$(HAVE_SSE2) += encoder/x86/subtract_sse2.asm diff --git a/vp9/vp9_common.mk b/vp9/vp9_common.mk index 1ddd4f057..cbe3aa367 100644 --- a/vp9/vp9_common.mk +++ b/vp9/vp9_common.mk @@ -113,14 +113,6 @@ endif VP9_COMMON_SRCS-$(HAVE_SSE2) += common/x86/vp9_idct_intrin_sse2.c VP9_COMMON_SRCS-$(HAVE_SSE2) += common/x86/vp9_sadmxn_sse2.c -ifeq ($(HAVE_SSE2),yes) -vp9/common/x86/vp9_idct_intrin_sse2.c.o: CFLAGS += -msse2 -vp9/common/x86/vp9_loopfilter_intrin_sse2.c.o: CFLAGS += -msse2 -vp9/common/x86/vp9_sadmxn_sse2.c.o: CFLAGS += -msse2 -vp9/common/x86/vp9_idct_intrin_sse2.c.d: CFLAGS += -msse2 -vp9/common/x86/vp9_loopfilter_intrin_sse2.c.d: CFLAGS += -msse2 -vp9/common/x86/vp9_sadmxn_sse2.c.d: CFLAGS += -msse2 -endif $(eval $(call asm_offsets_template,\ vp9_asm_com_offsets.asm, $(VP9_PREFIX)common/vp9_asm_com_offsets.c)) diff --git a/vp9/vp9cx.mk b/vp9/vp9cx.mk index 39f836fd4..42ab02d31 100644 --- a/vp9/vp9cx.mk +++ b/vp9/vp9cx.mk @@ -95,10 +95,5 @@ VP9_CX_SRCS-$(ARCH_X86)$(ARCH_X86_64) += encoder/x86/vp9_encodeopt.asm VP9_CX_SRCS-$(ARCH_X86_64) += encoder/x86/vp9_ssim_opt.asm VP9_CX_SRCS-$(HAVE_SSE2) += encoder/x86/vp9_dct_sse2.c -ifeq ($(HAVE_SSE2),yes) -vp9/encoder/x86/vp9_dct_sse2.c.d: CFLAGS += -msse2 -vp9/encoder/x86/vp9_dct_sse2.c.o: CFLAGS += -msse2 -endif - VP9_CX_SRCS-yes := $(filter-out $(VP9_CX_SRCS_REMOVE-yes),$(VP9_CX_SRCS-yes)) diff --git a/vp9/vp9dx.mk b/vp9/vp9dx.mk index babdebb86..72cdfebf4 100644 --- a/vp9/vp9dx.mk +++ b/vp9/vp9dx.mk @@ -38,10 +38,6 @@ VP9_DX_SRCS-yes := $(filter-out $(VP9_DX_SRCS_REMOVE-yes),$(VP9_DX_SRCS-yes)) VP9_DX_SRCS-$(HAVE_SSE2) += decoder/x86/vp9_idct_blk_sse2.c VP9_DX_SRCS-$(HAVE_SSE2) += decoder/x86/vp9_dequantize_sse2.c -ifeq ($(HAVE_SSE2),yes) -vp9/decoder/x86/vp9_dequantize_sse2.c.o: CFLAGS += -msse2 -vp9/decoder/x86/vp9_dequantize_sse2.c.d: CFLAGS += -msse2 -endif $(eval $(call asm_offsets_template,\ vp9_asm_dec_offsets.asm, $(VP9_PREFIX)decoder/vp9_asm_dec_offsets.c))