Author: hailfinger Date: 2008-01-10 18:59:25 +0100 (Thu, 10 Jan 2008) New Revision: 3044
Modified: trunk/LinuxBIOSv2/src/cpu/amd/car/cache_as_ram.inc Log: Add a workaround for a bug in some binutils version which strictly interpret whitespace as macro argument delimiter. Since the code is preprocessed by gcc and the tokenizer may insert whitespace, that can fail. http://sourceware.org/bugzilla/show_bug.cgi?id=669
Signed-off-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net Acked-by: Jordan Crouse jordan.crouse@amd.com
Modified: trunk/LinuxBIOSv2/src/cpu/amd/car/cache_as_ram.inc =================================================================== --- trunk/LinuxBIOSv2/src/cpu/amd/car/cache_as_ram.inc 2008-01-10 17:48:25 UTC (rev 3043) +++ trunk/LinuxBIOSv2/src/cpu/amd/car/cache_as_ram.inc 2008-01-10 17:59:25 UTC (rev 3044) @@ -160,8 +160,15 @@ * windowoffset is the 32k-aligned window into CAR size */ .macro simplemask carsize, windowoffset + .set gas_bug_workaround,(((\carsize - \windowoffset) / 0x1000) - 4) + extractmask gas_bug_workaround, %eax + .set gas_bug_workaround,(((\carsize - \windowoffset) / 0x1000)) + extractmask gas_bug_workaround, %edx +/* Without the gas bug workaround, the entire macro would consist only of the + * two lines below. extractmask (((\carsize - \windowoffset) / 0x1000) - 4), %eax extractmask (((\carsize - \windowoffset) / 0x1000)), %edx + */ .endm
#if CacheSize > 0x10000