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.