Hi,
I write come assembly code on SKAM3358 Starter Kit (Cortex A8 CPU) under CCS 6.1 (WIndows 7, 64-bit OS). When I use XDS100 to get some trace data, I find that there are some delta cycles, even for a very simple assembly code. For example, there are 79 delta cycles for a 'ADD r0, r0, r2' instruction:
C:\Users\CCS6_1xxx\TI_workspace_StarterWare_A8a\A8_FromStarterWare_c_call_asm0\Debug\..\asm_func.s,asmfunc(),0x403034BC,"ADD R0, R2"," ADD r0, r0, r2",402,79,,
It is out of my understanding for such a high delta cycle number.
BTW, the project is built with 'Debug' setting (not Release). Could you confirm or not the delta cycles?
Here is the source code:
.global asmfunc .global gvar asmfunc: LDR r1, gvar_a LDR r2, [r1, #0] ADD r0, r0, r2 STR r0, [r1, #0] ; LDM r0, {r0,r1} ; LDM r0!, {r1,r2} MOV pc, lr gvar_a .field gvar, 32 #include <stdio.h> /* * hello.c */ extern int asmfunc(int a); /* declare external asm function */ int gvar = 0; /* define global variable */ int main(void) { int I = 5; I = asmfunc(I); /* call function normally */ if (I<5) printf("Hello World 1!\n"); else printf("Hello World 2!\n"); return 0; }
Thanks