Fixed gcc inline assembly issue with PIC and older gcc compilers
authorErik Lindahl <erik@kth.se>
Thu, 21 Jun 2012 09:38:12 +0000 (11:38 +0200)
committerErik Lindahl <erik@kth.se>
Thu, 21 Jun 2012 18:51:10 +0000 (20:51 +0200)
commit7ba20b409d6e3cfcd6839c4cee29cae47314351b
tree66c9840f48367de8b45b1568e9a154f7e03f05c6
parent283a0e5a2ca275667d55a87cda91b8e8b2996582
Fixed gcc inline assembly issue with PIC and older gcc compilers

Some gcc versions had problems with the recently introduced inline
assembly for cpuid (clobbering of ebx register), and since we used
a slightly different inline assembly instruction test in cmake we
did not detect it properly. This patch both makes the inline asm
itself much more portable, and we also test with exactly the same
instruction in cmake so we don't set the flag for supporting inline
asm unless we know this instruction works.

Change-Id: Ib479e2706024abb5e3f66d0249291ce55f1257b1
cmake/TestInlineASM_gcc_x86.c
cmake/gmxDetectAcceleration.cmake
cmake/gmxTestInlineASM.cmake
src/gmxlib/gmx_detectcpu.c