From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Wed, 28 Nov 2001 15:14:49 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Wed, 28 Nov 2001 15:14:30 -0500 Received: from quark.didntduck.org ([216.43.55.190]:56580 "EHLO quark.didntduck.org") by vger.kernel.org with ESMTP id ; Wed, 28 Nov 2001 15:14:19 -0500 Message-ID: <3C054422.FB546EFE@didntduck.org> Date: Wed, 28 Nov 2001 15:08:02 -0500 From: Brian Gerst X-Mailer: Mozilla 4.76 [en] (WinNT; U) X-Accept-Language: en MIME-Version: 1.0 To: root@chaos.analogic.com CC: Martin Eriksson , erik@hensema.net, linux-kernel@vger.kernel.org Subject: Re: Compilation problem in ndisc.c / 2.5.1-pre2 : possible gcc bug? In-Reply-To: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org "Richard B. Johnson" wrote: > > On Wed, 28 Nov 2001, Martin Eriksson wrote: > > > ----- Original Message ----- > > From: "Richard B. Johnson" > > To: > > Cc: > > Sent: Wednesday, November 28, 2001 8:09 PM > > Subject: Re: Compilation problem in ndisc.c / 2.5.1-pre2 : possible gcc bug? > > > > > > > On 28 Nov 2001, Erik Hensema wrote: > > > > > > > > > > > I've been looking into the compile problems of net/ipv6/ndisc.c in > > > > 2.5.1-pre2 and I found that the asm generated by gcc (2.95.3) is wrong: > > > > > > > > This is a small part of a diff betweem two asm files generated by gcc, > > note > > > > the missing \n's in the wrong code: > > > > > > > > - > > > > - addl 0(%ebp), %edx > > > > - adcl 4(%ebp), %edx > > > > - adcl 8(%ebp), %edx > > > > - adcl 12(%ebp), %edx > > > > - adcl 0(%ecx), %edx > > > > - adcl 4(%ecx), %edx > > > > - adcl 8(%ecx), %edx > > > > - adcl 12(%ecx), %edx > > > > - adcl %edi, %edx > > > > - adcl %eax, %edx > > > > - adcl $0, %edx > > > > - > > > > + addl 0(%ebp), %edxadcl 4(%ebp), %edxadcl 8(%ebp), %edxadcl 12(%ebp), > > %edxadcl 0(%ecx), %edxadcl 4(%ecx), %edxadcl 8(%ecx), %edxadcl 12(%ecx), > > %edxadcl %edi, %edxadcl %eax, %edxadcl $0, %edx > > > > > > > > > This is probably just some loop unrolling, not some as you say "wrong > > > code". > > > > Correct me if I'm wrong, but I don't think "%edxadcl" really assembles.... > > No, but an edited 'diff' of the assembly output of a 'C' compiler doesn't > really tell much. Note, no line numbers, no clue as to what the diff > was about. The actual defective section of code would be much more > instructive. For instance, is this as a result of an in-line macro > expansion; the result of a 'dos' file; the true output of > a 'C' file with no __inline__ __asm__? It's from include/asm-i386/checksum.h, specifically csum_ipv6_magic(). The asm statements in this header file need semicolons or explicit newlines after each opcode. -- Brian Gerst