1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * QEMU LoongArch vector utilitites
5 * Copyright (c) 2023 Loongson Technology Corporation Limited
8 #ifndef LOONGARCH_VEC_H
9 #define LOONGARCH_VEC_H
12 #define B(x) B[(x) ^ 15]
13 #define H(x) H[(x) ^ 7]
14 #define W(x) W[(x) ^ 3]
15 #define D(x) D[(x) ^ 1]
16 #define UB(x) UB[(x) ^ 15]
17 #define UH(x) UH[(x) ^ 7]
18 #define UW(x) UW[(x) ^ 3]
19 #define UD(x) UD[(x) ^ 1]
31 #endif /* HOST_BIG_ENDIAN */
33 #endif /* LOONGARCH_VEC_H */