1. Fix test_floatl.c compile fail issue

2. Update muti-core compile run.sh
This commit is contained in:
Lamdonn 2025-11-19 22:31:52 +08:00
parent 49025692ca
commit f2b0a31bb3
2 changed files with 5 additions and 4 deletions

4
run.sh
View File

@ -10,9 +10,9 @@ fi
echo "compilling..." echo "compilling..."
if [ "$1" == "debug" ]; then if [ "$1" == "debug" ]; then
make CFLAG=-g make -j CFLAG=-g
else else
make make -j
fi fi
if [ -f $exe_file ]; then if [ -f $exe_file ]; then

View File

@ -4,6 +4,7 @@
#include <time.h> #include <time.h>
#include <math.h> #include <math.h>
#include <float.h> #include <float.h>
#include <stdint.h>
#if defined(TEST_TARGET_floatl) #if defined(TEST_TARGET_floatl)
#include <varch/command.h> #include <varch/command.h>
#include <varch/unitt.h> #include <varch/unitt.h>
@ -295,8 +296,8 @@ float double_to_float(double d)
} }
// 将 double 的二进制表示转换为 uint64_t // 将 double 的二进制表示转换为 uint64_t
typedef unsigned long long uint64_t; // typedef unsigned long long uint64_t;
typedef long long int64_t; // typedef long long int64_t;
uint64_t double_to_bits(double x) { uint64_t double_to_bits(double x) {
return *((uint64_t*)&x); return *((uint64_t*)&x);