]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
tcg/ppc: Introduce macros VRT(), VRA(), VRB(), VRC()
authorRichard Henderson <richard.henderson@linaro.org>
Sun, 23 Jun 2019 17:04:37 +0000 (19:04 +0200)
committerRichard Henderson <richard.henderson@linaro.org>
Mon, 14 Oct 2019 14:09:26 +0000 (07:09 -0700)
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>
tcg/ppc/tcg-target.inc.c

index 8dc545560063caf818dbb6adefc9faea63a389b0..4aad5d2b362cd420cba742ee9f5fa0a5b6c3e45d 100644 (file)
@@ -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))