Port-bebox archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: possible bug in clock.c
Some important information I forgot to mention:
The kernel source I'm working with is from the latest netbsd-current.
I'm compiling natively on the bebox with the tools from the 19980217
snapshot.
--Mirian
Mirian Crzig Lennox <mirian%xensei.com@localhost> writes:
>
> I think I may have found a bug having to do with
> /usr/src/sys/arch/bebox/bebox/clock.c.
>
> I was getting a compiler error on line 166, in delay():
>
> tb = mftb();
> tb += (n * 1000 + ns_per_tick - 1) / ns_per_tick;
> tbh = tb >> 32;
>
> The compiler/assembler didn't like that last line, it complained that
> the shift was out of range (0-31). Weird, I know, since tb is
> supposed to be a quad, but anyway...
>
> When I changed the last line to the following:
>
> tbh = tb >> 31;
> tbh >>= 1;
>
> then it compiled fine.
>
> This seems likely to be a bug in the C compiler.
>
> --Mirian
Home |
Main Index |
Thread Index |
Old Index