Zephyr Project API
3.7.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
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
#include <
zephyr/toolchain.h
>
16
#include "
float_context.h
"
17
18
#if defined(CONFIG_VFP_FEATURE_REGS_S64_D32)
19
20
static
inline
void
_load_all_float_registers(
struct
fp_register_set
*regs)
21
{
22
__asm__
volatile
(
23
"vldmia %0, {d0-d15};\n\t"
24
"vldmia %1, {d16-d31};\n\t"
25
: :
"r"
(®s->
fp_volatile
),
"r"
(®s->
fp_non_volatile
)
26
);
27
}
28
29
static
inline
void
_store_all_float_registers(
struct
fp_register_set
*regs)
30
{
31
__asm__
volatile
(
32
"vstmia %0, {d0-d15};\n\t"
33
"vstmia %1, {d16-d31};\n\t"
34
: :
"r"
(®s->
fp_volatile
),
"r"
(®s->
fp_non_volatile
)
35
:
"memory"
36
);
37
}
38
39
static
inline
void
_load_then_store_all_float_registers(
struct
fp_register_set
*regs)
40
{
41
_load_all_float_registers(regs);
42
_store_all_float_registers(regs);
43
}
44
45
#else
46
64
static
inline
void
_load_all_float_registers(
struct
fp_register_set
*regs)
65
{
66
__asm__
volatile
(
67
"vldmia %0, {s0-s15};\n\t"
68
"vldmia %1, {s16-s31};\n\t"
69
: :
"r"
(®s->
fp_volatile
),
"r"
(®s->
fp_non_volatile
)
70
);
71
}
72
84
static
inline
void
_store_all_float_registers(
struct
fp_register_set
*regs)
85
{
86
__asm__
volatile
(
87
"vstmia %0, {s0-s15};\n\t"
88
"vstmia %1, {s16-s31};\n\t"
89
: :
"r"
(®s->
fp_volatile
),
"r"
(®s->
fp_non_volatile
)
90
:
"memory"
91
);
92
}
93
107
static
inline
void
_load_then_store_all_float_registers(
struct
fp_register_set
108
*regs)
109
{
110
_load_all_float_registers(regs);
111
_store_all_float_registers(regs);
112
}
113
114
#endif
115
116
#endif
/* _FLOAT_REGS_ARM_GCC_H */
float_context.h
common definitions for the FPU sharing test application
fp_register_set
Definition
float_context.h:192
fp_register_set::fp_non_volatile
struct fp_non_volatile_register_set fp_non_volatile
Definition
float_context.h:194
fp_register_set::fp_volatile
struct fp_volatile_register_set fp_volatile
Definition
float_context.h:193
toolchain.h
Macros to abstract toolchain specific capabilities.
tests
kernel
fpu_sharing
generic
src
float_regs_arm_gcc.h
Generated on Sun Sep 15 2024 17:01:30 for Zephyr Project API by
1.9.8