@walkero
Thanks for addressing the new topic
here there's my test case
#include <stdio.h>
#define SPE 1
#if SPE
#include <spe.h>
#endif /* SPE */
float sum (float, float, float);
int main()
{
double x,y,z,result;
x = 1.0f;
y = 1.0f;
z = 1.0f;
result = sum (x,y,z);
printf ("should be 3: %f\n", result);
return 0;
}
float sum (float a, float b, float c)
{
return a + b + c;
}
The following is the makefile
CC=gcc
CFLAGS_SPE=-mcpu=8540 -mtune=8540 -mspe -mabi=spe -mfloat-gprs=double
OBJECTS=A1222_SPE_floats.o
A1222_SPE_floats: $(OBJECTS)
$(CC) $(OBJECTS) $(CFLAGS_SPE) -o A1222_SPE_floats
A1222_SPE_floats.o: A1222_SPE_floats.c
$(CC) $(INCLUDES) $(CFLAGS_SPE) -c A1222_SPE_floats.c -o A1222_SPE_floats.o
Results on A1222 is 0, should be 3.
Obviously compiling the same code for FPU lead to correct result.
The compiler used is GCC 6 present in latest (your) OS4/SDK.
Maybe I made something wrong, so any feeback is well appreciated.