Forum Discussion
Altera_Forum
Honored Contributor
20 years agoHi Scott:
I have tried your code, no compiling error occurred,but something was wrong. The following code work fine. asm("Fast_Copy_In_ASM_Loop: ldwio r7,0(r4)"); asm("stwio r7,0(r5)"); asm("addi r5,r5,4");//increase read_data to point to next byte asm("addi r4,r4,4");//increase read_data to point to next byte asm("addi r6,r6,-4");//decrease read_length asm("bne r6,zero,Fast_Copy_In_ASM_Loop");//CWG2 But the code you showed me were all skipped when I step into it. asm volatile ( "LOOP: ldwio r7,0(r4)" " stwio r7,0(r5)" " addi r5,r5,4" " addi r4,r4,4" " addi r6,r6,-4" " bne r6,zero,LOOP " \ ); WHY? best regards, David