From 71d814fac660492cee06359fdce466fe3789c6c3 Mon Sep 17 00:00:00 2001 From: Carl-Daniel Hailfinger Date: Sat, 9 Aug 2008 19:16:43 +0000 Subject: [PATCH] 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 Acked-by: Ronald G. Minnich git-svn-id: svn://coreboot.org/repository/coreboot-v3@727 f3766cd6-281f-0410-b1cd-43a5c92072e9 --- arch/x86/amd/stage0.S | 13 ++++--------- arch/x86/stage0_i586.S | 13 ++++--------- 2 files changed, 8 insertions(+), 18 deletions(-) diff --git a/arch/x86/amd/stage0.S b/arch/x86/amd/stage0.S index 0613fde2d9..0191756398 100644 --- a/arch/x86/amd/stage0.S +++ b/arch/x86/amd/stage0.S @@ -275,15 +275,10 @@ clear_fixed_var_mtrr_out: * 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 diff --git a/arch/x86/stage0_i586.S b/arch/x86/stage0_i586.S index 745c3706f8..3b0d9b778c 100644 --- a/arch/x86/stage0_i586.S +++ b/arch/x86/stage0_i586.S @@ -319,15 +319,10 @@ clear_fixed_var_mtrr_out: * 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