Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Side by Side Diff: test/cctest/test-assembler-ia32.cc

Issue 27097002: Fixed bug in extractps instruction on ia32 and x64 (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: Fixed failure in debug mode test Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/x64/disasm-x64.cc ('k') | test/cctest/test-assembler-x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 v8::Local<v8::Value> result = foo->Call(global_object, 1, args); 557 v8::Local<v8::Value> result = foo->Call(global_object, 1, args);
558 558
559 // The mask should be 0b1000. 559 // The mask should be 0b1000.
560 CHECK_EQ(8, result->Int32Value()); 560 CHECK_EQ(8, result->Int32Value());
561 } 561 }
562 562
563 #undef ELEMENT_COUNT 563 #undef ELEMENT_COUNT
564 #endif // __GNUC__ 564 #endif // __GNUC__
565 565
566 566
567 TEST(AssemblerIa32Extractps) {
568 CcTest::InitializeVM();
569 if (!CpuFeatures::IsSupported(SSE4_1)) return;
570
571 Isolate* isolate = reinterpret_cast<Isolate*>(CcTest::isolate());
572 HandleScope scope(isolate);
573 v8::internal::byte buffer[256];
574 MacroAssembler assm(isolate, buffer, sizeof buffer);
575 CpuFeatureScope sse2scope(&assm, SSE2);
576 CpuFeatureScope sse4_1scope(&assm, SSE4_1);
577 __ movdbl(xmm1, Operand(esp, 4));
578 __ extractps(eax, xmm1, 0x1);
579 __ ret(0);
580
581 CodeDesc desc;
582 assm.GetCode(&desc);
583 Code* code = Code::cast(isolate->heap()->CreateCode(
584 desc,
585 Code::ComputeFlags(Code::STUB),
586 Handle<Code>())->ToObjectChecked());
587 CHECK(code->IsCode());
588 #ifdef OBJECT_PRINT
589 Code::cast(code)->Print();
590 #endif
591
592 F4 f = FUNCTION_CAST<F4>(Code::cast(code)->entry());
593 CHECK_EQ(0x7FF80000, f(OS::nan_value()));
594 }
595
596
567 #undef __ 597 #undef __
OLDNEW
« no previous file with comments | « src/x64/disasm-x64.cc ('k') | test/cctest/test-assembler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698