Skip to content

Commit 90b1c6a

Browse files
Bradley Bolenstephanosio
authored andcommitted
tests: fpu_sharing: Enable support for Cortex-R
Reuse the Cortex-M paths for testing the floating point unit. Signed-off-by: Bradley Bolen <[email protected]>
1 parent 6a35a79 commit 90b1c6a

File tree

5 files changed

+9
-8
lines changed

5 files changed

+9
-8
lines changed

tests/kernel/fpu_sharing/float_disable/testcase.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
tests:
22
kernel.fpu_sharing.float_disable.arm:
33
arch_allow: arm
4-
filter: CONFIG_ARMV7_M_ARMV8_M_FP
4+
filter: CONFIG_ARMV7_M_ARMV8_M_FP or CONFIG_ARMV7_R_FP
55
extra_configs:
66
- CONFIG_DYNAMIC_INTERRUPTS=y
77
tags: fpu kernel userspace

tests/kernel/fpu_sharing/generic/src/float_context.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ struct fp_non_volatile_register_set {
6363
#define SIZEOF_FP_VOLATILE_REGISTER_SET sizeof(struct fp_volatile_register_set)
6464
#define SIZEOF_FP_NON_VOLATILE_REGISTER_SET 0
6565

66-
#elif defined(CONFIG_ARMV7_M_ARMV8_M_FP)
66+
#elif defined(CONFIG_ARMV7_M_ARMV8_M_FP) || defined(CONFIG_ARMV7_R_FP)
6767

6868
#define FP_OPTION 0
6969

tests/kernel/fpu_sharing/generic/src/float_regs_arm_gcc.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* @file
3-
* @brief ARM Cortex-M4 GCC specific floating point register macros
3+
* @brief ARM GCC specific floating point register macros
44
*/
55

66
/*
@@ -12,8 +12,9 @@
1212
#ifndef _FLOAT_REGS_ARM_GCC_H
1313
#define _FLOAT_REGS_ARM_GCC_H
1414

15-
#if !defined(__GNUC__) || !defined(CONFIG_ARMV7_M_ARMV8_M_FP)
16-
#error __FILE__ goes only with Cortex-M GCC
15+
#if !defined(__GNUC__) \
16+
|| !(defined(CONFIG_ARMV7_M_ARMV8_M_FP) || defined(CONFIG_ARMV7_R_FP))
17+
#error __FILE__ goes only with ARM GCC
1718
#endif
1819

1920
#include <toolchain.h>

tests/kernel/fpu_sharing/generic/src/load_store.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
#else
4545
#include "float_regs_x86_other.h"
4646
#endif /* __GNUC__ */
47-
#elif defined(CONFIG_ARMV7_M_ARMV8_M_FP)
47+
#elif defined(CONFIG_ARMV7_M_ARMV8_M_FP) || defined(CONFIG_ARMV7_R_FP)
4848
#if defined(__GNUC__)
4949
#include "float_regs_arm_gcc.h"
5050
#else
@@ -191,7 +191,7 @@ static void load_store_low(void)
191191
* disable floating point operations for the task.
192192
*/
193193
#if (defined(CONFIG_X86) && defined(CONFIG_LAZY_FPU_SHARING)) || \
194-
defined(CONFIG_ARMV7_M_ARMV8_M_FP)
194+
defined(CONFIG_ARMV7_M_ARMV8_M_FP) || defined(CONFIG_ARMV7_R_FP)
195195
/*
196196
* In x86:
197197
* The subsequent execution of _load_all_float_registers() will

tests/kernel/fpu_sharing/generic/testcase.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ tests:
88
min_ram: 16
99
kernel.fpu_sharing.generic.arm:
1010
extra_args: PI_NUM_ITERATIONS=70000
11-
filter: CONFIG_ARMV7_M_ARMV8_M_FP
11+
filter: CONFIG_ARMV7_M_ARMV8_M_FP or CONFIG_ARMV7_R_FP
1212
slow: true
1313
tags: fpu kernel
1414
timeout: 600

0 commit comments

Comments
 (0)