| Summary: | [QT] libQtGui.so on qemux86-64 uses SSSE3 instructions and crashes Qemu | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] Meta-yocto | Reporter: | Qing He <qing.he> |
| Component: | meta-yocto | Assignee: | Qing He <qing.he> |
| Status: | VERIFIED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | Medium | CC: | jessica.zhang, jiajun.xu, ke.yu, kevin.tian, poky.bs.watcher, poky.watcher, richard.purdie, sgw |
| Version: | 0.9 | ||
| Target Milestone: | 0.9 M4 | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Program Management | Documentation change: | --- |
| Bug Depends on: | |||
| Bug Blocks: | 280 | ||
|
Description
Qing He
2010-09-21 00:51:35 UTC
mark this bug at Intel confidential
QtGui has an internal cpu dispatcher, so ideally gdrawhelper_sse2 shouldn't include ssse3 instructions, it uses -msse2 as gcc flags. PSHUFB is actually generated by the use of -march=core2 in gcc-4.5, reproducing it is simple
---
$ cat a.c
#include <emmintrin.h>
__m128i f(int a)
{
return _mm_set1_epi16(a);
}
$ gcc-4.5 -O2 -m64 -march=core2 -c a.c
$ objdump -d a.o
0000000000000000 <f>:
0: 66 0f 6e c7 movd %edi,%xmm0
4: 66 0f 38 00 05 00 00 pshufb 0x0(%rip),%xmm0 # d <f+0xd>
b: 00 00
d: c3 retq
---
it can be fixed in at least two ways:
1. not using -march=core2 for generic machine like qemux86-64
2. adding "-cpu qemu64,+ssse3" or "-cpu core2duo" into qemu command line
#2 is easier, but it may leads to controversy like:
http://mer-l-in.blogspot.com/2010/08/are-intel-subverting-meegocom.html
after removing the optimization flag, the crash doesn't happen anymore marked as verified |