2020-08-25 11:23:25 +00:00
|
|
|
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-│
|
|
|
|
│vi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :vi│
|
|
|
|
╞══════════════════════════════════════════════════════════════════════════════╡
|
|
|
|
│ Copyright 2020 Justine Alexandra Roberts Tunney │
|
|
|
|
│ │
|
|
|
|
│ This program is free software; you can redistribute it and/or modify │
|
|
|
|
│ it under the terms of the GNU General Public License as published by │
|
|
|
|
│ the Free Software Foundation; version 2 of the License. │
|
|
|
|
│ │
|
|
|
|
│ This program is distributed in the hope that it will be useful, but │
|
|
|
|
│ WITHOUT ANY WARRANTY; without even the implied warranty of │
|
|
|
|
│ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU │
|
|
|
|
│ General Public License for more details. │
|
|
|
|
│ │
|
|
|
|
│ You should have received a copy of the GNU General Public License │
|
|
|
|
│ along with this program; if not, write to the Free Software │
|
|
|
|
│ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA │
|
|
|
|
│ 02110-1301 USA │
|
|
|
|
╚─────────────────────────────────────────────────────────────────────────────*/
|
|
|
|
#include "libc/macros.h"
|
|
|
|
#include "libc/math.h"
|
|
|
|
#include "tool/build/lib/cvt.h"
|
|
|
|
#include "tool/build/lib/endian.h"
|
|
|
|
#include "tool/build/lib/machine.h"
|
|
|
|
#include "tool/build/lib/memory.h"
|
|
|
|
#include "tool/build/lib/modrm.h"
|
|
|
|
#include "tool/build/lib/throw.h"
|
|
|
|
|
2020-08-31 12:17:31 +00:00
|
|
|
static double SseRoundDouble(struct Machine *m, double x) {
|
|
|
|
switch (m->sse.rc) {
|
|
|
|
case 0:
|
|
|
|
return nearbyint(x);
|
|
|
|
case 1:
|
|
|
|
return floor(x);
|
|
|
|
case 2:
|
|
|
|
return ceil(x);
|
|
|
|
case 3:
|
|
|
|
return trunc(x);
|
|
|
|
default:
|
|
|
|
unreachable;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-08-27 06:08:08 +00:00
|
|
|
static void OpGdqpWssCvttss2si(struct Machine *m, uint32_t rde) {
|
2020-08-25 11:23:25 +00:00
|
|
|
float f;
|
|
|
|
int64_t n;
|
2020-08-27 06:08:08 +00:00
|
|
|
memcpy(&f, GetModrmRegisterXmmPointerRead4(m, rde), 4);
|
2020-08-25 11:23:25 +00:00
|
|
|
n = f;
|
2020-08-27 06:08:08 +00:00
|
|
|
if (!Rexw(rde)) n &= 0xffffffff;
|
|
|
|
Write64(RegRexrReg(m, rde), n);
|
2020-08-25 11:23:25 +00:00
|
|
|
}
|
|
|
|
|
2020-08-27 06:08:08 +00:00
|
|
|
static void OpGdqpWsdCvttsd2si(struct Machine *m, uint32_t rde) {
|
2020-08-25 11:23:25 +00:00
|
|
|
double d;
|
|
|
|
int64_t n;
|
2020-08-27 06:08:08 +00:00
|
|
|
memcpy(&d, GetModrmRegisterXmmPointerRead8(m, rde), 8);
|
2020-08-25 11:23:25 +00:00
|
|
|
n = d;
|
2020-08-27 06:08:08 +00:00
|
|
|
if (!Rexw(rde)) n &= 0xffffffff;
|
|
|
|
Write64(RegRexrReg(m, rde), n);
|
2020-08-25 11:23:25 +00:00
|
|
|
}
|
|
|
|
|
2020-08-27 06:08:08 +00:00
|
|
|
static void OpGdqpWssCvtss2si(struct Machine *m, uint32_t rde) {
|
2020-08-25 11:23:25 +00:00
|
|
|
float f;
|
|
|
|
int64_t n;
|
2020-08-27 06:08:08 +00:00
|
|
|
memcpy(&f, GetModrmRegisterXmmPointerRead4(m, rde), 4);
|
2020-08-25 11:23:25 +00:00
|
|
|
n = rintf(f);
|
2020-08-27 06:08:08 +00:00
|
|
|
if (!Rexw(rde)) n &= 0xffffffff;
|
|
|
|
Write64(RegRexrReg(m, rde), n);
|
2020-08-25 11:23:25 +00:00
|
|
|
}
|
|
|
|
|
2020-08-27 06:08:08 +00:00
|
|
|
static void OpGdqpWsdCvtsd2si(struct Machine *m, uint32_t rde) {
|
2020-08-25 11:23:25 +00:00
|
|
|
double d;
|
|
|
|
int64_t n;
|
2020-08-27 06:08:08 +00:00
|
|
|
memcpy(&d, GetModrmRegisterXmmPointerRead8(m, rde), 8);
|
2020-08-31 12:17:31 +00:00
|
|
|
n = SseRoundDouble(m, d);
|
2020-08-27 06:08:08 +00:00
|
|
|
if (!Rexw(rde)) n &= 0xffffffff;
|
|
|
|
Write64(RegRexrReg(m, rde), n);
|
2020-08-25 11:23:25 +00:00
|
|
|
}
|
|
|
|
|
2020-08-27 06:08:08 +00:00
|
|
|
static void OpVssEdqpCvtsi2ss(struct Machine *m, uint32_t rde) {
|
2020-08-25 11:23:25 +00:00
|
|
|
float f;
|
|
|
|
int64_t n;
|
|
|
|
uint8_t *p;
|
2020-08-27 06:08:08 +00:00
|
|
|
if (Rexw(rde)) {
|
|
|
|
n = (int64_t)Read64(GetModrmRegisterWordPointerRead8(m, rde));
|
2020-08-25 11:23:25 +00:00
|
|
|
} else {
|
2020-08-27 06:08:08 +00:00
|
|
|
n = (int32_t)Read32(GetModrmRegisterWordPointerRead4(m, rde));
|
2020-08-25 11:23:25 +00:00
|
|
|
}
|
|
|
|
f = n;
|
2020-08-27 06:08:08 +00:00
|
|
|
memcpy(XmmRexrReg(m, rde), &f, 4);
|
2020-08-25 11:23:25 +00:00
|
|
|
}
|
|
|
|
|
2020-08-27 06:08:08 +00:00
|
|
|
static void OpVsdEdqpCvtsi2sd(struct Machine *m, uint32_t rde) {
|
2020-08-25 11:23:25 +00:00
|
|
|
double d;
|
|
|
|
int64_t n;
|
|
|
|
uint8_t *p;
|
2020-08-27 06:08:08 +00:00
|
|
|
if (Rexw(rde)) {
|
|
|
|
n = (int64_t)Read64(GetModrmRegisterWordPointerRead8(m, rde));
|
2020-08-25 11:23:25 +00:00
|
|
|
} else {
|
2020-08-27 06:08:08 +00:00
|
|
|
n = (int32_t)Read32(GetModrmRegisterWordPointerRead4(m, rde));
|
2020-08-25 11:23:25 +00:00
|
|
|
}
|
|
|
|
d = n;
|
2020-08-27 06:08:08 +00:00
|
|
|
memcpy(XmmRexrReg(m, rde), &d, 8);
|
2020-08-25 11:23:25 +00:00
|
|
|
}
|
|
|
|
|
2020-08-27 06:08:08 +00:00
|
|
|
static void OpVpsQpiCvtpi2ps(struct Machine *m, uint32_t rde) {
|
2020-08-25 11:23:25 +00:00
|
|
|
uint8_t *p;
|
|
|
|
float f[2];
|
|
|
|
int32_t i[2];
|
2020-08-27 06:08:08 +00:00
|
|
|
p = GetModrmRegisterMmPointerRead8(m, rde);
|
2020-08-25 11:23:25 +00:00
|
|
|
i[0] = Read32(p + 0);
|
|
|
|
i[1] = Read32(p + 4);
|
|
|
|
f[0] = i[0];
|
|
|
|
f[1] = i[1];
|
2020-08-27 06:08:08 +00:00
|
|
|
memcpy(XmmRexrReg(m, rde), f, 8);
|
2020-08-25 11:23:25 +00:00
|
|
|
}
|
|
|
|
|
2020-08-27 06:08:08 +00:00
|
|
|
static void OpVpdQpiCvtpi2pd(struct Machine *m, uint32_t rde) {
|
2020-08-25 11:23:25 +00:00
|
|
|
uint8_t *p;
|
|
|
|
double f[2];
|
|
|
|
int32_t n[2];
|
2020-08-27 06:08:08 +00:00
|
|
|
p = GetModrmRegisterMmPointerRead8(m, rde);
|
2020-08-25 11:23:25 +00:00
|
|
|
n[0] = Read32(p + 0);
|
|
|
|
n[1] = Read32(p + 4);
|
|
|
|
f[0] = n[0];
|
|
|
|
f[1] = n[1];
|
2020-08-27 06:08:08 +00:00
|
|
|
memcpy(XmmRexrReg(m, rde), f, 16);
|
2020-08-25 11:23:25 +00:00
|
|
|
}
|
|
|
|
|
2020-08-27 06:08:08 +00:00
|
|
|
static void OpPpiWpsqCvtps2pi(struct Machine *m, uint32_t rde) {
|
2020-08-31 12:17:31 +00:00
|
|
|
unsigned i;
|
2020-08-25 11:23:25 +00:00
|
|
|
float f[2];
|
|
|
|
int32_t n[2];
|
2020-08-27 06:08:08 +00:00
|
|
|
memcpy(f, GetModrmRegisterXmmPointerRead8(m, rde), 8);
|
2020-08-31 12:17:31 +00:00
|
|
|
switch (m->sse.rc) {
|
|
|
|
case 0:
|
|
|
|
for (i = 0; i < 2; ++i) n[i] = nearbyintf(f[i]);
|
|
|
|
break;
|
|
|
|
case 1:
|
|
|
|
for (i = 0; i < 2; ++i) n[i] = floorf(f[i]);
|
|
|
|
break;
|
|
|
|
case 2:
|
|
|
|
for (i = 0; i < 2; ++i) n[i] = ceilf(f[i]);
|
|
|
|
break;
|
|
|
|
case 3:
|
|
|
|
for (i = 0; i < 2; ++i) n[i] = truncf(f[i]);
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
unreachable;
|
|
|
|
}
|
2020-08-27 06:08:08 +00:00
|
|
|
Write32(MmReg(m, rde) + 0, n[0]);
|
|
|
|
Write32(MmReg(m, rde) + 4, n[1]);
|
2020-08-25 11:23:25 +00:00
|
|
|
}
|
|
|
|
|
2020-08-27 06:08:08 +00:00
|
|
|
static void OpPpiWpsqCvttps2pi(struct Machine *m, uint32_t rde) {
|
2020-08-25 11:23:25 +00:00
|
|
|
float f[2];
|
|
|
|
int32_t n[2];
|
2020-08-27 06:08:08 +00:00
|
|
|
memcpy(&f, GetModrmRegisterXmmPointerRead8(m, rde), 8);
|
2020-08-25 11:23:25 +00:00
|
|
|
n[0] = f[0];
|
|
|
|
n[1] = f[1];
|
2020-08-27 06:08:08 +00:00
|
|
|
Write32(MmReg(m, rde) + 0, n[0]);
|
|
|
|
Write32(MmReg(m, rde) + 4, n[1]);
|
2020-08-25 11:23:25 +00:00
|
|
|
}
|
|
|
|
|
2020-08-27 06:08:08 +00:00
|
|
|
static void OpPpiWpdCvtpd2pi(struct Machine *m, uint32_t rde) {
|
2020-08-31 12:17:31 +00:00
|
|
|
unsigned i;
|
2020-08-25 11:23:25 +00:00
|
|
|
double d[2];
|
|
|
|
int32_t n[2];
|
2020-08-27 06:08:08 +00:00
|
|
|
memcpy(d, GetModrmRegisterXmmPointerRead16(m, rde), 16);
|
2020-08-31 12:17:31 +00:00
|
|
|
for (i = 0; i < 2; ++i) n[i] = SseRoundDouble(m, d[i]);
|
2020-08-27 06:08:08 +00:00
|
|
|
Write32(MmReg(m, rde) + 0, n[0]);
|
|
|
|
Write32(MmReg(m, rde) + 4, n[1]);
|
2020-08-25 11:23:25 +00:00
|
|
|
}
|
|
|
|
|
2020-08-27 06:08:08 +00:00
|
|
|
static void OpPpiWpdCvttpd2pi(struct Machine *m, uint32_t rde) {
|
2020-08-25 11:23:25 +00:00
|
|
|
double d[2];
|
|
|
|
int32_t n[2];
|
2020-08-27 06:08:08 +00:00
|
|
|
memcpy(&d, GetModrmRegisterXmmPointerRead16(m, rde), 16);
|
2020-08-25 11:23:25 +00:00
|
|
|
n[0] = d[0];
|
|
|
|
n[1] = d[1];
|
2020-08-27 06:08:08 +00:00
|
|
|
Write32(MmReg(m, rde) + 0, n[0]);
|
|
|
|
Write32(MmReg(m, rde) + 4, n[1]);
|
2020-08-25 11:23:25 +00:00
|
|
|
}
|
|
|
|
|
2020-08-27 06:08:08 +00:00
|
|
|
static void OpVpdWpsCvtps2pd(struct Machine *m, uint32_t rde) {
|
2020-08-25 11:23:25 +00:00
|
|
|
float f[2];
|
|
|
|
double d[2];
|
2020-08-27 06:08:08 +00:00
|
|
|
memcpy(f, GetModrmRegisterXmmPointerRead8(m, rde), 8);
|
2020-08-25 11:23:25 +00:00
|
|
|
d[0] = f[0];
|
|
|
|
d[1] = f[1];
|
2020-08-27 06:08:08 +00:00
|
|
|
memcpy(XmmRexrReg(m, rde), d, 16);
|
2020-08-25 11:23:25 +00:00
|
|
|
}
|
|
|
|
|
2020-08-27 06:08:08 +00:00
|
|
|
static void OpVpsWpdCvtpd2ps(struct Machine *m, uint32_t rde) {
|
2020-08-25 11:23:25 +00:00
|
|
|
float f[2];
|
|
|
|
double d[2];
|
2020-08-27 06:08:08 +00:00
|
|
|
memcpy(d, GetModrmRegisterXmmPointerRead16(m, rde), 16);
|
2020-08-25 11:23:25 +00:00
|
|
|
f[0] = d[0];
|
|
|
|
f[1] = d[1];
|
2020-08-27 06:08:08 +00:00
|
|
|
memcpy(XmmRexrReg(m, rde), f, 8);
|
2020-08-25 11:23:25 +00:00
|
|
|
}
|
|
|
|
|
2020-08-27 06:08:08 +00:00
|
|
|
static void OpVssWsdCvtsd2ss(struct Machine *m, uint32_t rde) {
|
2020-08-25 11:23:25 +00:00
|
|
|
float f;
|
|
|
|
double d;
|
2020-08-27 06:08:08 +00:00
|
|
|
memcpy(&d, GetModrmRegisterXmmPointerRead8(m, rde), 8);
|
2020-08-25 11:23:25 +00:00
|
|
|
f = d;
|
2020-08-27 06:08:08 +00:00
|
|
|
memcpy(XmmRexrReg(m, rde), &f, 4);
|
2020-08-25 11:23:25 +00:00
|
|
|
}
|
|
|
|
|
2020-08-27 06:08:08 +00:00
|
|
|
static void OpVsdWssCvtss2sd(struct Machine *m, uint32_t rde) {
|
2020-08-25 11:23:25 +00:00
|
|
|
float f;
|
|
|
|
double d;
|
2020-08-27 06:08:08 +00:00
|
|
|
memcpy(&f, GetModrmRegisterXmmPointerRead4(m, rde), 4);
|
2020-08-25 11:23:25 +00:00
|
|
|
d = f;
|
2020-08-27 06:08:08 +00:00
|
|
|
memcpy(XmmRexrReg(m, rde), &d, 8);
|
2020-08-25 11:23:25 +00:00
|
|
|
}
|
|
|
|
|
2020-08-27 06:08:08 +00:00
|
|
|
static void OpVpsWdqCvtdq2ps(struct Machine *m, uint32_t rde) {
|
2020-08-25 11:23:25 +00:00
|
|
|
unsigned i;
|
|
|
|
float f[4];
|
|
|
|
int32_t n[4];
|
2020-08-27 06:08:08 +00:00
|
|
|
memcpy(n, GetModrmRegisterXmmPointerRead16(m, rde), 16);
|
2020-08-25 11:23:25 +00:00
|
|
|
for (i = 0; i < 4; ++i) f[i] = n[i];
|
2020-08-27 06:08:08 +00:00
|
|
|
memcpy(XmmRexrReg(m, rde), f, 16);
|
2020-08-25 11:23:25 +00:00
|
|
|
}
|
|
|
|
|
2020-08-27 06:08:08 +00:00
|
|
|
static void OpVpdWdqCvtdq2pd(struct Machine *m, uint32_t rde) {
|
2020-08-25 11:23:25 +00:00
|
|
|
unsigned i;
|
|
|
|
double d[2];
|
|
|
|
int32_t n[2];
|
2020-08-27 06:08:08 +00:00
|
|
|
memcpy(n, GetModrmRegisterXmmPointerRead8(m, rde), 8);
|
2020-08-25 11:23:25 +00:00
|
|
|
for (i = 0; i < 2; ++i) d[i] = n[i];
|
2020-08-27 06:08:08 +00:00
|
|
|
memcpy(XmmRexrReg(m, rde), d, 16);
|
2020-08-25 11:23:25 +00:00
|
|
|
}
|
|
|
|
|
2020-08-27 06:08:08 +00:00
|
|
|
static void OpVdqWpsCvttps2dq(struct Machine *m, uint32_t rde) {
|
2020-08-25 11:23:25 +00:00
|
|
|
unsigned i;
|
|
|
|
float f[4];
|
|
|
|
int32_t n[4];
|
2020-08-27 06:08:08 +00:00
|
|
|
memcpy(f, GetModrmRegisterXmmPointerRead16(m, rde), 16);
|
2020-08-25 11:23:25 +00:00
|
|
|
for (i = 0; i < 4; ++i) n[i] = f[i];
|
2020-08-27 06:08:08 +00:00
|
|
|
memcpy(XmmRexrReg(m, rde), n, 16);
|
2020-08-25 11:23:25 +00:00
|
|
|
}
|
|
|
|
|
2020-08-27 06:08:08 +00:00
|
|
|
static void OpVdqWpsCvtps2dq(struct Machine *m, uint32_t rde) {
|
2020-08-25 11:23:25 +00:00
|
|
|
unsigned i;
|
|
|
|
float f[4];
|
|
|
|
int32_t n[4];
|
2020-08-27 06:08:08 +00:00
|
|
|
memcpy(f, GetModrmRegisterXmmPointerRead16(m, rde), 16);
|
2020-08-31 12:17:31 +00:00
|
|
|
switch (m->sse.rc) {
|
|
|
|
case 0:
|
|
|
|
for (i = 0; i < 4; ++i) n[i] = nearbyintf(f[i]);
|
|
|
|
break;
|
|
|
|
case 1:
|
|
|
|
for (i = 0; i < 4; ++i) n[i] = floorf(f[i]);
|
|
|
|
break;
|
|
|
|
case 2:
|
|
|
|
for (i = 0; i < 4; ++i) n[i] = ceilf(f[i]);
|
|
|
|
break;
|
|
|
|
case 3:
|
|
|
|
for (i = 0; i < 4; ++i) n[i] = truncf(f[i]);
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
unreachable;
|
|
|
|
}
|
2020-08-27 06:08:08 +00:00
|
|
|
memcpy(XmmRexrReg(m, rde), n, 16);
|
2020-08-25 11:23:25 +00:00
|
|
|
}
|
|
|
|
|
2020-08-27 06:08:08 +00:00
|
|
|
static void OpVdqWpdCvttpd2dq(struct Machine *m, uint32_t rde) {
|
2020-08-25 11:23:25 +00:00
|
|
|
unsigned i;
|
|
|
|
double d[2];
|
|
|
|
int32_t n[2];
|
2020-08-27 06:08:08 +00:00
|
|
|
memcpy(d, GetModrmRegisterXmmPointerRead16(m, rde), 16);
|
2020-08-25 11:23:25 +00:00
|
|
|
for (i = 0; i < 2; ++i) n[i] = d[i];
|
2020-08-27 06:08:08 +00:00
|
|
|
memcpy(XmmRexrReg(m, rde), n, 8);
|
2020-08-25 11:23:25 +00:00
|
|
|
}
|
|
|
|
|
2020-08-27 06:08:08 +00:00
|
|
|
static void OpVdqWpdCvtpd2dq(struct Machine *m, uint32_t rde) {
|
2020-08-25 11:23:25 +00:00
|
|
|
unsigned i;
|
|
|
|
double d[2];
|
|
|
|
int32_t n[2];
|
2020-08-27 06:08:08 +00:00
|
|
|
memcpy(d, GetModrmRegisterXmmPointerRead16(m, rde), 16);
|
2020-08-31 12:17:31 +00:00
|
|
|
for (i = 0; i < 2; ++i) n[i] = SseRoundDouble(m, d[i]);
|
2020-08-27 06:08:08 +00:00
|
|
|
memcpy(XmmRexrReg(m, rde), n, 8);
|
2020-08-25 11:23:25 +00:00
|
|
|
}
|
|
|
|
|
2020-08-27 06:08:08 +00:00
|
|
|
void OpCvt(struct Machine *m, uint32_t rde, unsigned long op) {
|
|
|
|
switch (op | Rep(rde) | Osz(rde)) {
|
2020-08-25 11:23:25 +00:00
|
|
|
case kOpCvt0f2a + 0:
|
2020-08-27 06:08:08 +00:00
|
|
|
OpVpsQpiCvtpi2ps(m, rde);
|
2020-08-25 11:23:25 +00:00
|
|
|
break;
|
|
|
|
case kOpCvt0f2a + 1:
|
2020-08-27 06:08:08 +00:00
|
|
|
OpVpdQpiCvtpi2pd(m, rde);
|
2020-08-25 11:23:25 +00:00
|
|
|
break;
|
|
|
|
case kOpCvt0f2a + 2:
|
2020-08-27 06:08:08 +00:00
|
|
|
OpVsdEdqpCvtsi2sd(m, rde);
|
2020-08-25 11:23:25 +00:00
|
|
|
break;
|
|
|
|
case kOpCvt0f2a + 3:
|
2020-08-27 06:08:08 +00:00
|
|
|
OpVssEdqpCvtsi2ss(m, rde);
|
2020-08-25 11:23:25 +00:00
|
|
|
break;
|
|
|
|
case kOpCvtt0f2c + 0:
|
2020-08-27 06:08:08 +00:00
|
|
|
OpPpiWpsqCvttps2pi(m, rde);
|
2020-08-25 11:23:25 +00:00
|
|
|
break;
|
|
|
|
case kOpCvtt0f2c + 1:
|
2020-08-27 06:08:08 +00:00
|
|
|
OpPpiWpdCvttpd2pi(m, rde);
|
2020-08-25 11:23:25 +00:00
|
|
|
break;
|
|
|
|
case kOpCvtt0f2c + 2:
|
2020-08-27 06:08:08 +00:00
|
|
|
OpGdqpWsdCvttsd2si(m, rde);
|
2020-08-25 11:23:25 +00:00
|
|
|
break;
|
|
|
|
case kOpCvtt0f2c + 3:
|
2020-08-27 06:08:08 +00:00
|
|
|
OpGdqpWssCvttss2si(m, rde);
|
2020-08-25 11:23:25 +00:00
|
|
|
break;
|
|
|
|
case kOpCvt0f2d + 0:
|
2020-08-27 06:08:08 +00:00
|
|
|
OpPpiWpsqCvtps2pi(m, rde);
|
2020-08-25 11:23:25 +00:00
|
|
|
break;
|
|
|
|
case kOpCvt0f2d + 1:
|
2020-08-27 06:08:08 +00:00
|
|
|
OpPpiWpdCvtpd2pi(m, rde);
|
2020-08-25 11:23:25 +00:00
|
|
|
break;
|
|
|
|
case kOpCvt0f2d + 2:
|
2020-08-27 06:08:08 +00:00
|
|
|
OpGdqpWsdCvtsd2si(m, rde);
|
2020-08-25 11:23:25 +00:00
|
|
|
break;
|
|
|
|
case kOpCvt0f2d + 3:
|
2020-08-27 06:08:08 +00:00
|
|
|
OpGdqpWssCvtss2si(m, rde);
|
2020-08-25 11:23:25 +00:00
|
|
|
break;
|
|
|
|
case kOpCvt0f5a + 0:
|
2020-08-27 06:08:08 +00:00
|
|
|
OpVpdWpsCvtps2pd(m, rde);
|
2020-08-25 11:23:25 +00:00
|
|
|
break;
|
|
|
|
case kOpCvt0f5a + 1:
|
2020-08-27 06:08:08 +00:00
|
|
|
OpVpsWpdCvtpd2ps(m, rde);
|
2020-08-25 11:23:25 +00:00
|
|
|
break;
|
|
|
|
case kOpCvt0f5a + 2:
|
2020-08-27 06:08:08 +00:00
|
|
|
OpVssWsdCvtsd2ss(m, rde);
|
2020-08-25 11:23:25 +00:00
|
|
|
break;
|
|
|
|
case kOpCvt0f5a + 3:
|
2020-08-27 06:08:08 +00:00
|
|
|
OpVsdWssCvtss2sd(m, rde);
|
2020-08-25 11:23:25 +00:00
|
|
|
break;
|
|
|
|
case kOpCvt0f5b + 0:
|
2020-08-27 06:08:08 +00:00
|
|
|
OpVpsWdqCvtdq2ps(m, rde);
|
2020-08-25 11:23:25 +00:00
|
|
|
break;
|
|
|
|
case kOpCvt0f5b + 1:
|
2020-08-27 06:08:08 +00:00
|
|
|
OpVdqWpsCvtps2dq(m, rde);
|
2020-08-25 11:23:25 +00:00
|
|
|
break;
|
|
|
|
case kOpCvt0f5b + 3:
|
2020-08-27 06:08:08 +00:00
|
|
|
OpVdqWpsCvttps2dq(m, rde);
|
2020-08-25 11:23:25 +00:00
|
|
|
break;
|
|
|
|
case kOpCvt0fE6 + 1:
|
2020-08-27 06:08:08 +00:00
|
|
|
OpVdqWpdCvtpd2dq(m, rde);
|
2020-08-25 11:23:25 +00:00
|
|
|
break;
|
|
|
|
case kOpCvt0fE6 + 2:
|
2020-08-27 06:08:08 +00:00
|
|
|
OpVdqWpdCvttpd2dq(m, rde);
|
2020-08-25 11:23:25 +00:00
|
|
|
break;
|
|
|
|
case kOpCvt0fE6 + 3:
|
2020-08-27 06:08:08 +00:00
|
|
|
OpVpdWdqCvtdq2pd(m, rde);
|
2020-08-25 11:23:25 +00:00
|
|
|
break;
|
|
|
|
default:
|
|
|
|
OpUd(m);
|
|
|
|
}
|
|
|
|
}
|