Author: hailfinger
Date: 2008-08-09 21:16:43 +0200 (Sat, 09 Aug 2008)
New Revision: 727
Modified:
coreboot-v3/arch/x86/amd/stage0.S
coreboot-v3/arch/x86/stage0_i586.S
Log:
Change the GAS bug workaround in CAR code to be more readable.
The problem was that gas treated whitespace asargument delimiter.
Removing the whitespace in crtitical places is the most obvious fix.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006(a)gmx.net>
Acked-by: Ronald G. Minnich <rminnich(a)gmail.com>
Modified: coreboot-v3/arch/x86/amd/stage0.S
===================================================================
--- coreboot-v3/arch/x86/amd/stage0.S 2008-08-09 15:59:17 UTC (rev 726)
+++ coreboot-v3/arch/x86/amd/stage0.S 2008-08-09 19:16:43 UTC (rev 727)
@@ -275,15 +275,10 @@
* 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
- */
+/* DO NOT CHANGE THE FORMATTING of the two lines below! Whitespace is
+ * interpreted as an argument delimiter by some versions of GNU as. */
+ extractmask (((\carsize-\windowoffset)/0x1000)-4), %eax
+ extractmask (((\carsize-\windowoffset)/0x1000)), %edx
.endm
#if CacheSize > 0x10000
Modified: coreboot-v3/arch/x86/stage0_i586.S
===================================================================
--- coreboot-v3/arch/x86/stage0_i586.S 2008-08-09 15:59:17 UTC (rev 726)
+++ coreboot-v3/arch/x86/stage0_i586.S 2008-08-09 19:16:43 UTC (rev 727)
@@ -319,15 +319,10 @@
* 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
- */
+/* DO NOT CHANGE THE FORMATTING of the two lines below! Whitespace is
+ * interpreted as an argument delimiter by some versions of GNU as. */
+ extractmask (((\carsize-\windowoffset)/0x1000)-4), %eax
+ extractmask (((\carsize-\windowoffset)/0x1000)), %edx
.endm
#if CacheSize > 0x10000