From owner-freebsd-current Sat Nov 6 1:35:49 1999 Delivered-To: freebsd-current@freebsd.org Received: from peedub.muc.de (peedub.muc.de [193.149.49.109]) by hub.freebsd.org (Postfix) with ESMTP id 3529114CAE for ; Sat, 6 Nov 1999 01:35:42 -0800 (PST) (envelope-from garyj@peedub.muc.de) Received: from peedub.muc.de (localhost [127.0.0.1]) by peedub.muc.de (8.9.3/8.6.9) with ESMTP id KAA00510 for ; Sat, 6 Nov 1999 10:34:18 +0100 (CET) Message-Id: <199911060934.KAA00510@peedub.muc.de> X-Mailer: exmh version 2.1.0 09/18/1999 To: freebsd-current@freebsd.org Subject: Re: show stopper for Gcc 2.95.2 conversion Reply-To: Gary Jennejohn In-reply-to: Your message of "Sat, 06 Nov 1999 16:07:06 +1100." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 06 Nov 1999 10:34:18 +0100 From: Gary Jennejohn Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Bruce Evans writes: >On Fri, 5 Nov 1999, David O'Brien wrote: > >> The current show stopper for switching over to GCC 2.95.2 is a problem >> compiling the `ahc' driver: >> >> cc -c -O -pipe -Wall -Wredundant-decls -Wnested-externs >> -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline >> -Wcast-qual -fformat-extensions -ansi -nostdinc -I- -I. -I../.. >> -I../../../include -DKERNEL -include opt_global.h -elf >> ../../dev/aic7xxx/aic7xxx.c >> ../../dev/aic7xxx/aic7xxx.c: In function `ahc_download_instr': >> machine/bus.h:584: Invalid `asm' statement: >> machine/bus.h:584: fixed or forbidden register 2 (cx) was spilled for class >CREG. >> *** Error code 1 > >The asm statement is broken. The clobber list shouldn't include any >registers that are explicitly allocated as operands. > As usual, Bruce is right. Here's a patch to bus.h which works for both EGCS and GCC 2.95.2. I have ahc0 and ahc1 and I generated and successfully booted kernels using both compilers with this patch. ===================== Patch ============================= --- /sys/i386/include/bus.h Sat Aug 28 02:44:07 1999 +++ /sys/i386/include/bus.h_mod Sat Nov 6 09:45:47 1999 @@ -260,7 +260,7 @@ loop 1b" : "=&a" (__x) : "r" (bsh + offset), "D" (addr), "c" (count) : - "%edi", "%ecx", "memory"); + "memory"); } #endif } @@ -288,7 +288,7 @@ loop 1b" : "=&a" (__x) : "r" (bsh + offset), "D" (addr), "c" (count) : - "%edi", "%ecx", "memory"); + "memory"); } #endif } @@ -316,7 +316,7 @@ loop 1b" : "=&a" (__x) : "r" (bsh + offset), "D" (addr), "c" (count) : - "%edi", "%ecx", "memory"); + "memory"); } #endif } @@ -364,7 +364,7 @@ loop 1b" : "=&a" (__x) : "d" (bsh + offset), "D" (addr), "c" (count) : - "%edx", "%edi", "%ecx", "memory"); + "memory"); } #endif #if defined(_I386_BUS_MEMIO_H_) @@ -378,7 +378,7 @@ movsb" : : "S" (bsh + offset), "D" (addr), "c" (count) : - "%esi", "%edi", "%ecx", "memory"); + "memory"); } #endif } @@ -401,7 +401,7 @@ loop 1b" : "=&a" (__x) : "d" (bsh + offset), "D" (addr), "c" (count) : - "%edx", "%edi", "%ecx", "memory"); + "memory"); } #endif #if defined(_I386_BUS_MEMIO_H_) @@ -415,7 +415,7 @@ movsw" : : "S" (bsh + offset), "D" (addr), "c" (count) : - "%esi", "%edi", "%ecx", "memory"); + "memory"); } #endif } @@ -438,7 +438,7 @@ loop 1b" : "=&a" (__x) : "d" (bsh + offset), "D" (addr), "c" (count) : - "%edx", "%edi", "%ecx", "memory"); + "memory"); } #endif #if defined(_I386_BUS_MEMIO_H_) @@ -452,7 +452,7 @@ movsl" : : "S" (bsh + offset), "D" (addr), "c" (count) : - "%esi", "%edi", "%ecx", "memory"); + "memory"); } #endif } @@ -580,8 +580,7 @@ movb %%al,(%1) \n\ loop 1b" : "=&a" (__x) : - "r" (bsh + offset), "S" (addr), "c" (count) : - "%esi", "%ecx"); + "r" (bsh + offset), "S" (addr), "c" (count)); } #endif } @@ -608,8 +607,7 @@ movw %%ax,(%1) \n\ loop 1b" : "=&a" (__x) : - "r" (bsh + offset), "S" (addr), "c" (count) : - "%esi", "%ecx"); + "r" (bsh + offset), "S" (addr), "c" (count)); } #endif } @@ -636,8 +634,7 @@ movl %%eax,(%1) \n\ loop 1b" : "=&a" (__x) : - "r" (bsh + offset), "S" (addr), "c" (count) : - "%esi", "%ecx"); + "r" (bsh + offset), "S" (addr), "c" (count)); } #endif } @@ -686,7 +683,7 @@ loop 1b" : "=&a" (__x) : "d" (bsh + offset), "S" (addr), "c" (count) : - "%edx", "%esi", "%ecx", "memory"); + "memory"); } #endif #if defined(_I386_BUS_MEMIO_H_) @@ -700,7 +697,7 @@ movsb" : : "D" (bsh + offset), "S" (addr), "c" (count) : - "%edi", "%esi", "%ecx", "memory"); + "memory"); } #endif } @@ -723,7 +720,7 @@ loop 1b" : "=&a" (__x) : "d" (bsh + offset), "S" (addr), "c" (count) : - "%edx", "%esi", "%ecx", "memory"); + "memory"); } #endif #if defined(_I386_BUS_MEMIO_H_) @@ -737,7 +734,7 @@ movsw" : : "D" (bsh + offset), "S" (addr), "c" (count) : - "%edi", "%esi", "%ecx", "memory"); + "memory"); } #endif } @@ -760,7 +757,7 @@ loop 1b" : "=&a" (__x) : "d" (bsh + offset), "S" (addr), "c" (count) : - "%edx", "%esi", "%ecx", "memory"); + "memory"); } #endif #if defined(_I386_BUS_MEMIO_H_) @@ -774,7 +771,7 @@ movsl" : : "D" (bsh + offset), "S" (addr), "c" (count) : - "%edi", "%esi", "%ecx", "memory"); + "memory"); } #endif } --- Gary Jennejohn Home - garyj@muc.de Work - garyj@fkr.cpqcorp.net To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message