diff options
author | Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> | 2019-03-07 18:05:16 +0000 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2019-03-12 14:33:04 +1100 |
commit | da7815ef31ff371427991cc90a3beef2ce0cc861 (patch) | |
tree | 8b41ebcaad021d0ed4c3feb29700705d8ac7c912 /target/ppc/cpu.h | |
parent | 45141dfd2372bd07532417e27b713ef6edbca12e (diff) | |
download | qemu-da7815ef31ff371427991cc90a3beef2ce0cc861.zip |
target/ppc: move Vsr* macros from internal.h to cpu.h
It isn't possible to include internal.h from cpu.h so move the Vsr* macros
into cpu.h alongside the other VMX/VSX register access functions.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Message-Id: <20190307180520.13868-4-mark.cave-ayland@ilande.co.uk>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'target/ppc/cpu.h')
-rw-r--r-- | target/ppc/cpu.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h index fb0f021bf4..86d9faaa2c 100644 --- a/target/ppc/cpu.h +++ b/target/ppc/cpu.h @@ -2563,6 +2563,26 @@ static inline bool lsw_reg_in_range(int start, int nregs, int rx) } /* Accessors for FP, VMX and VSX registers */ +#if defined(HOST_WORDS_BIGENDIAN) +#define VsrB(i) u8[i] +#define VsrSB(i) s8[i] +#define VsrH(i) u16[i] +#define VsrSH(i) s16[i] +#define VsrW(i) u32[i] +#define VsrSW(i) s32[i] +#define VsrD(i) u64[i] +#define VsrSD(i) s64[i] +#else +#define VsrB(i) u8[15 - (i)] +#define VsrSB(i) s8[15 - (i)] +#define VsrH(i) u16[7 - (i)] +#define VsrSH(i) s16[7 - (i)] +#define VsrW(i) u32[3 - (i)] +#define VsrSW(i) s32[3 - (i)] +#define VsrD(i) u64[1 - (i)] +#define VsrSD(i) s64[1 - (i)] +#endif + static inline int fpr_offset(int i) { return offsetof(CPUPPCState, vsr[i].u64[0]); |