This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: egcs-19990321 omits __asm__ __volatile__()!
- To: Horst von Brand <vonbrand at sleipnir dot valparaiso dot cl>
- Subject: Re: egcs-19990321 omits __asm__ __volatile__()!
- From: Jeffrey A Law <law at upchuck dot cygnus dot com>
- Date: Sat, 27 Mar 1999 21:42:11 -0700
- cc: egcs-bugs at egcs dot cygnus dot com
- Reply-To: law at cygnus dot com
In message <199903272025.QAA13419@sleipnir.valparaiso.cl>you write:
> ------- =_aaaaaaaaaa0
> Content-Type: text/plain; charset="us-ascii"
> Content-ID: <13414.922566279.1@sleipnir.valparaiso.cl>
>
> The following unholy mess is distilled out of linux/arch/i386/kernel/time.c
> (linux-2.2.5-pre2 to be precise) after preprocessing. This is the file I
> reported earlier when compiled with egcs-19990321 made linux-2.2.x hang on
> boot.
>
>
> ------- =_aaaaaaaaaa0
> Content-Type: text/plain; name="t.c"; charset="us-ascii"
> Content-ID: <13414.922566279.2@sleipnir.valparaiso.cl>
> Content-Description: C source, t.c
>
> extern inline unsigned char inb (unsigned short port) { unsigned char _v
> ; __asm__ __volatile__ ("in" "b" " %" "w" "1,%" "" "0" : "=a" (_v)
> : "Nd" (port) ); return _v; } extern inline unsigned char inb_p (unsigne
> d short port) { unsigned char _v; __asm__ __volatile__ ("in" "b" " %" "w
> " "1,%" "" "0" "\noutb %%al,$0x80" : "=a" (_v) : "Nd" (port) ); r
> eturn _v; }
>
> extern inline void outb (unsigned char value, unsigned short port) {
> __asm__ __volatile__ ("out" "b" " %" "b" "0,%" "w" "1" : : "a" (valu
> e), "Nd" (port)); } extern inline void outb_p (unsigned char value, uns
> igned short port) { __asm__ __volatile__ ("out" "b" " %" "b" "0,%" "w
> " "1" "\noutb %%al,$0x80" : : "a" (value), "Nd" (port));}
>
> static int set_rtc_mmss(unsigned long nowtime)
> {
> int retval = 0;
> unsigned char save_control;
> save_control = ({ outb_p(( 11 ),(0x70 + ( 0 )) ); inb_p((0x70 + ( 1 )
> ) ); }) ;
> ({ outb_p(( 11 ),(0x70 + ( 0 )) ); outb_p(( (save_control| 0x80 ) ),
> (0x70 + ( 1 )) ); }) ;
> return retval;
> }
Please update flow.c from the CVS tree and try your test again. This could
well be the bug I tracked down last night.
jeff