* [Qemu-devel] [6173] Add GEN_VXFORM_UIMM macro for subsequent instructions.
@ 2009-01-04 22:10 Aurelien Jarno
0 siblings, 0 replies; only message in thread
From: Aurelien Jarno @ 2009-01-04 22:10 UTC (permalink / raw)
To: qemu-devel
Revision: 6173
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6173
Author: aurel32
Date: 2009-01-04 22:10:40 +0000 (Sun, 04 Jan 2009)
Log Message:
-----------
Add GEN_VXFORM_UIMM macro for subsequent instructions.
Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Modified Paths:
--------------
trunk/target-ppc/translate.c
Modified: trunk/target-ppc/translate.c
===================================================================
--- trunk/target-ppc/translate.c 2009-01-04 22:10:28 UTC (rev 6172)
+++ trunk/target-ppc/translate.c 2009-01-04 22:10:40 UTC (rev 6173)
@@ -372,6 +372,8 @@
EXTRACT_HELPER(UIMM, 0, 16);
/* 5 bits signed immediate value */
EXTRACT_HELPER(SIMM5, 16, 5);
+/* 5 bits signed immediate value */
+EXTRACT_HELPER(UIMM5, 16, 5);
/* Bit count */
EXTRACT_HELPER(NB, 11, 5);
/* Shift count */
@@ -6288,6 +6290,24 @@
tcg_temp_free_ptr(rd); \
}
+#define GEN_VXFORM_UIMM(name, opc2, opc3) \
+ GEN_HANDLER(name, 0x04, opc2, opc3, 0x00000000, PPC_ALTIVEC) \
+ { \
+ TCGv_ptr rb, rd; \
+ TCGv_i32 uimm; \
+ if (unlikely(!ctx->altivec_enabled)) { \
+ gen_exception(ctx, POWERPC_EXCP_VPU); \
+ return; \
+ } \
+ uimm = tcg_const_i32(UIMM5(ctx->opcode)); \
+ rb = gen_avr_ptr(rB(ctx->opcode)); \
+ rd = gen_avr_ptr(rD(ctx->opcode)); \
+ gen_helper_##name (rd, rb, uimm); \
+ tcg_temp_free_i32(uimm); \
+ tcg_temp_free_ptr(rb); \
+ tcg_temp_free_ptr(rd); \
+ }
+
GEN_HANDLER(vsldoi, 0x04, 0x16, 0xFF, 0x00000400, PPC_ALTIVEC)
{
TCGv_ptr ra, rb, rd;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-01-04 22:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-04 22:10 [Qemu-devel] [6173] Add GEN_VXFORM_UIMM macro for subsequent instructions Aurelien Jarno
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).