diff options
author | Jan-Arve Saether <jan-arve.saether@nokia.com> | 2012-05-21 10:51:18 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-21 12:54:48 +0200 |
commit | a55bc3da20894947d762b8805d279dbc4ec4473b (patch) | |
tree | 132d46a9fa67ccbf215b73c78b0b39d50d798b29 /src/corelib/tools/qsimd.cpp | |
parent | c2ffcfbf13fca908f89f31d0aca18f441868ac3f (diff) |
Get rid of ambiguous overload for xgetbv.
The patch that broke this was assuming the signature of xgetbv was
_xgetbv(int). This lead to that there were no exact match for the
function resolver, thus the ambiguity.
Apparently, the signature of _xgetbv is _xgetbv(unsigned int).
Changing the static xgetbv to uint makes the match exact, thus no more
ambiguity.
Change-Id: I8db95e00a9fef264d7a1f84d02bb929db84e6e5a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Diffstat (limited to 'src/corelib/tools/qsimd.cpp')
-rw-r--r-- | src/corelib/tools/qsimd.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/tools/qsimd.cpp b/src/corelib/tools/qsimd.cpp index 821de8d3ee..dacff0fe87 100644 --- a/src/corelib/tools/qsimd.cpp +++ b/src/corelib/tools/qsimd.cpp @@ -235,10 +235,10 @@ static void cpuidFeatures07_00(uint &ebx) } #ifdef Q_OS_WIN +// fallback overload in case this intrinsic does not exist: unsigned __int64 _xgetbv(unsigned int); inline quint64 _xgetbv(__int64) { return 0; } #endif - -static void xgetbv(int in, uint &eax, uint &edx) +static void xgetbv(uint in, uint &eax, uint &edx) { #ifdef Q_OS_WIN quint64 result = _xgetbv(in); |