aboutsummaryrefslogtreecommitdiffstats
path: root/testhal/STM32F4xx/IRQ_STORM_FPU
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-12-22 21:22:34 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-12-22 21:22:34 +0000
commit0f716b3fce147fc9ca20aa1a63a4cff4b2fa362f (patch)
tree82f2a6eb251216132b54dc2c142048a2eb84c830 /testhal/STM32F4xx/IRQ_STORM_FPU
parent22b48b6876d80efce354c8b4c432b1f4a6bcf795 (diff)
downloadChibiOS-0f716b3fce147fc9ca20aa1a63a4cff4b2fa362f.tar.gz
ChibiOS-0f716b3fce147fc9ca20aa1a63a4cff4b2fa362f.tar.bz2
ChibiOS-0f716b3fce147fc9ca20aa1a63a4cff4b2fa362f.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3651 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'testhal/STM32F4xx/IRQ_STORM_FPU')
-rw-r--r--testhal/STM32F4xx/IRQ_STORM_FPU/Makefile2
-rw-r--r--testhal/STM32F4xx/IRQ_STORM_FPU/main.c40
2 files changed, 21 insertions, 21 deletions
diff --git a/testhal/STM32F4xx/IRQ_STORM_FPU/Makefile b/testhal/STM32F4xx/IRQ_STORM_FPU/Makefile
index 0bdb34ed3..aa109bff9 100644
--- a/testhal/STM32F4xx/IRQ_STORM_FPU/Makefile
+++ b/testhal/STM32F4xx/IRQ_STORM_FPU/Makefile
@@ -5,7 +5,7 @@
# Compiler options here.
ifeq ($(USE_OPT),)
- USE_OPT = -O2 -ggdb -fomit-frame-pointer -falign-functions=16 -mhard-float -mfpu=fpv4-sp-d16
+ USE_OPT = -O2 -ggdb -fomit-frame-pointer -falign-functions=16 -mhard-float -mfpu=fpv4-sp-d16 -fsingle-precision-constant
endif
# C specific options here (added to USE_OPT).
diff --git a/testhal/STM32F4xx/IRQ_STORM_FPU/main.c b/testhal/STM32F4xx/IRQ_STORM_FPU/main.c
index a41c931e1..7b751ed3c 100644
--- a/testhal/STM32F4xx/IRQ_STORM_FPU/main.c
+++ b/testhal/STM32F4xx/IRQ_STORM_FPU/main.c
@@ -56,13 +56,13 @@ static msg_t WorkerThread(void *arg) {
while(1) {
float f1, f2, f3, f4, f5;
- f1 = ff1(3);
- f2 = ff1(4);
- f3 = ff1(5);
+ f1 = ff1(3.0f);
+ f2 = ff1(4.0f);
+ f3 = ff1(5.0f);
f5 = f1 + f2 + f3;
- f4 = ff1(6);
+ f4 = ff1(6.0f);
f5 = ff2(f5, f4, f5, f4);
- if (f5 != 324)
+ if (f5 != 324.0f)
chSysHalt();
}
}
@@ -78,13 +78,13 @@ static msg_t PeriodicThread(void *arg) {
while(1) {
float f1, f2, f3, f4, f5;
- f1 = ff1(4);
- f2 = ff1(5);
- f3 = ff1(6);
+ f1 = ff1(4.0f);
+ f2 = ff1(5.0f);
+ f3 = ff1(6.0f);
f5 = f1 + f2 + f3;
- f4 = ff1(7);
+ f4 = ff1(7.0f);
f5 = ff2(f5, f4, f5, f4);
- if (f5 != 484)
+ if (f5 != 484.0f)
chSysHalt();
chThdSleepSeconds(1);
}
@@ -98,13 +98,13 @@ static void gpt2cb(GPTDriver *gptp) {
(void)gptp;
- f1 = ff1(2);
- f2 = ff1(3);
- f3 = ff1(4);
+ f1 = ff1(2.0f);
+ f2 = ff1(3.0f);
+ f3 = ff1(4.0f);
f5 = f1 + f2 + f3;
- f4 = ff1(5);
+ f4 = ff1(5.0f);
f5 = ff2(f5, f4, f5, f4);
- if (f5 != 196)
+ if (f5 != 196.0f)
chSysHalt();
}
@@ -116,13 +116,13 @@ static void gpt3cb(GPTDriver *gptp) {
(void)gptp;
- f1 = ff1(1);
- f2 = ff1(2);
- f3 = ff1(3);
+ f1 = ff1(1.0f);
+ f2 = ff1(2.0f);
+ f3 = ff1(3.0f);
f5 = f1 + f2 + f3;
- f4 = ff1(4);
+ f4 = ff1(4.0f);
f5 = ff2(f5, f4, f5, f4);
- if (f5 != 100)
+ if (f5 != 100.0f)
chSysHalt();
}