Revision 5af45186 target-i386/op.c

b/target-i386/op.c
2144 2144
}
2145 2145

  
2146 2146
/* SSE support */
2147
static inline void memcpy16(void *d, void *s)
2147
void OPPROTO op_com_dummy(void)
2148 2148
{
2149
    ((uint32_t *)d)[0] = ((uint32_t *)s)[0];
2150
    ((uint32_t *)d)[1] = ((uint32_t *)s)[1];
2151
    ((uint32_t *)d)[2] = ((uint32_t *)s)[2];
2152
    ((uint32_t *)d)[3] = ((uint32_t *)s)[3];
2153
}
2154

  
2155
void OPPROTO op_movo(void)
2156
{
2157
    /* XXX: badly generated code */
2158
    XMMReg *d, *s;
2159
    d = (XMMReg *)((char *)env + PARAM1);
2160
    s = (XMMReg *)((char *)env + PARAM2);
2161
    memcpy16(d, s);
2162
}
2163

  
2164
void OPPROTO op_movq(void)
2165
{
2166
    uint64_t *d, *s;
2167
    d = (uint64_t *)((char *)env + PARAM1);
2168
    s = (uint64_t *)((char *)env + PARAM2);
2169
    *d = *s;
2170
}
2171

  
2172
void OPPROTO op_movl(void)
2173
{
2174
    uint32_t *d, *s;
2175
    d = (uint32_t *)((char *)env + PARAM1);
2176
    s = (uint32_t *)((char *)env + PARAM2);
2177
    *d = *s;
2178
}
2179

  
2180
void OPPROTO op_movq_env_0(void)
2181
{
2182
    uint64_t *d;
2183
    d = (uint64_t *)((char *)env + PARAM1);
2184
    *d = 0;
2149
    T0 = 0;
2185 2150
}
2186 2151

  
2187 2152
void OPPROTO op_fxsave_A0(void)
......
2194 2159
    helper_fxrstor(A0, PARAM1);
2195 2160
}
2196 2161

  
2197
/* XXX: optimize by storing fptt and fptags in the static cpu state */
2198
void OPPROTO op_enter_mmx(void)
2199
{
2200
    env->fpstt = 0;
2201
    *(uint32_t *)(env->fptags) = 0;
2202
    *(uint32_t *)(env->fptags + 4) = 0;
2203
}
2204

  
2205
void OPPROTO op_emms(void)
2206
{
2207
    /* set to empty state */
2208
    *(uint32_t *)(env->fptags) = 0x01010101;
2209
    *(uint32_t *)(env->fptags + 4) = 0x01010101;
2210
}
2211

  
2212
#define SHIFT 0
2213
#include "ops_sse.h"
2214

  
2215
#define SHIFT 1
2216
#include "ops_sse.h"
2217

  
2218 2162
/* Secure Virtual Machine ops */
2219 2163

  
2220 2164
void OPPROTO op_vmrun(void)

Also available in: Unified diff