diff options
author | Blue Swirl <blauwirbel@gmail.com> | 2010-04-18 14:26:51 +0000 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2010-04-18 14:26:51 +0000 |
commit | 7b13448f05882b98c836c32329b1aca347abeb52 (patch) | |
tree | 74215f7e5f94db97868e9ab7f859cc6a47f70bc7 /target-ppc | |
parent | 8c0d577eb5e5255333e43bd4b89dc3a266f03685 (diff) |
PPC: avoid function pointer type mismatch, spotted by clang
Fixes clang errors:
CC ppc-softmmu/translate.o
/src/qemu/target-ppc/translate.c:3748:13: error: comparison of distinct pointer types ('void (*)(void *, int, int)' and 'void *')
if (likely(read_cb != SPR_NOACCESS)) {
/src/qemu/target-ppc/translate.c:3748:28: note: instantiated from:
if (likely(read_cb != SPR_NOACCESS)) {
/src/qemu/target-ppc/translate.c:3903:13: error: comparison of distinct pointer types ('void (*)(void *, int, int)' and 'void *')
if (likely(write_cb != SPR_NOACCESS)) {
/src/qemu/target-ppc/translate.c:3903:29: note: instantiated from:
if (likely(write_cb != SPR_NOACCESS)) {
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'target-ppc')
-rw-r--r-- | target-ppc/translate.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/target-ppc/translate.c b/target-ppc/translate.c index 0af7e4f151..3869c2401b 100644 --- a/target-ppc/translate.c +++ b/target-ppc/translate.c @@ -3719,16 +3719,14 @@ static void gen_mfmsr(DisasContext *ctx) #endif } -#if 1 -#define SPR_NOACCESS ((void *)(-1UL)) -#else -static void spr_noaccess (void *opaque, int sprn) +static void spr_noaccess(void *opaque, int gprn, int sprn) { +#if 0 sprn = ((sprn >> 5) & 0x1F) | ((sprn & 0x1F) << 5); printf("ERROR: try to access SPR %d !\n", sprn); +#endif } #define SPR_NOACCESS (&spr_noaccess) -#endif /* mfspr */ static inline void gen_op_mfspr(DisasContext *ctx) |