I wrote a linear assembly function as follows:
.def _test
_test: .cproc a_0
.reg val_a0
LDW *a_0++,val_a0
.return val_a0
.endproc
Then in another file in the project calling this function:
void main()
{
int a = 1;
float b = 1.0;
int temp1 = 0;
int temp2 = 0.0;
temp1 = test(&a);
printf("%d\n",temp1);
temp2 = test(&b);
printf("%f\n",temp2);
}
I ran the above code on EVM6678, and the following result appeared in the console window:
1
1065353216.00000
It seemed that LDW couldn't work right with single precise data, can somebody tell me why?