From 5a9da34a5b44104839284da48c16f949344eb0c1 Mon Sep 17 00:00:00 2001 From: Carl-Daniel Hailfinger Date: Fri, 4 Apr 2008 14:49:50 +0000 Subject: [PATCH] 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 This was committed as r3044 in coreboot v2. Signed-off-by: Carl-Daniel Hailfinger Acked-by: Jordan Crouse git-svn-id: svn://coreboot.org/repository/coreboot-v3@654 f3766cd6-281f-0410-b1cd-43a5c92072e9 --- arch/x86/stage0_i586.S | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/x86/stage0_i586.S b/arch/x86/stage0_i586.S index cb56664665..54aa6a62a2 100644 --- a/arch/x86/stage0_i586.S +++ b/arch/x86/stage0_i586.S @@ -319,8 +319,15 @@ 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 + */ .endm #if CacheSize > 0x10000