Subject: possible bug in clock.c
To: None <port-bebox@netbsd.org>
From: Mirian Crzig Lennox <mirian@xensei.com>
List: port-bebox
Date: 11/17/1998 23:36:19
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