summaryrefslogtreecommitdiffstats
path: root/cpukit/score/cpu
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2022-10-14 07:41:33 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2022-10-14 10:48:23 +0200
commita1f23c2879fef29689f5eae1c8280601cc6cf6cb (patch)
tree6631e9538d824bb05d3f0d8fb4a155495cbb399e /cpukit/score/cpu
parentpowerpc: Fix 'noreturn' function does return (diff)
downloadrtems-a1f23c2879fef29689f5eae1c8280601cc6cf6cb.tar.bz2
powerpc: Conditionally provide Context_Control_fp
This avoids a pedantic warning about a zero size Context_Control_fp.
Diffstat (limited to 'cpukit/score/cpu')
-rw-r--r--cpukit/score/cpu/powerpc/include/rtems/score/cpu.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/cpukit/score/cpu/powerpc/include/rtems/score/cpu.h b/cpukit/score/cpu/powerpc/include/rtems/score/cpu.h
index 84f0bf3f65..4351cb97eb 100644
--- a/cpukit/score/cpu/powerpc/include/rtems/score/cpu.h
+++ b/cpukit/score/cpu/powerpc/include/rtems/score/cpu.h
@@ -449,8 +449,8 @@ static inline ppc_context *ppc_get_context( const Context_Control *context )
#endif
#ifndef ASM
-typedef struct {
#if (PPC_HAS_FPU == 1)
+typedef struct {
/* The ABIs (PowerOpen/SVR4/EABI) only require saving f14-f31 over
* procedure calls. However, this would mean that the interrupt
* frame had to hold f0-f13, and the fpscr. And as the majority
@@ -464,9 +464,8 @@ typedef struct {
float f[32];
uint32_t fpscr;
#endif
-#endif /* (PPC_HAS_FPU == 1) */
} Context_Control_fp;
-
+#endif /* (PPC_HAS_FPU == 1) */
#endif /* ASM */
/*
@@ -562,7 +561,9 @@ typedef struct {
* CPUs with a "floating point save context" instruction.
*/
+#if (PPC_HAS_FPU == 1)
#define CPU_CONTEXT_FP_SIZE sizeof( Context_Control_fp )
+#endif
/*
* (Optional) # of bytes for libmisc/stackchk to check
@@ -940,6 +941,7 @@ RTEMS_NO_RETURN void _CPU_Context_switch_no_return(
RTEMS_NO_RETURN void _CPU_Context_restore( Context_Control *new_context );
+#if (PPC_HAS_FPU == 1)
/*
* _CPU_Context_save_fp
*
@@ -959,6 +961,7 @@ void _CPU_Context_save_fp(
void _CPU_Context_restore_fp(
Context_Control_fp **fp_context_ptr
);
+#endif
#ifdef RTEMS_SMP
uint32_t _CPU_SMP_Initialize( void );