Zephyr Project API
3.3.0
A Scalable Open Source RTOS
float_regs_arm_gcc.h
Go to the documentation of this file.
1
6
/*
7
* Copyright (c) 2016, Wind River Systems, Inc.
8
*
9
* SPDX-License-Identifier: Apache-2.0
10
*/
11
12
#ifndef _FLOAT_REGS_ARM_GCC_H
13
#define _FLOAT_REGS_ARM_GCC_H
14
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
18
#endif
19
20
#include <
zephyr/toolchain.h
>
21
#include "
float_context.h
"
22
40
static
inline
void
_load_all_float_registers(
struct
fp_register_set
*regs)
41
{
42
__asm__
volatile
(
43
"vldmia %0, {s0-s15};\n\t"
44
"vldmia %1, {s16-s31};\n\t"
45
: :
"r"
(®s->
fp_volatile
),
"r"
(®s->
fp_non_volatile
)
46
);
47
}
48
60
static
inline
void
_store_all_float_registers(
struct
fp_register_set
*regs)
61
{
62
__asm__
volatile
(
63
"vstmia %0, {s0-s15};\n\t"
64
"vstmia %1, {s16-s31};\n\t"
65
: :
"r"
(®s->
fp_volatile
),
"r"
(®s->
fp_non_volatile
)
66
:
"memory"
67
);
68
}
69
83
static
inline
void
_load_then_store_all_float_registers(
struct
fp_register_set
84
*regs)
85
{
86
_load_all_float_registers(regs);
87
_store_all_float_registers(regs);
88
}
89
#endif
/* _FLOAT_REGS_ARM_GCC_H */
float_context.h
common definitions for the FPU sharing test application
fp_register_set
Definition:
float_context.h:177
fp_register_set::fp_non_volatile
struct fp_non_volatile_register_set fp_non_volatile
Definition:
float_context.h:179
fp_register_set::fp_volatile
struct fp_volatile_register_set fp_volatile
Definition:
float_context.h:178
toolchain.h
Macros to abstract toolchain specific capabilities.
tests
kernel
fpu_sharing
generic
src
float_regs_arm_gcc.h
Generated on Fri Jun 9 2023 14:09:43 for Zephyr Project API by
1.9.2