[Tinyos-devel] what version of Gcc should I be using? Possible bug?
Eric Decker
cire831 at gmail.com
Tue May 20 00:37:57 PDT 2008
I've been chasing a problem where the following code doesn't do the right
thing.
bool isSetSCCI() {
return (TACCTL2 & SCCI);
}
SCCI has the value 0x0400 (bit 10 of TACCTLx). I would expect this to
return 0x0400 if
SCCI is set and 0 otherwise. The code generated both with and without
optimization is
given below. It basically does nothing. Am I missing something? (As I get
older my
brain definitely misses things....)
(gdb) x/3i 460c
0x460c <GPSByteCollectP$isSetSCCI>: mov &0x0166,r15 ;src addr
0x0166
0x4610 <GPSByteCollectP$isSetSCCI+4>: clr r15 ;
0x4612 <GPSByteCollectP$isSetSCCI+6>: ret
Here is the code I'm running. I'm a bit dubious of gcc 4.1.2. What version
should I be
running?
cire-laptop (47): ncc --version
ncc: 1.2.4
nescc: 1.2.9
gcc: gcc (GCC) 4.1.2 (Ubuntu 4.1.2-0ubuntu4)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--
Eric B. Decker
Senior (over 50 :-) Researcher
Autonomous Systems Lab
Jack Baskin School of Engineering
UCSC
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www.millennium.berkeley.edu/pipermail/tinyos-devel/attachments/20080520/7e61a2cf/attachment.htm
More information about the Tinyos-devel
mailing list