ref: f4b1eca53e40ff19ba0b90d39e84be8637e19d6b
parent: 343ef23db07bb4a1140ebe6befcfa733f0ed70b1
parent: a6fdfda44c0c637b0c99bfa5e583bf691c58bca7
author: Martin Storsjö <martin@martin.st>
date: Fri Mar 23 18:04:43 EDT 2018
Merge "Restore emms usage on x86_64 after 726b021a12c1b"
--- a/test/register_state_check.h
+++ b/test/register_state_check.h
@@ -140,7 +140,7 @@
#endif // _WIN64 && ARCH_X86_64
-#if ARCH_X86
+#if ARCH_X86 || ARCH_X86_64
#if defined(__GNUC__)
namespace libvpx_test {
@@ -178,7 +178,7 @@
} // namespace libvpx_test
#endif // __GNUC__
-#endif // ARCH_X86
+#endif // ARCH_X86 || ARCH_X86_64
#ifndef API_REGISTER_STATE_CHECK
#define API_REGISTER_STATE_CHECK ASM_REGISTER_STATE_CHECK
--- /dev/null
+++ b/vpx_ports/emms_mmx.asm
@@ -1,0 +1,18 @@
+;
+; Copyright (c) 2010 The WebM project authors. All Rights Reserved.
+;
+; Use of this source code is governed by a BSD-style license
+; that can be found in the LICENSE file in the root of the source
+; tree. An additional intellectual property rights grant can be found
+; in the file PATENTS. All contributing project authors may
+; be found in the AUTHORS file in the root of the source tree.
+;
+
+
+%include "vpx_ports/x86_abi_support.asm"
+
+section .text
+global sym(vpx_clear_system_state) PRIVATE
+sym(vpx_clear_system_state):
+ emms
+ ret
--- a/vpx_ports/system_state.h
+++ b/vpx_ports/system_state.h
@@ -17,11 +17,11 @@
extern "C" {
#endif
-#if ARCH_X86 && HAVE_MMX
+#if (ARCH_X86 || ARCH_X86_64) && HAVE_MMX
extern void vpx_clear_system_state();
#else
#define vpx_clear_system_state()
-#endif // ARCH_X86 && HAVE_MMX
+#endif // (ARCH_X86 || ARCH_X86_64) && HAVE_MMX
#ifdef __cplusplus
} // extern "C"
--- a/vpx_ports/vpx_ports.mk
+++ b/vpx_ports/vpx_ports.mk
@@ -20,6 +20,10 @@
ifeq ($(ARCH_X86),yes)
PORTS_SRCS-$(HAVE_MMX) += emms_mmx.c
endif
+ifeq ($(ARCH_X86_64),yes)
+# Visual Studio x64 does not support the _mm_empty() intrinsic.
+PORTS_SRCS-$(HAVE_MMX) += emms_mmx.asm
+endif
ifeq ($(ARCH_X86_64),yes)
PORTS_SRCS-$(CONFIG_MSVS) += float_control_word.asm