This been fixed a while ago I think...
Yet windoze binaries still buggy.
So, if you can rebuild gcc, just get the code from CVS and rebuild GCC.
~d
On Friday 22 August 2003 10:10, Joerg Huebler wrote:
> Hello,
>
> I'm trying to adapt the FreeRTOS (www.freertos.org) to the MSP430(F449) and
> found some strange behaviour of the compiler in the file
> "list.c" function "pvListGetOwnerOfNextEntry".
>
> Original Sourcecode is:
>
> volatile void *pvListGetOwnerOfNextEntry( volatile xList *pxList )
> {
> if( !listLIST_IS_EMPTY( pxList ) )
> {
> /* Increment the index to the next item and return the item,
> ensuring
> we don't return the marker used at the end of the list. */
> pxList->pxIndex = pxList->pxIndex->pxNext;
> #ifdef __GNUrC__
> if( (pxList->pxIndex - pxList->pxHead) == NULL )
> #else
> if( pxList->pxIndex == pxList->pxHead )
> #endif
> {
> pxList->pxIndex = pxList->pxIndex->pxNext;
> }
> return pxList->pxIndex->pvOwner;
> }
> return NULL;
> }
>
>
>
> and that's what the compiler generated:
>
>
> #ifdef __GNUrC__
> if( (pxList->pxIndex - pxList->pxHead) == NULL )
> #else
> if( pxList->pxIndex == pxList->pxHead )
> 1438: 1e 4d 02 00 mov 2(r13), r14 ;
> 143c: 2f 4d mov @r13, r15 ;
> 143e: 05 24 jz $+12 ;abs 0x144a
> #endif
>
> I'm missing a comparision between 143c and 134e ?
> (To get a working result just remove the "r" from __GNUrC__)
>
> Is it really a bug, do I have to modify arguments of the command line or
> anything else ?
>
>
> I'm using msp430-gcc 3.2.3 (binaries downloaded from
> www.mikrocontroller.net) Win98/Cygwin. For looking to the entire sources I
> used they are attached.
>
> JoergJ. Hübler
> GEMAC mbH
> Zwickauer Str. 227
> 09116 Chemnitz
> Tel. +49 371 3377 350
> Fax. +49 371 3377 272
> mailto: [email protected]
--
/*****************************************************************
("`-''-/").___..--''"`-._ (\ Dimmy the Wild UA1ACZ
`6_ 6 ) `-. ( ).`-.__.`) State Polytechnical Univ.
(_Y_.)' ._ ) `._ `. ``-..-' Radio-Physics Departament
_..`--'_..-_/ /--'_.' ,' Saint Petersburg, Russia
(il),-'' (li),' ((!.-' +7 (812) 5403923, 5585314
*****************************************************************/