Date: Tue, 20 Jul 1999 09:18:38 +0200 To: pgcc AT delorie DOT com Subject: Re: clobbering revisited ... Message-ID: <19990720091838.H263@cerebro.laendle> Mail-Followup-To: pgcc AT delorie DOT com References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: ; from root on Fri, Jul 16, 1999 at 02:53:54PM +0300 X-Operating-System: Linux version 2.2.10 (root AT cerebro) (gcc driver version egcs-2.91.66 19990314 (egcs-1.1.2 release) executing gcc version 2.7.2.3) From: Marc Lehmann Reply-To: pgcc AT delorie DOT com X-Mailing-List: pgcc AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Fri, Jul 16, 1999 at 02:53:54PM +0300, root wrote: > #define DO_BANK_READ_WRITE(_bank) > $__asm__ __volatile__ \ > ("call *%0" \ > : /* OUT */ \ > : /* IN */ "c" /*ecx*/ ((unsigned long)vgaSetReadWriteFunc), \ > "a" /*eax*/ (_bank) \ > : /* CLOBBER */ "ax","dx","memory" /*eax,edx*/ \ > ); > > > yes , it clobbers register ax where it is also used as input . the manual > says that it is illegal and should also be declared as output , too . but > that did not work either anything _more_ specific than "that did not work"? > on an amd k6-2 . there is no problem with pgcc-1.1.3 that it accepts the > code And still miscompiles it quite as often. > is it a problem of gcc-2.95 ? or is the code just broken ? Just broken. However, declaring them as dummy outputs instead of as clobbers would make it legal. -- -----==- | ----==-- _ | ---==---(_)__ __ ____ __ Marc Lehmann +-- --==---/ / _ \/ // /\ \/ / pcg AT goof DOT com |e| -=====/_/_//_/\_,_/ /_/\_\ XX11-RIPE --+ The choice of a GNU generation | |