You're right... will fix it in a minute. ~d On Wednesday 15 October 2003 20:19, Pedro Zorzenon Neto wrote: > On Wed, Oct 15, 2003 at 12:56:12PM -0300, Pedro Zorzenon Neto wrote: > > On Wed, Oct 15, 2003 at 07:29:13PM +0400, Dmitry wrote: > > > So, where is the bug? > > > In a source code? :) > > > ~d > > > > Hi Dmitry, > > > > The source code is: > > > > while ((* (int *) (++menu_stack[menu_i].item)) != NULL) ; > > > > However, the assembler code seems to do this: > > > > while (( (int *) (++menu_stack[menu_i].item)) != NULL) ; > > > > Am I right? > > > > Thanks, > > Pedro > > An old version of mspgcc (maybe February 2003) generates this code: > > .L3: > mov &menu_i, r15 ; 27 *movhi3/6 [length = 2] > rla r15 ; 30 *ashlhi3_1/1 [length = 1] > rla r15 ; 31 *ashlhi3_1/1 [length = 1] > add #menu_stack+2, r15 ; 32 *addhi3_3/8 [length = > 2] add #llo(12), @r15 ; 33 *addhi3_3/4 [length = 3] mov > @r15, r15 ; 34 *movhi3/6 [length = 1] cmp #llo(0), @r15 > ; 35 *cbranchhi [length = 3] jne .L3 > > As you can see, this code has the "cmp" function. > The newest mspgcc version (updated 5 days ago) skips this "cmp" line. > > > ------------------------------------------------------- > This SF.net email is sponsored by: SF.net Giveback Program. > SourceForge.net hosts over 70,000 Open Source Projects. > See the people who have HELPED US provide better services: > Click here: http://sourceforge.net/supporters.php > _______________________________________________ > Mspgcc-users mailing list > Mspgcc-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/mspgcc-users
-- /***************************************************************** ("`-''-/").___..--''"`-._ (\ Dimmy the Wild UA1ACZ `6_ 6 ) `-. ( ).`-.__.`) State Polytechnical Univ. (_Y_.)' ._ ) `._ `. ``-..-' Radio-Physics Departament _..`--'_..-_/ /--'_.' ,' Saint Petersburg, Russia (il),-'' (li),' ((!.-' +7 (812) 5403923, 5585314 *****************************************************************/