From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21571 invoked by alias); 6 Jan 2003 18:46:16 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 21506 invoked by uid 71); 6 Jan 2003 18:46:14 -0000 Date: Mon, 06 Jan 2003 18:46:00 -0000 Message-ID: <20030106184613.21496.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: "Matt" Subject: Re: inline-asm/9181: Compiler crashes on inline assembly with internal error Reply-To: "Matt" X-SW-Source: 2003-01/txt/msg00351.txt.bz2 List-Id: The following reply was made to PR inline-asm/9181; it has been noted by GNATS. From: "Matt" To: , , , , , Cc: Subject: Re: inline-asm/9181: Compiler crashes on inline assembly with internal error Date: Mon, 6 Jan 2003 13:41:03 -0500 This is a multi-part message in MIME format. ------=_NextPart_000_0043_01C2B589.41D52570 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit I didn't submit preprocessed code because there is nothing to preprocess. I have attached the preprocessed file along with the error message from gcc. The bug is actually my error. You may notice that, for an output register, I assign "=%al". My fix should be revised as I managed later to crash g++ with similar code. -Matt > Synopsis: Compiler crashes on inline assembly with internal error > > State-Changed-From-To: open->feedback > State-Changed-By: cae > State-Changed-When: Mon Jan 6 05:23:32 2003 > State-Changed-Why: > The preprocessed source is missing. Please send it to me in private > so that I can attach it to the Problem report. > > http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&p r=9181 ------=_NextPart_000_0043_01C2B589.41D52570 Content-Type: application/octet-stream; name="lsb.out" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="lsb.out" # 1 "lsb.c" # 1 "" # 1 "" # 1 "lsb.c" int get_lsb(long long bb) { int index; asm("pushl %%esi\n\t" "movl (%%edx), %%esi\n\t" "xorl %%eax, %%eax\n\t" "movl 4(%%edx), %%ecx\n\t" "testl %%esi, %%esi\n\t" "cmovzl %%ecx, %%esi\n\t" "pushl %%ebx\n\t" "setzb %%al\n\t" "movl %%esi, %%ecx\n\t" "negl %%esi\n\t" "andl %%ecx, %%esi\n\t" "xorl %%ecx, %%ecx\n\t" "xorl %%esi, (%%edx,%%eax,4)\n\t" "xorl %%ebx, %%ebx\n\t" "xorl %%edx, %%edx\n\t" "testl $0xFFFF0000, %%esi\n\t" "setnzb %%bl\n\t" "testl $0xFF00FF00, %%esi\n\t" "leal (%%ebx,%%eax,2), %%ebx\n\t" "setnzb %%cl\n\t" "testl $0xF0F0F0F0, %%esi\n\t" "setnzb %%dl\n\t" "shlb $3, %%cl\n\t" "testl 0xCCCCCCCC, %%esi\n\t" "leal (%%ecx,%%edx,4), %%edx\n\t" "setnzb %%al\n\t" "testl $0xAAAAAAAA, %%esi\n\t" "setnzb %%cl\n\t" "shlb $4, %%bl\n\t" "addb %%al, %%al\n\t" "orb %%cl, %%al\n\t" "orb %%bl, %%dl\n\t" "movl (%%esp), %%ebx\n\t" "movl 4(%%esp),%%esi\n\t" "orb %%dl, %%al\n\t" "addl $8, %%esp" : "=%al" (index) : "d" (&bb) : "%ecx"); return index; } ------=_NextPart_000_0043_01C2B589.41D52570 Content-Type: text/plain; name="error.txt" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="error.txt" $ gcc -c lsb.c lsb.c: In function `get_lsb': lsb.c:57: Internal compiler error in instantiate_virtual_regs_1, at = function.c:3974 Please submit a full bug report, with preprocessed source if appropriate. See for instructions. ------=_NextPart_000_0043_01C2B589.41D52570--