ppc: Some FPU helper functions must be inline
PATCH 1/1 ppc: Some FPU helper functions must be inline
float_invalid_op_excp() and float_check_status() must be inline due to their use of GETPC().
Use __attribute__((__always_inline__)) to enforce it
--- target-ppc/fpu_helper.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
target-ppc/fpu_helper.c +4 -3
@@ -117,8 +117,8 @@ void helper_compute_fprf(CPUPPCState *env, uint64_t arg) }/* Floating-point invalid operations exception */ -static inline uint64_t float_invalid_op_excp (CPUPPCState *env,int op, -int set_fpcc) +static inline __attribute__((__always_inline__)) +uint64_t float_invalid_op_excp (CPUPPCState *env,int op,int set_fpcc) {CPUState *cs =CPU (ppc_env_get_cpu (env));uint64_t ret =0 ;
@@ -519,7 +519,8 @@ static void do_float_check_status(CPUPPCState *env, uintptr_t raddr) } } -static inline void float_check_status (CPUPPCState *env) +static inline __attribute__((__always_inline__)) +void float_check_status (CPUPPCState *env) {/* GETPC() works here because this is inline */ do_float_check_status (env,GETPC ());
Quoted 6 lines · Benjamin Herrenschmidt
float_invalid_op_excp()andfloat_check_status()must be inline due to their use ofGETPC().Use __attribute__((__always_inline__)) to enforce it
Signed-off-by Benjamin Herrenschmidt <[email protected]>
Do you want me to fold this into the patch it fixes?
Quoted 30 lines
--- target-ppc/fpu_helper.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)target-ppc/fpu_helper.c +4
-3@@ -117,8 +117,8 @@ void helper_compute_fprf(CPUPPCState *env, uint64_t arg) }/* Floating-point invalid operations exception */ -static inline uint64_t float_invalid_op_excp (CPUPPCState *env,int op, -int set_fpcc) +static inline __attribute__((__always_inline__)) +uint64_t float_invalid_op_excp (CPUPPCState *env,int op,int set_fpcc) {CPUState *cs =CPU (ppc_env_get_cpu (env));uint64_t ret =0 ;@@ -519,7 +519,8 @@ static void do_float_check_status(CPUPPCState *env, uintptr_t raddr) } } -static inline void float_check_status (CPUPPCState *env) +static inline __attribute__((__always_inline__)) +void float_check_status (CPUPPCState *env) {/* GETPC() works here because this is inline */ do_float_check_status (env,GETPC ());
Signature · 4 lines
David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson
Quoted 11 lines · David Gibson
Quoted 7 lines · Benjamin Herrenschmidt
float_invalid_op_excp()andfloat_check_status()must be inline due to their use ofGETPC().Use __attribute__((__always_inline__)) to enforce it
Signed-off-by Benjamin Herrenschmidt <[email protected]>Do you want me to fold this into the patch it fixes?
Feel free, sure
Cheers,
Ben.
Quoted 36 lines
Quoted 35 lines
---
target-ppc/fpu_helper.c | 7 ++++---1 file changed, 4 insertions(+), 3 deletions(-)target-ppc/fpu_helper.c +0
-0@@ -117,8 +117,8 @@ void helper_compute_fprf(CPUPPCState *env, uint64_t arg) }
/* Floating-point invalid operations exception */ -static inlineuint64_tfloat_invalid_op_excp(CPUPPCState *env, int op,
- intset_fpcc)target-ppc/fpu_helper.c +2
-0+static inline __attribute__((__always_inline__)) +uint64_t float_invalid_op_excp(CPUPPCState *env, int op, int
set_fpcc)
{
CPUState *cs = CPU(ppc_env_get_cpu(env));
uint64_t ret = 0;target-ppc/fpu_helper.c +0
-0@@ -519,7 +519,8 @@ static void do_float_check_status(CPUPPCState *env, uintptr_t raddr) } }target-ppc/fpu_helper.c +2
-1-static inline void float_check_status (CPUPPCState *env) +static inline __attribute__((__always_inline__)) +void float_check_status (CPUPPCState *env){
/*GETPC()works here because this is inline */do_float_check_status(env, GETPC());
Quoted 7 lines · Benjamin Herrenschmidt
Quoted 6 lines · David Gibson
Quoted 4 lines · Benjamin Herrenschmidt
float_invalid_op_excp()andfloat_check_status()must be inline due to their use ofGETPC().
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Use __attribute__((__always_inline__)) to enforce it
Signed-off-by Benjamin Herrenschmidt <[email protected]>Do you want me to fold this into the patch it fixes?
Feel free, sure
Ok, done.
Signature · 4 lines
David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson