diff options
author | Song Gao <gaosong@loongson.cn> | 2023-05-04 20:27:27 +0800 |
---|---|---|
committer | Song Gao <gaosong@loongson.cn> | 2023-05-06 11:19:42 +0800 |
commit | 16f5396cec23960d5507e738d978bfc3d48628a3 (patch) | |
tree | c78506b826f57e2cbed35335c610f51d7f8e9424 /target/loongarch/internals.h | |
parent | eb5c3932a383ba1ef3a911232c644f2e053ef66c (diff) | |
download | qemu-16f5396cec23960d5507e738d978bfc3d48628a3.zip qemu-16f5396cec23960d5507e738d978bfc3d48628a3.tar.gz qemu-16f5396cec23960d5507e738d978bfc3d48628a3.tar.bz2 |
target/loongarch: Add LSX data type VReg
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Song Gao <gaosong@loongson.cn>
Message-Id: <20230504122810.4094787-2-gaosong@loongson.cn>
Diffstat (limited to 'target/loongarch/internals.h')
-rw-r--r-- | target/loongarch/internals.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/target/loongarch/internals.h b/target/loongarch/internals.h index f01635a..4c5752f 100644 --- a/target/loongarch/internals.h +++ b/target/loongarch/internals.h @@ -21,6 +21,28 @@ /* Global bit for huge page */ #define LOONGARCH_HGLOBAL_SHIFT 12 +#if HOST_BIG_ENDIAN +#define B(x) B[15 - (x)] +#define H(x) H[7 - (x)] +#define W(x) W[3 - (x)] +#define D(x) D[1 - (x)] +#define UB(x) UB[15 - (x)] +#define UH(x) UH[7 - (x)] +#define UW(x) UW[3 - (x)] +#define UD(x) UD[1 -(x)] +#define Q(x) Q[x] +#else +#define B(x) B[x] +#define H(x) H[x] +#define W(x) W[x] +#define D(x) D[x] +#define UB(x) UB[x] +#define UH(x) UH[x] +#define UW(x) UW[x] +#define UD(x) UD[x] +#define Q(x) Q[x] +#endif + void loongarch_translate_init(void); void loongarch_cpu_dump_state(CPUState *cpu, FILE *f, int flags); |