Skip to contentSkip to conversation

[4441] converted SSE/MMX ops to TCG

Qemu-devel Fabrice Bellard 1 participant 1 message May 12, 2008

lore
Share & tools
lore
#0 lore raw

Revision: 4441

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4441
Author:   bellard
Date:     2008-05-12 16:47:36 +0000 (Mon, 12 May 2008)

Log Message:
-----------
converted SSE/MMX ops to TCG

Modified Paths:
--------------

    trunk/target-i386/helper.c
    trunk/target-i386/helper.h
    trunk/target-i386/op.c
    trunk/target-i386/ops_sse.h
    trunk/target-i386/translate.c

Added Paths:
-----------

    trunk/target-i386/ops_sse_header.h

Modified: trunk/target-i386/helper.c
===================================================================

target-i386/helper.c +29 -0
@@ -4462,3 +4462,32 @@
 }
 
 #endif
+
+/* MMX/SSE */
+/* XXX: optimize by storing fptt and fptags in the static cpu state */
+void helper_enter_mmx(void)
+{
+    env->fpstt = 0;
+    *(uint32_t *)(env->fptags) = 0;
+    *(uint32_t *)(env->fptags + 4) = 0;
+}
+
+void helper_emms(void)
+{
+    /* set to empty state */
+    *(uint32_t *)(env->fptags) = 0x01010101;
+    *(uint32_t *)(env->fptags + 4) = 0x01010101;
+}
+
+/* XXX: suppress */
+void helper_movq(uint64_t *d, uint64_t *s)
+{
+    *d = *s;
+}
+
+#define SHIFT 0
+#include "ops_sse.h"
+
+#define SHIFT 1
+#include "ops_sse.h"
+

Modified: trunk/target-i386/helper.h
===================================================================

target-i386/helper.h +9 -0
@@ -2,3 +2,12 @@
 
 void TCG_HELPER_PROTO helper_divl_EAX_T0(target_ulong t0);
 void TCG_HELPER_PROTO helper_idivl_EAX_T0(target_ulong t0);
+void TCG_HELPER_PROTO helper_enter_mmx(void);
+void TCG_HELPER_PROTO helper_emms(void);
+void TCG_HELPER_PROTO helper_movq(uint64_t *d, uint64_t *s);
+
+#define SHIFT 0
+#include "ops_sse_header.h"
+#define SHIFT 1
+#include "ops_sse_header.h"
+

Modified: trunk/target-i386/op.c
===================================================================

target-i386/op.c +2 -58

75 lines not on this page · raw message

Modified: trunk/target-i386/ops_sse.h
===================================================================

target-i386/ops_sse.h +210 -491

1,386 lines not on this page · raw message

Added: trunk/target-i386/ops_sse_header.h
===================================================================

target-i386/ops_sse_header.h +264 -0

264 lines not on this page · raw message

Modified: trunk/target-i386/translate.c
===================================================================

target-i386/translate.c +198 -119

599 lines not on this page · raw message