Zephyr API Documentation
2.7.0-rc2
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__) || !defined(CONFIG_ARMV7_M_ARMV8_M_FP)
16
#error __FILE__ goes only with Cortex-M GCC
17
#endif
18
19
#include <
toolchain.h
>
20
#include "
float_context.h
"
21
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
61
static
inline
void
_store_all_float_registers(
struct
fp_register_set
*regs)
62
{
63
__asm__
volatile
(
64
"vstmia %0, {s0-s15};\n\t"
65
"vstmia %1, {s16-s31};\n\t"
66
: :
"r"
(®s->
fp_volatile
),
"r"
(®s->
fp_non_volatile
)
67
:
"memory"
68
);
69
}
70
85
static
inline
void
_load_then_store_all_float_registers(
struct
fp_register_set
86
*regs)
87
{
88
_load_all_float_registers(regs);
89
_store_all_float_registers(regs);
90
}
91
#endif
/* _FLOAT_REGS_ARM_GCC_H */
float_context.h
common definitions for the FPU sharing test application
fp_register_set
Definition:
float_context.h:164
fp_register_set::fp_non_volatile
struct fp_non_volatile_register_set fp_non_volatile
Definition:
float_context.h:166
fp_register_set::fp_volatile
struct fp_volatile_register_set fp_volatile
Definition:
float_context.h:165
toolchain.h
Macros to abstract toolchain specific capabilities.
tests
kernel
fpu_sharing
generic
src
float_regs_arm_gcc.h
Generated on Sun Oct 9 2022 09:21:57 for Zephyr API Documentation by
1.9.4