mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-18 15:28:33 +00:00
[libvpx] Update to v1.12.0
This commit is contained in:
1 parent
287a71dc66
commit
b5046d2a76
572 files changed
+52900
-29493
No files matched your search
@@ -28,13 +28,14 @@
|
||||
// See platform implementations of RegisterStateCheckXXX for details.
|
||||
//
|
||||
|
||||
#if defined(_WIN64) && ARCH_X86_64
|
||||
#if defined(_WIN64) && VPX_ARCH_X86_64
|
||||
|
||||
#undef NOMINMAX
|
||||
#define NOMINMAX
|
||||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#endif
|
||||
#include <intrin.h>
|
||||
#include <windows.h>
|
||||
#include <winnt.h>
|
||||
|
||||
@@ -55,7 +56,7 @@ class RegisterStateCheck {
|
||||
private:
|
||||
static bool StoreRegisters(CONTEXT *const context) {
|
||||
const HANDLE this_thread = GetCurrentThread();
|
||||
EXPECT_TRUE(this_thread != NULL);
|
||||
EXPECT_NE(this_thread, nullptr);
|
||||
context->ContextFlags = CONTEXT_FLOATING_POINT;
|
||||
const bool context_saved = GetThreadContext(this_thread, context) == TRUE;
|
||||
EXPECT_TRUE(context_saved) << "GetLastError: " << GetLastError();
|
||||
@@ -81,10 +82,13 @@ class RegisterStateCheck {
|
||||
CONTEXT pre_context_;
|
||||
};
|
||||
|
||||
#define ASM_REGISTER_STATE_CHECK(statement) \
|
||||
do { \
|
||||
libvpx_test::RegisterStateCheck reg_check; \
|
||||
statement; \
|
||||
#define ASM_REGISTER_STATE_CHECK(statement) \
|
||||
do { \
|
||||
{ \
|
||||
libvpx_test::RegisterStateCheck reg_check; \
|
||||
statement; \
|
||||
} \
|
||||
_ReadWriteBarrier(); \
|
||||
} while (false)
|
||||
|
||||
} // namespace libvpx_test
|
||||
@@ -121,11 +125,22 @@ class RegisterStateCheck {
|
||||
int64_t pre_store_[8];
|
||||
};
|
||||
|
||||
#if defined(__GNUC__)
|
||||
#define ASM_REGISTER_STATE_CHECK(statement) \
|
||||
do { \
|
||||
{ \
|
||||
libvpx_test::RegisterStateCheck reg_check; \
|
||||
statement; \
|
||||
} \
|
||||
__asm__ volatile("" ::: "memory"); \
|
||||
} while (false)
|
||||
#else
|
||||
#define ASM_REGISTER_STATE_CHECK(statement) \
|
||||
do { \
|
||||
libvpx_test::RegisterStateCheck reg_check; \
|
||||
statement; \
|
||||
} while (false)
|
||||
#endif
|
||||
|
||||
} // namespace libvpx_test
|
||||
|
||||
@@ -138,9 +153,9 @@ class RegisterStateCheck {};
|
||||
|
||||
} // namespace libvpx_test
|
||||
|
||||
#endif // _WIN64 && ARCH_X86_64
|
||||
#endif // _WIN64 && VPX_ARCH_X86_64
|
||||
|
||||
#if ARCH_X86 || ARCH_X86_64
|
||||
#if VPX_ARCH_X86 || VPX_ARCH_X86_64
|
||||
#if defined(__GNUC__)
|
||||
|
||||
namespace libvpx_test {
|
||||
@@ -169,16 +184,19 @@ class RegisterStateCheckMMX {
|
||||
uint16_t pre_fpu_env_[14];
|
||||
};
|
||||
|
||||
#define API_REGISTER_STATE_CHECK(statement) \
|
||||
do { \
|
||||
libvpx_test::RegisterStateCheckMMX reg_check; \
|
||||
ASM_REGISTER_STATE_CHECK(statement); \
|
||||
#define API_REGISTER_STATE_CHECK(statement) \
|
||||
do { \
|
||||
{ \
|
||||
libvpx_test::RegisterStateCheckMMX reg_check; \
|
||||
ASM_REGISTER_STATE_CHECK(statement); \
|
||||
} \
|
||||
__asm__ volatile("" ::: "memory"); \
|
||||
} while (false)
|
||||
|
||||
} // namespace libvpx_test
|
||||
|
||||
#endif // __GNUC__
|
||||
#endif // ARCH_X86 || ARCH_X86_64
|
||||
#endif // VPX_ARCH_X86 || VPX_ARCH_X86_64
|
||||
|
||||
#ifndef API_REGISTER_STATE_CHECK
|
||||
#define API_REGISTER_STATE_CHECK ASM_REGISTER_STATE_CHECK
|
||||
|
||||
Reference in new issue
Block a user