summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2008-04-04 15:02:45 +0000
committerCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2008-04-04 15:02:45 +0000
commit4afb7fb761ee49595f25de66093bc021cbdfae16 (patch)
treed3e36acb231566ee979dab5380f1742784f74fc4 /src
parenta69772157e8620f5228c880c06d383c23d84eea0 (diff)
downloadcoreboot-4afb7fb761ee49595f25de66093bc021cbdfae16.tar.xz
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 The same change was committed in r3044 to the AMD CAR code. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Jordan Crouse <jordan.crouse@amd.com> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3215 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src')
-rw-r--r--src/cpu/x86/car/cache_as_ram.inc7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/cpu/x86/car/cache_as_ram.inc b/src/cpu/x86/car/cache_as_ram.inc
index 4a799f0c55..87ad13d718 100644
--- a/src/cpu/x86/car/cache_as_ram.inc
+++ b/src/cpu/x86/car/cache_as_ram.inc
@@ -158,8 +158,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