tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Bug in NetBSD compiler or "bus.h" header file crashes my ISDN4BSD



On Mon, Mar 24, 2008 at 12:49:03PM +0100, Hans Petter Selasky wrote:
>   2b:   01 d8                   add    %ebx,%eax
>   2d:   89 c2                   mov    %eax,%edx
>   2f:   fc                      cld    
>   30:   ac                      lods   %ds:(%esi),%al
>   31:   88 02                   mov    %al,(%edx)
> 
> // OOOPS! We are looping on %ecx, but only %cl was initialised - why ?
> // Either the "bus_space_" macros on NetBSD 3+4 are wrong or the 
> // compiler is wrong!
> 
>   33:   e2 fb                   loop   30 <do_io_000+0x30>

Actually 'loop' is soooo slow on modern cpus that it is much better
to use 'dec %ecx; jnz label' instead.

I've not looked at the header in order to guess what is going on!
But the 'int16' version works because the parameter is picked from the
stack as a 32bit quantity - and will always be promoted to 32bit
before being pushed.

        David

-- 
David Laight: david%l8s.co.uk@localhost


Home | Main Index | Thread Index | Old Index