-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Description
| Bugzilla Link | 3805 |
| Resolution | DUPLICATE |
| Resolved on | Mar 06, 2010 13:58 |
| Version | unspecified |
| OS | other |
| Reporter | LLVM Bugzilla Contributor |
Extended Description
There seems to be a problem with the assembly generated by ccc/clang, as it is not assemblable by as or gcc. gas or gcc output the following after the code has been preprocessed/compiled with ccc:
../../platform/pc32/i386/locore.s: Assembler messages:
../../platform/pc32/i386/locore.s:248: Error: junk (_end)' after expression ../../platform/pc32/i386/locore.s:249: Error: junk (_edata)' after expression
locore.s is part of the source of DragonFly BSD. On a side note, this did not happen with an svn checkout of llvm/clang of a few weeks ago. It now occurs on every single svn checkout that I did yesterday and today.
options passed to ccc/gcc: -x assembler-with-cpp -DLOCORE -O -pipe -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Werror-implicit-function-declaration -std=c99 -g -nostdinc -I. -Iinclude -I../.. -I../../../include -I/usr/src/sys/compile/GENERIC -I"../../dev/acpica5" -I"../../contrib/dev/acpica-unix-20061109/include" -I../../contrib/ipfilter -I../../dev/netif/ath/hal -D_KERNEL -include opt_global.h -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common -ffreestanding -mpreferred-stack-boundary=2 -fno-stack-protector -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 ../../platform/pc32/i386/locore.s
original assembly code:
movl $R(_end),%ecx
movl $R(_edata),%edi
subl %edi,%ecx
xorl %eax,%eax
cld
rep
stosb
gcc output (assembles correctly):
248 "../../platform/pc32/i386/locore.s"
movl $((_end)-0xc0000000),%ecx
movl $((_edata)-0xc0000000),%edi
subl %edi,%ecx
xorl %eax,%eax
cld
rep
stosb
ccc/clang output (doesn't assemble correctly, throws errors):
248 "../../platform/pc32/i386/locore.s"
movl $R(_end),%ecx
movl $R(_edata),%edi
subl %edi,%ecx
xorl %eax,%eax
cld
rep
stosb