aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil/x86
diff options
context:
space:
mode:
authorSean McGovern <gseanmcg@gmail.com>2011-12-07 21:51:28 +0000
committerJanne Grunau <janne-libav@jannau.net>2011-12-08 00:57:11 +0100
commitbe0675ce672b7788b0f1277704be663f415d6498 (patch)
tree4d5723f8d5aa7a9e33db2ab61b6f465f5d36a3d2 /libavutil/x86
parent04a5eaa1a5b36c025a609f56eb33437772f5f765 (diff)
downloadffmpeg-be0675ce672b7788b0f1277704be663f415d6498.tar.gz
x86 cpuid: set vendor union members separately
Solaris Studio (suncc) has difficulty with filling in members of a union. Instead, let's retrieve and store the cpuid() results separately. This is still a compiler bug, however this fix does not cause a regression on other platforms. Signed-off-by: Janne Grunau <janne-libav@jannau.net>
Diffstat (limited to 'libavutil/x86')
-rw-r--r--libavutil/x86/cpu.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavutil/x86/cpu.c b/libavutil/x86/cpu.c
index 3975e68533..2424fe4516 100644
--- a/libavutil/x86/cpu.c
+++ b/libavutil/x86/cpu.c
@@ -74,7 +74,10 @@ int ff_get_cpu_flags_x86(void)
return 0; /* CPUID not supported */
#endif
- cpuid(0, max_std_level, vendor.i[0], vendor.i[2], vendor.i[1]);
+ cpuid(0, max_std_level, ebx, ecx, edx);
+ vendor.i[0] = ebx;
+ vendor.i[1] = edx;
+ vendor.i[2] = ecx;
if(max_std_level >= 1){
cpuid(1, eax, ebx, ecx, std_caps);