Add early-clobbers to the output variables in CPUID
authorThiago Macieira <thiago.macieira@intel.com>
Tue, 10 Apr 2012 15:08:21 +0000 (12:08 -0300)
committerQt by Nokia <qt-info@nokia.com>
Tue, 10 Apr 2012 20:54:20 +0000 (22:54 +0200)
commit81d1f79a7f4b0f67d71d1c8c5c74e5a56ab48097
tree37f0140d23d30cb4c8377c299106229fbd903757
parente6a1675da516bf3802b5ce28a352ccaa12b8cabf
Add early-clobbers to the output variables in CPUID

Without those early-clobbers, the compiler might decide to schedule a
register that is also used as output. The existing early clobber in
the tmp variable was there so the compiler wouldn't use a register
scheduled as input (especially EAX).

To be honest, I'm not convinced that the compiler should be allowed to
do this. That means that two output variables are scheduled to the
same register... still, this fixes a problem found with GCC 4.2 (at
least the Mac one).

Change-Id: I6cd4676284e9a83d6aac4b439c6e58e347c40106
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
src/corelib/tools/qsimd.cpp