Fixing some instructions.
This commit is contained in:
parent
5436cde0fc
commit
2856d38024
|
@ -2351,7 +2351,7 @@ EMITTER(VECTOR_COMPARE_SGE_V128, MATCH(I<OPCODE_VECTOR_COMPARE_SGE, V128<>, V128
|
||||||
e.vpor(dest, e.xmm0);
|
e.vpor(dest, e.xmm0);
|
||||||
break;
|
break;
|
||||||
case FLOAT32_TYPE:
|
case FLOAT32_TYPE:
|
||||||
e.vcmpgeps(i.dest, i.src1, i.src2);
|
e.vcmpgeps(dest, src1, src2);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -2545,9 +2545,9 @@ EMITTER(VECTOR_ADD, MATCH(I<OPCODE_VECTOR_ADD, V128<>, V128<>, V128<>>)) {
|
||||||
if (saturate) {
|
if (saturate) {
|
||||||
// TODO(benvanik): trace DID_SATURATE
|
// TODO(benvanik): trace DID_SATURATE
|
||||||
if (is_unsigned) {
|
if (is_unsigned) {
|
||||||
e.vpaddsb(dest, src1, src2);
|
|
||||||
} else {
|
|
||||||
e.vpaddusb(dest, src1, src2);
|
e.vpaddusb(dest, src1, src2);
|
||||||
|
} else {
|
||||||
|
e.vpaddsb(dest, src1, src2);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
e.vpaddb(dest, src1, src2);
|
e.vpaddb(dest, src1, src2);
|
||||||
|
@ -2557,9 +2557,9 @@ EMITTER(VECTOR_ADD, MATCH(I<OPCODE_VECTOR_ADD, V128<>, V128<>, V128<>>)) {
|
||||||
if (saturate) {
|
if (saturate) {
|
||||||
// TODO(benvanik): trace DID_SATURATE
|
// TODO(benvanik): trace DID_SATURATE
|
||||||
if (is_unsigned) {
|
if (is_unsigned) {
|
||||||
e.vpaddsw(dest, src1, src2);
|
|
||||||
} else {
|
|
||||||
e.vpaddusw(dest, src1, src2);
|
e.vpaddusw(dest, src1, src2);
|
||||||
|
} else {
|
||||||
|
e.vpaddsw(dest, src1, src2);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
e.vpaddw(dest, src1, src2);
|
e.vpaddw(dest, src1, src2);
|
||||||
|
@ -2575,7 +2575,6 @@ EMITTER(VECTOR_ADD, MATCH(I<OPCODE_VECTOR_ADD, V128<>, V128<>, V128<>>)) {
|
||||||
// Wish there was a vpaddusd...
|
// Wish there was a vpaddusd...
|
||||||
// | A | B | C | D |
|
// | A | B | C | D |
|
||||||
// | B | D |
|
// | B | D |
|
||||||
e.db(0xCC);
|
|
||||||
e.vpsllq(e.xmm0, src1, 32);
|
e.vpsllq(e.xmm0, src1, 32);
|
||||||
e.vpsllq(e.xmm1, src2, 32);
|
e.vpsllq(e.xmm1, src2, 32);
|
||||||
e.vpsrlq(e.xmm0, 32);
|
e.vpsrlq(e.xmm0, 32);
|
||||||
|
@ -4287,7 +4286,7 @@ EMITTER_OPCODE_TABLE(
|
||||||
EMITTER(EXTRACT_I8, MATCH(I<OPCODE_EXTRACT, I8<>, V128<>, I8<>>)) {
|
EMITTER(EXTRACT_I8, MATCH(I<OPCODE_EXTRACT, I8<>, V128<>, I8<>>)) {
|
||||||
static void Emit(X64Emitter& e, const EmitArgType& i) {
|
static void Emit(X64Emitter& e, const EmitArgType& i) {
|
||||||
if (i.src2.is_constant) {
|
if (i.src2.is_constant) {
|
||||||
e.vpextrb(i.dest.reg().cvt64(), i.src1, i.src2.constant());
|
e.vpextrb(i.dest.reg().cvt32(), i.src1, i.src2.constant());
|
||||||
} else {
|
} else {
|
||||||
XEASSERTALWAYS();
|
XEASSERTALWAYS();
|
||||||
}
|
}
|
||||||
|
@ -4296,7 +4295,7 @@ EMITTER(EXTRACT_I8, MATCH(I<OPCODE_EXTRACT, I8<>, V128<>, I8<>>)) {
|
||||||
EMITTER(EXTRACT_I16, MATCH(I<OPCODE_EXTRACT, I16<>, V128<>, I8<>>)) {
|
EMITTER(EXTRACT_I16, MATCH(I<OPCODE_EXTRACT, I16<>, V128<>, I8<>>)) {
|
||||||
static void Emit(X64Emitter& e, const EmitArgType& i) {
|
static void Emit(X64Emitter& e, const EmitArgType& i) {
|
||||||
if (i.src2.is_constant) {
|
if (i.src2.is_constant) {
|
||||||
e.vpextrw(i.dest.reg().cvt64(), i.src1, i.src2.constant());
|
e.vpextrw(i.dest.reg().cvt32(), i.src1, i.src2.constant());
|
||||||
} else {
|
} else {
|
||||||
XEASSERTALWAYS();
|
XEASSERTALWAYS();
|
||||||
}
|
}
|
||||||
|
@ -4311,7 +4310,7 @@ EMITTER(EXTRACT_I32, MATCH(I<OPCODE_EXTRACT, I32<>, V128<>, I8<>>)) {
|
||||||
vec128b(15, 14, 13, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
|
vec128b(15, 14, 13, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
};
|
};
|
||||||
if (i.src2.is_constant) {
|
if (i.src2.is_constant) {
|
||||||
e.vpextrd(i.dest.reg().cvt64(), i.src1, i.src2.constant());
|
e.vpextrd(i.dest, i.src1, i.src2.constant());
|
||||||
} else {
|
} else {
|
||||||
// Get the desired word in xmm0, then extract that.
|
// Get the desired word in xmm0, then extract that.
|
||||||
// TODO(benvanik): find a better way, this sequence is terrible.
|
// TODO(benvanik): find a better way, this sequence is terrible.
|
||||||
|
@ -4322,7 +4321,7 @@ EMITTER(EXTRACT_I32, MATCH(I<OPCODE_EXTRACT, I32<>, V128<>, I8<>>)) {
|
||||||
e.mov(e.rdx, reinterpret_cast<uint64_t>(extract_table_32));
|
e.mov(e.rdx, reinterpret_cast<uint64_t>(extract_table_32));
|
||||||
e.vmovaps(e.xmm0, e.ptr[e.rdx + e.rax]);
|
e.vmovaps(e.xmm0, e.ptr[e.rdx + e.rax]);
|
||||||
e.vpshufb(e.xmm0, i.src1, e.xmm0);
|
e.vpshufb(e.xmm0, i.src1, e.xmm0);
|
||||||
e.vpextrd(i.dest.reg().cvt32(), e.xmm0, 0);
|
e.vpextrd(i.dest, e.xmm0, 0);
|
||||||
e.ReloadEDX();
|
e.ReloadEDX();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue