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

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

Issue 6049008: SSE2 truncating double-to-i. (Closed)
Patch Set: Update exponent limit description Created 9 years, 11 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/serialize.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2007-2008 the V8 project authors. All rights reserved. 1 // Copyright 2007-2008 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 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 __ cmov(not_sign, eax, Operand(ecx, 1)); 409 __ cmov(not_sign, eax, Operand(ecx, 1));
410 __ cmov(parity_even, eax, Operand(ecx, 2)); 410 __ cmov(parity_even, eax, Operand(ecx, 2));
411 __ cmov(parity_odd, eax, Operand(ecx, 3)); 411 __ cmov(parity_odd, eax, Operand(ecx, 3));
412 __ cmov(less, eax, Operand(edx, 0)); 412 __ cmov(less, eax, Operand(edx, 0));
413 __ cmov(greater_equal, eax, Operand(edx, 1)); 413 __ cmov(greater_equal, eax, Operand(edx, 1));
414 __ cmov(less_equal, eax, Operand(edx, 2)); 414 __ cmov(less_equal, eax, Operand(edx, 2));
415 __ cmov(greater, eax, Operand(edx, 3)); 415 __ cmov(greater, eax, Operand(edx, 3));
416 } 416 }
417 } 417 }
418 418
419 // andpd, cmpltsd, movaps, psllq. 419 // andpd, cmpltsd, movaps, psllq, psrlq, por.
420 { 420 {
421 if (CpuFeatures::IsSupported(SSE2)) { 421 if (CpuFeatures::IsSupported(SSE2)) {
422 CpuFeatures::Scope fscope(SSE2); 422 CpuFeatures::Scope fscope(SSE2);
423 __ andpd(xmm0, xmm1); 423 __ andpd(xmm0, xmm1);
424 __ andpd(xmm1, xmm2); 424 __ andpd(xmm1, xmm2);
425 425
426 __ cmpltsd(xmm0, xmm1); 426 __ cmpltsd(xmm0, xmm1);
427 __ cmpltsd(xmm1, xmm2); 427 __ cmpltsd(xmm1, xmm2);
428 428
429 __ movaps(xmm0, xmm1); 429 __ movaps(xmm0, xmm1);
430 __ movaps(xmm1, xmm2); 430 __ movaps(xmm1, xmm2);
431 431
432 __ psllq(xmm0, 17); 432 __ psllq(xmm0, 17);
433 __ psllq(xmm1, 42); 433 __ psllq(xmm1, 42);
434
435 __ psllq(xmm0, xmm1);
436 __ psllq(xmm1, xmm2);
437
438 __ psrlq(xmm0, 17);
439 __ psrlq(xmm1, 42);
440
441 __ psrlq(xmm0, xmm1);
442 __ psrlq(xmm1, xmm2);
443
444 __ por(xmm0, xmm1);
445 __ por(xmm1, xmm2);
434 } 446 }
435 } 447 }
436 448
437 __ ret(0); 449 __ ret(0);
438 450
439 CodeDesc desc; 451 CodeDesc desc;
440 assm.GetCode(&desc); 452 assm.GetCode(&desc);
441 Object* code = Heap::CreateCode( 453 Object* code = Heap::CreateCode(
442 desc, 454 desc,
443 Code::ComputeFlags(Code::STUB), 455 Code::ComputeFlags(Code::STUB),
444 Handle<Object>(Heap::undefined_value()))->ToObjectChecked(); 456 Handle<Object>(Heap::undefined_value()))->ToObjectChecked();
445 CHECK(code->IsCode()); 457 CHECK(code->IsCode());
446 #ifdef OBJECT_PRINT 458 #ifdef OBJECT_PRINT
447 Code::cast(code)->Print(); 459 Code::cast(code)->Print();
448 byte* begin = Code::cast(code)->instruction_start(); 460 byte* begin = Code::cast(code)->instruction_start();
449 byte* end = begin + Code::cast(code)->instruction_size(); 461 byte* end = begin + Code::cast(code)->instruction_size();
450 disasm::Disassembler::Disassemble(stdout, begin, end); 462 disasm::Disassembler::Disassemble(stdout, begin, end);
451 #endif 463 #endif
452 } 464 }
453 465
454 #undef __ 466 #undef __
OLDNEW
« no previous file with comments | « src/serialize.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698