This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/31100] New: ASM_OUTPUT_ALIGN_WITH_NOP wrong on sparc/gas
- From: "Erwin dot Unruh at fujitsu-siemens dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Mar 2007 10:05:46 -0000
- Subject: [Bug target/31100] New: ASM_OUTPUT_ALIGN_WITH_NOP wrong on sparc/gas
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The macro ASM_OUTPUT_ALIGN_WITH_NOP on sparc contains an explicit filler on the
align statement. This is given as a word representing the NOP. The GNU
assembler only uses the last byte of the filler. This generates wrong code. The
original SUN assembler needs this word to insert NOPs instead of zero.
The testcase is compiled with gcc -v -S -O3 -falign-labels=16 test.c
The testcase:
int f(int i)
{
int res;
switch ( i )
{
case 5:
res = i -i ;
break;
default:
res = i* 2;
}
return res;
}
int f(int);
main()
{
return f(2);
}
--
Summary: ASM_OUTPUT_ALIGN_WITH_NOP wrong on sparc/gas
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: Erwin dot Unruh at fujitsu-siemens dot com
GCC build triplet: sparc-sun-solaris2.8
GCC host triplet: sparc-sun-solaris2.8
GCC target triplet: sparc-sun-solaris2.8
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31100