Hi,
v3 is not legacy and I'd like to keep the code readable. AFAICS my new variant of the code will work with older GNU as and it is also more readable. Basically, the problem was that gas treated whitespace as argument delimiter. Removing the whitespace in crtitical places is the most obvious fix.
This is a much-needed simplification and will help me in merging K8 and Phenom CAR code.
Signed-off-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net
Index: corebootv3-car_gas_bug_workaround/arch/x86/stage0_i586.S =================================================================== --- corebootv3-car_gas_bug_workaround/arch/x86/stage0_i586.S (revision 725) +++ corebootv3-car_gas_bug_workaround/arch/x86/stage0_i586.S (working copy) @@ -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 Index: corebootv3-car_gas_bug_workaround/arch/x86/amd/stage0.S =================================================================== --- corebootv3-car_gas_bug_workaround/arch/x86/amd/stage0.S (revision 725) +++ corebootv3-car_gas_bug_workaround/arch/x86/amd/stage0.S (working copy) @@ -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
On 09.08.2008 19:03, ron minnich wrote:
Acked-by: Ronald G. Minnich rminnich@gmail.com
Thanks, r727.
Regards, Carl-Daniel