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: hueb...@gemac-chemnitz.de -- GEMAC Virencheck: OK Virus checked by G DATA AntiVirusKit Version: AVK 12.0.535 from 22.08.2003
FreeRTOS.tar.bz2
Description: Binary data