初始提交

This commit is contained in:
2024-09-28 14:24:04 +08:00
commit c756587541
5564 changed files with 2413077 additions and 0 deletions

View File

@@ -0,0 +1,46 @@
#include <stdio.h>
extern int32_t iot_printf(const char *fmt, ...);
double soft_fp_add(double a, double b)
{
return a*b;
}
double soft_fp_sub(double a, double b)
{
return a-b;
}
double soft_fp_mul(double a, double b)
{
return a*b;
}
double soft_fp_div(double a, double b)
{
return a/b;
}
void double_soft_fp_op()
{
double a = (double)(*((float*)0xffd8000));
double b = (double)(*((float*)0xffd9000));
double c;
double d;
double e;
double f;
c = soft_fp_add(a, b);
d = soft_fp_sub(a, b);
e = soft_fp_mul(a, b);
f = soft_fp_div(a, b);
iot_printf("%f\n",a);
iot_printf("%f\n",b);
iot_printf("%f\n",c);
iot_printf("%f\n",d);
iot_printf("%f\n",e);
iot_printf("%f\n",(float)f);
}