From f230a1cf749e984439b5bb9729d9db9f48472827 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Sun, 10 Nov 2013 02:02:27 +0100 Subject: v8: upgrade to 3.22.24 This commit removes the simple/test-event-emitter-memory-leak test for being unreliable with the new garbage collector: the memory pressure exerted by the test case is too low for the garbage collector to kick in. It can be made to work again by limiting the heap size with the --max_old_space_size=x flag but that won't be very reliable across platforms and architectures. --- deps/v8/test/cctest/test-assembler-ia32.cc | 45 ++++++++++++++++++++++++++---- 1 file changed, 40 insertions(+), 5 deletions(-) (limited to 'deps/v8/test/cctest/test-assembler-ia32.cc') diff --git a/deps/v8/test/cctest/test-assembler-ia32.cc b/deps/v8/test/cctest/test-assembler-ia32.cc index 76eecc02e7..d40156841e 100644 --- a/deps/v8/test/cctest/test-assembler-ia32.cc +++ b/deps/v8/test/cctest/test-assembler-ia32.cc @@ -264,15 +264,15 @@ TEST(AssemblerIa326) { Assembler assm(isolate, buffer, sizeof buffer); CpuFeatureScope fscope(&assm, SSE2); - __ movdbl(xmm0, Operand(esp, 1 * kPointerSize)); - __ movdbl(xmm1, Operand(esp, 3 * kPointerSize)); + __ movsd(xmm0, Operand(esp, 1 * kPointerSize)); + __ movsd(xmm1, Operand(esp, 3 * kPointerSize)); __ addsd(xmm0, xmm1); __ mulsd(xmm0, xmm1); __ subsd(xmm0, xmm1); __ divsd(xmm0, xmm1); // Copy xmm0 to st(0) using eight bytes of stack. __ sub(esp, Immediate(8)); - __ movdbl(Operand(esp, 0), xmm0); + __ movsd(Operand(esp, 0), xmm0); __ fld_d(Operand(esp, 0)); __ add(esp, Immediate(8)); __ ret(0); @@ -313,7 +313,7 @@ TEST(AssemblerIa328) { __ cvtsi2sd(xmm0, eax); // Copy xmm0 to st(0) using eight bytes of stack. __ sub(esp, Immediate(8)); - __ movdbl(Operand(esp, 0), xmm0); + __ movsd(Operand(esp, 0), xmm0); __ fld_d(Operand(esp, 0)); __ add(esp, Immediate(8)); __ ret(0); @@ -532,7 +532,7 @@ TEST(StackAlignmentForSSE2) { CHECK_EQ(0, OS::ActivationFrameAlignment() % 16); - v8::Isolate* isolate = v8::Isolate::GetCurrent(); + v8::Isolate* isolate = CcTest::isolate(); v8::HandleScope handle_scope(isolate); v8::Handle global_template = v8::ObjectTemplate::New(); global_template->Set(v8_str("do_sse2"), v8::FunctionTemplate::New(DoSSE2)); @@ -564,4 +564,39 @@ TEST(StackAlignmentForSSE2) { #endif // __GNUC__ +TEST(AssemblerIa32Extractps) { + CcTest::InitializeVM(); + if (!CpuFeatures::IsSupported(SSE2) || + !CpuFeatures::IsSupported(SSE4_1)) return; + + Isolate* isolate = reinterpret_cast(CcTest::isolate()); + HandleScope scope(isolate); + v8::internal::byte buffer[256]; + MacroAssembler assm(isolate, buffer, sizeof buffer); + { CpuFeatureScope fscope2(&assm, SSE2); + CpuFeatureScope fscope41(&assm, SSE4_1); + __ movsd(xmm1, Operand(esp, 4)); + __ extractps(eax, xmm1, 0x1); + __ ret(0); + } + + CodeDesc desc; + assm.GetCode(&desc); + Code* code = Code::cast(isolate->heap()->CreateCode( + desc, + Code::ComputeFlags(Code::STUB), + Handle())->ToObjectChecked()); + CHECK(code->IsCode()); +#ifdef OBJECT_PRINT + Code::cast(code)->Print(); +#endif + + F4 f = FUNCTION_CAST(Code::cast(code)->entry()); + uint64_t value1 = V8_2PART_UINT64_C(0x12345678, 87654321); + CHECK_EQ(0x12345678, f(uint64_to_double(value1))); + uint64_t value2 = V8_2PART_UINT64_C(0x87654321, 12345678); + CHECK_EQ(0x87654321, f(uint64_to_double(value2))); +} + + #undef __ -- cgit v1.2.1