x86, asm: Refactor atomic64_386_32.S to support old binutils and be cleaner
authorLuca Barbieri <luca@luca-barbieri.com>
Fri, 6 Aug 2010 02:04:38 +0000 (04:04 +0200)
committerH. Peter Anvin <hpa@zytor.com>
Thu, 12 Aug 2010 04:03:28 +0000 (21:03 -0700)
commit30246557a06bb20618bed906a06d1e1e0faa8bb4
tree26f1493097b00e1cf3fdbf40b4abced115ac219d
parent8fd49936a8cac246fc9ed85508556c82cd44cf68
x86, asm: Refactor atomic64_386_32.S to support old binutils and be cleaner

The old code didn't work on binutils 2.12 because setting a symbol to
a register apparently requires a fairly recent version.

This commit refactors the code to use the C preprocessor instead, and
in the process makes the whole code a bit easier to understand.

The object code produced is unchanged as expected.

This fixes kernel bugzilla 16506.

Reported-by: Dieter Stussy <kd6lvw+software@kd6lvw.ampr.org>
Signed-off-by: Luca Barbieri <luca@luca-barbieri.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: <stable@kernel.org> 2.6.35
LKML-Reference: <tip-*@git.kernel.org>
arch/x86/lib/atomic64_386_32.S