Signed-off-by: Stefan Reinauer stepan@coresystems.de
On Fri, Apr 04, 2008 at 02:15:53PM -0600, Stefan Reinauer wrote:
- .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
- */
- extractmask (((\carsize - \windowoffset) >> 12 ) - 4), %eax
- extractmask (((\carsize - \windowoffset) >> 12 )), %edx
Builds here, but others who have had problems should test too.
I would like a short comment above this that outlines the problem and explains why >> is the solution.
//Peter
On 04.04.2008 22:15, Stefan Reinauer wrote:
Signed-off-by: Stefan Reinauer stepan@coresystems.de
Could you try this whitespace-only change instead?
Preliminary version...
Signed-off-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net
Index: arch/x86/stage0_i586.S =================================================================== --- arch/x86/stage0_i586.S (Revision 654) +++ arch/x86/stage0_i586.S (Arbeitskopie) @@ -319,14 +319,13 @@ * windowoffset is the 32k-aligned window into CAR size */ .macro simplemask carsize, windowoffset - .set gas_bug_workaround,(((\carsize - \windowoffset) / 0x1000) - 4) + .set gas_bug_workaround,(((\carsize-\windowoffset)/0x1000)-4) extractmask gas_bug_workaround, %eax - .set gas_bug_workaround,(((\carsize - \windowoffset) / 0x1000)) + .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! It will break GNU as. + extractmask (((\carsize-\windowoffset)/0x1000)-4), %eax + extractmask (((\carsize-\windowoffset)/0x1000)), %edx */ .endm
On 04.04.2008 22:46, Carl-Daniel Hailfinger wrote:
On 04.04.2008 22:15, Stefan Reinauer wrote:
Signed-off-by: Stefan Reinauer stepan@coresystems.de
Could you try this whitespace-only change instead?
Turns out this was not about whitespace, but the "/" character used in the division was interpreted as a comment character if GNU as had been compiled for an i*86-elf target (commonly seen on MacOSX). Stefan committed a fix in r655.
Regards, Carl-Daniel
Carl-Daniel Hailfinger wrote:
On 04.04.2008 22:46, Carl-Daniel Hailfinger wrote:
On 04.04.2008 22:15, Stefan Reinauer wrote:
Signed-off-by: Stefan Reinauer stepan@coresystems.de
Could you try this whitespace-only change instead?
Turns out this was not about whitespace, but the "/" character used in the division was interpreted as a comment character if GNU as had been compiled for an i*86-elf target (commonly seen on MacOSX).
Just as a side node: This has nothing to do with Mac OS X but was compiled from the GNU binutils sources. Mac OS X does not use ELF in any way.