[cleanup] Move some instructions into macro lists
These instructions were probably leftover from an earlier cleanup. We can move them into respective macro lists, then delete away the redundant declarations, definitions, disasm, and tests. We were missing disasm tests for SSE2_INSTRUCTION_LIST_SD, so add that in. Change-Id: I8f27beaf57e7a338097690073910a0863f00b26a Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2036833 Reviewed-by: Deepti Gandluri <gdeepti@chromium.org> Commit-Queue: Zhi An Ng <zhin@chromium.org> Cr-Commit-Position: refs/heads/master@{#66123}
This commit is contained in:
parent
bc436ed752
commit
9fba0cb07e
@ -3340,26 +3340,6 @@ void Assembler::cvtss2sd(XMMRegister dst, Operand src) {
|
||||
emit_sse_operand(dst, src);
|
||||
}
|
||||
|
||||
void Assembler::cvtsd2ss(XMMRegister dst, XMMRegister src) {
|
||||
DCHECK(!IsEnabled(AVX));
|
||||
EnsureSpace ensure_space(this);
|
||||
emit(0xF2);
|
||||
emit_optional_rex_32(dst, src);
|
||||
emit(0x0F);
|
||||
emit(0x5A);
|
||||
emit_sse_operand(dst, src);
|
||||
}
|
||||
|
||||
void Assembler::cvtsd2ss(XMMRegister dst, Operand src) {
|
||||
DCHECK(!IsEnabled(AVX));
|
||||
EnsureSpace ensure_space(this);
|
||||
emit(0xF2);
|
||||
emit_optional_rex_32(dst, src);
|
||||
emit(0x0F);
|
||||
emit(0x5A);
|
||||
emit_sse_operand(dst, src);
|
||||
}
|
||||
|
||||
void Assembler::cvtsd2si(Register dst, XMMRegister src) {
|
||||
DCHECK(!IsEnabled(AVX));
|
||||
EnsureSpace ensure_space(this);
|
||||
@ -3380,62 +3360,6 @@ void Assembler::cvtsd2siq(Register dst, XMMRegister src) {
|
||||
emit_sse_operand(dst, src);
|
||||
}
|
||||
|
||||
void Assembler::andpd(XMMRegister dst, XMMRegister src) {
|
||||
EnsureSpace ensure_space(this);
|
||||
emit(0x66);
|
||||
emit_optional_rex_32(dst, src);
|
||||
emit(0x0F);
|
||||
emit(0x54);
|
||||
emit_sse_operand(dst, src);
|
||||
}
|
||||
|
||||
void Assembler::andpd(XMMRegister dst, Operand src) {
|
||||
EnsureSpace ensure_space(this);
|
||||
emit(0x66);
|
||||
emit_optional_rex_32(dst, src);
|
||||
emit(0x0F);
|
||||
emit(0x54);
|
||||
emit_sse_operand(dst, src);
|
||||
}
|
||||
|
||||
void Assembler::orpd(XMMRegister dst, XMMRegister src) {
|
||||
EnsureSpace ensure_space(this);
|
||||
emit(0x66);
|
||||
emit_optional_rex_32(dst, src);
|
||||
emit(0x0F);
|
||||
emit(0x56);
|
||||
emit_sse_operand(dst, src);
|
||||
}
|
||||
|
||||
void Assembler::orpd(XMMRegister dst, Operand src) {
|
||||
EnsureSpace ensure_space(this);
|
||||
emit(0x66);
|
||||
emit_optional_rex_32(dst, src);
|
||||
emit(0x0F);
|
||||
emit(0x56);
|
||||
emit_sse_operand(dst, src);
|
||||
}
|
||||
|
||||
void Assembler::xorpd(XMMRegister dst, XMMRegister src) {
|
||||
DCHECK(!IsEnabled(AVX));
|
||||
EnsureSpace ensure_space(this);
|
||||
emit(0x66);
|
||||
emit_optional_rex_32(dst, src);
|
||||
emit(0x0F);
|
||||
emit(0x57);
|
||||
emit_sse_operand(dst, src);
|
||||
}
|
||||
|
||||
void Assembler::xorpd(XMMRegister dst, Operand src) {
|
||||
DCHECK(!IsEnabled(AVX));
|
||||
EnsureSpace ensure_space(this);
|
||||
emit(0x66);
|
||||
emit_optional_rex_32(dst, src);
|
||||
emit(0x0F);
|
||||
emit(0x57);
|
||||
emit_sse_operand(dst, src);
|
||||
}
|
||||
|
||||
void Assembler::haddps(XMMRegister dst, XMMRegister src) {
|
||||
DCHECK(IsEnabled(SSE3));
|
||||
EnsureSpace ensure_space(this);
|
||||
|
@ -1098,19 +1098,10 @@ class V8_EXPORT_PRIVATE Assembler : public AssemblerBase {
|
||||
|
||||
void cvtss2sd(XMMRegister dst, XMMRegister src);
|
||||
void cvtss2sd(XMMRegister dst, Operand src);
|
||||
void cvtsd2ss(XMMRegister dst, XMMRegister src);
|
||||
void cvtsd2ss(XMMRegister dst, Operand src);
|
||||
|
||||
void cvtsd2si(Register dst, XMMRegister src);
|
||||
void cvtsd2siq(Register dst, XMMRegister src);
|
||||
|
||||
void andpd(XMMRegister dst, XMMRegister src);
|
||||
void andpd(XMMRegister dst, Operand src);
|
||||
void orpd(XMMRegister dst, XMMRegister src);
|
||||
void orpd(XMMRegister dst, Operand src);
|
||||
void xorpd(XMMRegister dst, XMMRegister src);
|
||||
void xorpd(XMMRegister dst, Operand src);
|
||||
|
||||
void haddps(XMMRegister dst, XMMRegister src);
|
||||
void haddps(XMMRegister dst, Operand src);
|
||||
|
||||
@ -1236,10 +1227,6 @@ class V8_EXPORT_PRIVATE Assembler : public AssemblerBase {
|
||||
impl(opcode, dst, src1, src2); \
|
||||
}
|
||||
|
||||
AVX_3(vandpd, 0x54, vpd)
|
||||
AVX_3(vorpd, 0x56, vpd)
|
||||
AVX_3(vxorpd, 0x57, vpd)
|
||||
AVX_3(vcvtsd2ss, 0x5a, vsd)
|
||||
AVX_3(vhaddps, 0x7c, vsd)
|
||||
|
||||
#define AVX_SCALAR(instr, prefix, escape, opcode) \
|
||||
|
@ -36,7 +36,10 @@
|
||||
V(maxss, F3, 0F, 5F)
|
||||
|
||||
#define SSE2_INSTRUCTION_LIST(V) \
|
||||
V(andpd, 66, 0F, 54) \
|
||||
V(andnpd, 66, 0F, 55) \
|
||||
V(orpd, 66, 0F, 56) \
|
||||
V(xorpd, 66, 0F, 57) \
|
||||
V(addpd, 66, 0F, 58) \
|
||||
V(mulpd, 66, 0F, 59) \
|
||||
V(subpd, 66, 0F, 5C) \
|
||||
@ -118,6 +121,7 @@
|
||||
V(sqrtsd, F2, 0F, 51) \
|
||||
V(addsd, F2, 0F, 58) \
|
||||
V(mulsd, F2, 0F, 59) \
|
||||
V(cvtsd2ss, F2, 0F, 5A) \
|
||||
V(subsd, F2, 0F, 5C) \
|
||||
V(minsd, F2, 0F, 5D) \
|
||||
V(divsd, F2, 0F, 5E) \
|
||||
|
@ -1426,21 +1426,6 @@ int DisassemblerX64::AVXInstruction(byte* data) {
|
||||
AppendToBuffer("vmovmskpd %s,", NameOfCPURegister(regop));
|
||||
current += PrintRightXMMOperand(current);
|
||||
break;
|
||||
case 0x54:
|
||||
AppendToBuffer("vandpd %s,%s,", NameOfXMMRegister(regop),
|
||||
NameOfXMMRegister(vvvv));
|
||||
current += PrintRightXMMOperand(current);
|
||||
break;
|
||||
case 0x56:
|
||||
AppendToBuffer("vorpd %s,%s,", NameOfXMMRegister(regop),
|
||||
NameOfXMMRegister(vvvv));
|
||||
current += PrintRightXMMOperand(current);
|
||||
break;
|
||||
case 0x57:
|
||||
AppendToBuffer("vxorpd %s,%s,", NameOfXMMRegister(regop),
|
||||
NameOfXMMRegister(vvvv));
|
||||
current += PrintRightXMMOperand(current);
|
||||
break;
|
||||
case 0x6E:
|
||||
AppendToBuffer("vmov%c %s,", vex_w() ? 'q' : 'd',
|
||||
NameOfXMMRegister(regop));
|
||||
|
@ -391,8 +391,6 @@ TEST(DisasmX64) {
|
||||
// Move operation
|
||||
__ cvttss2si(rdx, Operand(rbx, rcx, times_4, 10000));
|
||||
__ cvttss2si(rdx, xmm1);
|
||||
__ cvtsd2ss(xmm0, xmm1);
|
||||
__ cvtsd2ss(xmm0, Operand(rbx, rcx, times_4, 10000));
|
||||
__ cvttps2dq(xmm0, xmm1);
|
||||
__ cvttps2dq(xmm0, Operand(rbx, rcx, times_4, 10000));
|
||||
__ movaps(xmm0, xmm1);
|
||||
@ -437,13 +435,6 @@ TEST(DisasmX64) {
|
||||
|
||||
__ ucomisd(xmm0, xmm1);
|
||||
|
||||
__ andpd(xmm0, xmm1);
|
||||
__ andpd(xmm0, Operand(rbx, rcx, times_4, 10000));
|
||||
__ orpd(xmm0, xmm1);
|
||||
__ orpd(xmm0, Operand(rbx, rcx, times_4, 10000));
|
||||
__ xorpd(xmm0, xmm1);
|
||||
__ xorpd(xmm0, Operand(rbx, rcx, times_4, 10000));
|
||||
|
||||
__ pcmpeqd(xmm1, xmm0);
|
||||
|
||||
__ punpckldq(xmm1, xmm11);
|
||||
@ -636,29 +627,13 @@ TEST(DisasmX64) {
|
||||
__ vmovdqu(xmm9, Operand(rbx, rcx, times_4, 10000));
|
||||
__ vmovdqu(Operand(rbx, rcx, times_4, 10000), xmm0);
|
||||
|
||||
__ vaddsd(xmm0, xmm1, xmm2);
|
||||
__ vaddsd(xmm0, xmm1, Operand(rbx, rcx, times_4, 10000));
|
||||
__ vmulsd(xmm0, xmm1, xmm2);
|
||||
__ vmulsd(xmm0, xmm1, Operand(rbx, rcx, times_4, 10000));
|
||||
__ vsubsd(xmm0, xmm1, xmm2);
|
||||
__ vsubsd(xmm0, xmm1, Operand(rbx, rcx, times_4, 10000));
|
||||
__ vdivsd(xmm0, xmm1, xmm2);
|
||||
__ vdivsd(xmm0, xmm1, Operand(rbx, rcx, times_2, 10000));
|
||||
__ vminsd(xmm8, xmm1, xmm2);
|
||||
__ vminsd(xmm9, xmm1, Operand(rbx, rcx, times_8, 10000));
|
||||
__ vmaxsd(xmm8, xmm1, xmm2);
|
||||
__ vmaxsd(xmm9, xmm1, Operand(rbx, rcx, times_1, 10000));
|
||||
__ vroundss(xmm9, xmm1, xmm2, kRoundDown);
|
||||
__ vroundsd(xmm8, xmm3, xmm0, kRoundDown);
|
||||
__ vsqrtsd(xmm8, xmm1, xmm2);
|
||||
__ vsqrtsd(xmm9, xmm1, Operand(rbx, rcx, times_1, 10000));
|
||||
__ vucomisd(xmm9, xmm1);
|
||||
__ vucomisd(xmm8, Operand(rbx, rdx, times_2, 10981));
|
||||
|
||||
__ vcvtss2sd(xmm4, xmm9, xmm11);
|
||||
__ vcvtsd2ss(xmm9, xmm3, xmm2);
|
||||
__ vcvtss2sd(xmm4, xmm9, Operand(rbx, rcx, times_1, 10000));
|
||||
__ vcvtsd2ss(xmm9, xmm3, Operand(rbx, rcx, times_1, 10000));
|
||||
__ vcvtlsi2sd(xmm5, xmm9, rcx);
|
||||
__ vcvtlsi2sd(xmm9, xmm3, Operand(rbx, r9, times_4, 10000));
|
||||
__ vcvtqsi2sd(xmm5, xmm9, r11);
|
||||
@ -688,13 +663,6 @@ TEST(DisasmX64) {
|
||||
__ vhaddps(xmm0, xmm1, xmm9);
|
||||
__ vhaddps(xmm0, xmm1, Operand(rbx, rcx, times_4, 10000));
|
||||
|
||||
__ vandpd(xmm0, xmm9, xmm2);
|
||||
__ vandpd(xmm9, xmm1, Operand(rbx, rcx, times_4, 10000));
|
||||
__ vorpd(xmm0, xmm1, xmm9);
|
||||
__ vorpd(xmm0, xmm1, Operand(rbx, rcx, times_4, 10000));
|
||||
__ vxorpd(xmm0, xmm1, xmm9);
|
||||
__ vxorpd(xmm0, xmm1, Operand(rbx, rcx, times_4, 10000));
|
||||
|
||||
__ vpcmpeqd(xmm0, xmm15, xmm5);
|
||||
__ vpcmpeqd(xmm15, xmm0, Operand(rbx, rcx, times_4, 10000));
|
||||
|
||||
@ -755,6 +723,12 @@ TEST(DisasmX64) {
|
||||
SSE2_UNOP_INSTRUCTION_LIST(EMIT_SSE2_UNOP_AVXINSTR)
|
||||
#undef EMIT_SSE2_AVXINSTR
|
||||
|
||||
#define EMIT_SSE2_SD_AVXINSTR(instruction, notUsed1, notUsed2, notUsed3) \
|
||||
__ v##instruction(xmm10, xmm5, xmm1); \
|
||||
__ v##instruction(xmm10, xmm5, Operand(rbx, rcx, times_4, 10000));
|
||||
SSE2_INSTRUCTION_LIST_SD(EMIT_SSE2_SD_AVXINSTR)
|
||||
#undef EMIT_SSE2_SD_AVXINSTR
|
||||
|
||||
#define EMIT_SSE34_AVXINSTR(instruction, notUsed1, notUsed2, notUsed3, \
|
||||
notUsed4) \
|
||||
__ v##instruction(xmm10, xmm5, xmm1); \
|
||||
|
Loading…
Reference in New Issue
Block a user