hm.... thanks, fixed.
it looks like we've faced with some sort of gcc's voodoo - if(ull > 0xffffffffULL) - does not work, but if(ull > 0x00ffffffffULL) does. ~d On Sunday 22 December 2002 09:40, Oleg Skydan wrote: > Hi All, > I have found a significant BUG in the simulator. > > When you use HW multiplyer MAC command, and result exceeds 0xFFFFFFFF > (e.g. it needs to use __SUMEXT to fit) the __SUMEXT register does not > updates. > > Here is the program: > > int x; > int main() > { > asm volatile ("mov #0xFFFF,&__MPY\n"\ > "mov #0xFFFF,&__OP2\n"\ > "mov #0xFFFF,&__MAC\n"\ > "mov #0xFFFF,&__OP2\n"\ > "mov &__SUMEXT,&x\n" : :); //At this point Result=0x1 FFFC 0002, so > x should be 0x01, but it is 0 ! > //so does __SUMEXT > } > > The IAR C-SPY simulates this program with the correct result. > > Thenks, > Oleg. > > > > ------------------------------------------------------- > This SF.NET email is sponsored by: Order your Holiday Geek Presents Now! > Green Lasers, Hip Geek T-Shirts, Remote Control Tanks, Caffeinated Soap, > MP3 Players, XBox Games, Flying Saucers, WebCams, Smart Putty. > T H I N K G E E K . C O M http://www.thinkgeek.com/sf/ > _______________________________________________ > Mspgcc-users mailing list > Mspgcc-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/mspgcc-users -- ********************************************************************* ("`-''-/").___..--''"`-._ (\ Dimmy the Wild UA1ACZ `6_ 6 ) `-. ( ).`-.__.`) Enterprise Information Sys (_Y_.)' ._ ) `._ `. ``-..-' Nevsky prospekt, 20 / 44 _..`--'_..-_/ /--'_.' ,' Saint Petersburg, Russia (il),-'' (li),' ((!.-' +7 (812) 314-8860, 5585314 *********************************************************************