diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2019-06-23 19:04:37 +0200 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2019-10-14 07:09:26 -0700 |
commit | b82f769cc16b4ee7b628e7a923d3b09eb1d85a80 (patch) | |
tree | 81ac70ec878aacda253424d17c276a0a839a91dd | |
parent | 1838905eb3a6283b14b67e71bc1576d6b75ceadc (diff) |
tcg/ppc: Introduce macros VRT(), VRA(), VRB(), VRC()
Introduce macros VRT(), VRA(), VRB(), VRC() used for encoding
elements of Altivec instructions.
Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
-rw-r--r-- | tcg/ppc/tcg-target.inc.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tcg/ppc/tcg-target.inc.c b/tcg/ppc/tcg-target.inc.c index 8dc5455600..4aad5d2b36 100644 --- a/tcg/ppc/tcg-target.inc.c +++ b/tcg/ppc/tcg-target.inc.c @@ -473,6 +473,11 @@ static int tcg_target_const_match(tcg_target_long val, TCGType type, #define MB64(b) ((b)<<5) #define FXM(b) (1 << (19 - (b))) +#define VRT(r) (((r) & 31) << 21) +#define VRA(r) (((r) & 31) << 16) +#define VRB(r) (((r) & 31) << 11) +#define VRC(r) (((r) & 31) << 6) + #define LK 1 #define TAB(t, a, b) (RT(t) | RA(a) | RB(b)) |