summaryrefslogtreecommitdiff
path: root/deps/v8/test/cctest/test-disasm-x64.cc
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/test/cctest/test-disasm-x64.cc')
-rw-r--r--deps/v8/test/cctest/test-disasm-x64.cc124
1 files changed, 121 insertions, 3 deletions
diff --git a/deps/v8/test/cctest/test-disasm-x64.cc b/deps/v8/test/cctest/test-disasm-x64.cc
index 3722c1f800..284ca859be 100644
--- a/deps/v8/test/cctest/test-disasm-x64.cc
+++ b/deps/v8/test/cctest/test-disasm-x64.cc
@@ -29,10 +29,10 @@
#include "src/v8.h"
+#include "src/code-factory.h"
#include "src/debug/debug.h"
#include "src/disasm.h"
#include "src/disassembler.h"
-#include "src/ic/ic.h"
#include "src/macro-assembler.h"
#include "test/cctest/cctest.h"
@@ -282,7 +282,7 @@ TEST(DisasmX64) {
// TODO(mstarzinger): The following is protected.
// __ call(Operand(rbx, rcx, times_4, 10000));
__ nop();
- Handle<Code> ic(LoadIC::initialize_stub(isolate, NOT_INSIDE_TYPEOF));
+ Handle<Code> ic(CodeFactory::LoadIC(isolate).code());
__ call(ic, RelocInfo::CODE_TARGET);
__ nop();
__ nop();
@@ -431,6 +431,8 @@ TEST(DisasmX64) {
__ movsd(xmm1, Operand(rbx, rcx, times_4, 10000));
__ movsd(Operand(rbx, rcx, times_4, 10000), xmm1);
// 128 bit move instructions.
+ __ movupd(xmm0, Operand(rbx, rcx, times_4, 10000));
+ __ movupd(Operand(rbx, rcx, times_4, 10000), xmm0);
__ movdqa(xmm0, Operand(rbx, rcx, times_4, 10000));
__ movdqa(Operand(rbx, rcx, times_4, 10000), xmm0);
@@ -449,6 +451,11 @@ 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));
__ pslld(xmm0, 6);
__ psrld(xmm0, 6);
@@ -458,6 +465,7 @@ TEST(DisasmX64) {
__ pcmpeqd(xmm1, xmm0);
__ punpckldq(xmm1, xmm11);
+ __ punpckldq(xmm5, Operand(rdx, 4));
__ punpckhdq(xmm8, xmm15);
}
@@ -484,11 +492,67 @@ TEST(DisasmX64) {
{
if (CpuFeatures::IsSupported(SSE4_1)) {
CpuFeatureScope scope(&assm, SSE4_1);
+ __ insertps(xmm5, xmm1, 123);
__ extractps(rax, xmm1, 0);
__ pextrd(rbx, xmm15, 0);
__ pextrd(r12, xmm0, 1);
__ pinsrd(xmm9, r9, 0);
- __ pinsrd(xmm5, rax, 1);
+ __ pinsrd(xmm5, Operand(rax, 4), 1);
+
+ __ cmpps(xmm5, xmm1, 1);
+ __ cmpps(xmm5, Operand(rbx, rcx, times_4, 10000), 1);
+ __ cmpeqps(xmm5, xmm1);
+ __ cmpeqps(xmm5, Operand(rbx, rcx, times_4, 10000));
+ __ cmpltps(xmm5, xmm1);
+ __ cmpltps(xmm5, Operand(rbx, rcx, times_4, 10000));
+ __ cmpleps(xmm5, xmm1);
+ __ cmpleps(xmm5, Operand(rbx, rcx, times_4, 10000));
+ __ cmpneqps(xmm5, xmm1);
+ __ cmpneqps(xmm5, Operand(rbx, rcx, times_4, 10000));
+ __ cmpnltps(xmm5, xmm1);
+ __ cmpnltps(xmm5, Operand(rbx, rcx, times_4, 10000));
+ __ cmpnleps(xmm5, xmm1);
+ __ cmpnleps(xmm5, Operand(rbx, rcx, times_4, 10000));
+ __ cmppd(xmm5, xmm1, 1);
+ __ cmppd(xmm5, Operand(rbx, rcx, times_4, 10000), 1);
+ __ cmpeqpd(xmm5, xmm1);
+ __ cmpeqpd(xmm5, Operand(rbx, rcx, times_4, 10000));
+ __ cmpltpd(xmm5, xmm1);
+ __ cmpltpd(xmm5, Operand(rbx, rcx, times_4, 10000));
+ __ cmplepd(xmm5, xmm1);
+ __ cmplepd(xmm5, Operand(rbx, rcx, times_4, 10000));
+ __ cmpneqpd(xmm5, xmm1);
+ __ cmpneqpd(xmm5, Operand(rbx, rcx, times_4, 10000));
+ __ cmpnltpd(xmm5, xmm1);
+ __ cmpnltpd(xmm5, Operand(rbx, rcx, times_4, 10000));
+ __ cmpnlepd(xmm5, xmm1);
+ __ cmpnlepd(xmm5, Operand(rbx, rcx, times_4, 10000));
+
+ __ minps(xmm5, xmm1);
+ __ minps(xmm5, Operand(rdx, 4));
+ __ maxps(xmm5, xmm1);
+ __ maxps(xmm5, Operand(rdx, 4));
+ __ rcpps(xmm5, xmm1);
+ __ rcpps(xmm5, Operand(rdx, 4));
+ __ sqrtps(xmm5, xmm1);
+ __ sqrtps(xmm5, Operand(rdx, 4));
+ __ movups(xmm5, xmm1);
+ __ movups(xmm5, Operand(rdx, 4));
+ __ movups(Operand(rdx, 4), xmm5);
+ __ paddd(xmm5, xmm1);
+ __ paddd(xmm5, Operand(rdx, 4));
+ __ psubd(xmm5, xmm1);
+ __ psubd(xmm5, Operand(rdx, 4));
+ __ pmulld(xmm5, xmm1);
+ __ pmulld(xmm5, Operand(rdx, 4));
+ __ pmuludq(xmm5, xmm1);
+ __ pmuludq(xmm5, Operand(rdx, 4));
+ __ psrldq(xmm5, 123);
+ __ pshufd(xmm5, xmm1, 3);
+ __ cvtps2dq(xmm5, xmm1);
+ __ cvtps2dq(xmm5, Operand(rdx, 4));
+ __ cvtdq2ps(xmm5, xmm1);
+ __ cvtdq2ps(xmm5, Operand(rdx, 4));
}
}
@@ -561,8 +625,14 @@ TEST(DisasmX64) {
__ vmovaps(xmm10, xmm11);
__ vmovapd(xmm7, xmm0);
+ __ vmovupd(xmm0, Operand(rbx, rcx, times_4, 10000));
+ __ vmovupd(Operand(rbx, rcx, times_4, 10000), xmm0);
__ vmovmskpd(r9, xmm4);
+ __ vmovups(xmm5, xmm1);
+ __ vmovups(xmm5, Operand(rdx, 4));
+ __ vmovups(Operand(rdx, 4), xmm5);
+
__ vandps(xmm0, xmm9, xmm2);
__ vandps(xmm9, xmm1, Operand(rbx, rcx, times_4, 10000));
__ vxorps(xmm0, xmm1, xmm9);
@@ -579,6 +649,35 @@ TEST(DisasmX64) {
__ vpcmpeqd(xmm15, xmm0, Operand(rbx, rcx, times_4, 10000));
__ vpsllq(xmm0, xmm15, 21);
__ vpsrlq(xmm15, xmm0, 21);
+
+ __ vcmpps(xmm5, xmm4, xmm1, 1);
+ __ vcmpps(xmm5, xmm4, Operand(rbx, rcx, times_4, 10000), 1);
+ __ vcmpeqps(xmm5, xmm4, xmm1);
+ __ vcmpeqps(xmm5, xmm4, Operand(rbx, rcx, times_4, 10000));
+ __ vcmpltps(xmm5, xmm4, xmm1);
+ __ vcmpltps(xmm5, xmm4, Operand(rbx, rcx, times_4, 10000));
+ __ vcmpleps(xmm5, xmm4, xmm1);
+ __ vcmpleps(xmm5, xmm4, Operand(rbx, rcx, times_4, 10000));
+ __ vcmpneqps(xmm5, xmm4, xmm1);
+ __ vcmpneqps(xmm5, xmm4, Operand(rbx, rcx, times_4, 10000));
+ __ vcmpnltps(xmm5, xmm4, xmm1);
+ __ vcmpnltps(xmm5, xmm4, Operand(rbx, rcx, times_4, 10000));
+ __ vcmpnleps(xmm5, xmm4, xmm1);
+ __ vcmpnleps(xmm5, xmm4, Operand(rbx, rcx, times_4, 10000));
+ __ vcmppd(xmm5, xmm4, xmm1, 1);
+ __ vcmppd(xmm5, xmm4, Operand(rbx, rcx, times_4, 10000), 1);
+ __ vcmpeqpd(xmm5, xmm4, xmm1);
+ __ vcmpeqpd(xmm5, xmm4, Operand(rbx, rcx, times_4, 10000));
+ __ vcmpltpd(xmm5, xmm4, xmm1);
+ __ vcmpltpd(xmm5, xmm4, Operand(rbx, rcx, times_4, 10000));
+ __ vcmplepd(xmm5, xmm4, xmm1);
+ __ vcmplepd(xmm5, xmm4, Operand(rbx, rcx, times_4, 10000));
+ __ vcmpneqpd(xmm5, xmm4, xmm1);
+ __ vcmpneqpd(xmm5, xmm4, Operand(rbx, rcx, times_4, 10000));
+ __ vcmpnltpd(xmm5, xmm4, xmm1);
+ __ vcmpnltpd(xmm5, xmm4, Operand(rbx, rcx, times_4, 10000));
+ __ vcmpnlepd(xmm5, xmm4, xmm1);
+ __ vcmpnlepd(xmm5, xmm4, Operand(rbx, rcx, times_4, 10000));
}
}
@@ -745,12 +844,31 @@ TEST(DisasmX64) {
// xchg.
{
+ __ xchgb(rax, Operand(rax, 8));
+ __ xchgw(rax, Operand(rbx, 8));
__ xchgq(rax, rax);
__ xchgq(rax, rbx);
__ xchgq(rbx, rbx);
__ xchgq(rbx, Operand(rsp, 12));
}
+ // cmpxchg.
+ {
+ __ cmpxchgb(Operand(rsp, 12), rax);
+ __ cmpxchgw(Operand(rbx, rcx, times_4, 10000), rax);
+ __ cmpxchgl(Operand(rbx, rcx, times_4, 10000), rax);
+ __ cmpxchgq(Operand(rbx, rcx, times_4, 10000), rax);
+ }
+
+ // lock prefix.
+ {
+ __ lock();
+ __ cmpxchgl(Operand(rsp, 12), rbx);
+
+ __ lock();
+ __ xchgw(rax, Operand(rcx, 8));
+ }
+
// Nop instructions
for (int i = 0; i < 16; i++) {
__ Nop(i);