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

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

Issue 71163006: Merge bleeding_edge r17376:17693. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: Fix all.gyp Created 7 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « test/cctest/test-dictionary.cc ('k') | test/cctest/test-disasm-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 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 __ fmulp(3); 347 __ fmulp(3);
348 __ fdivp(3); 348 __ fdivp(3);
349 __ fcompp(); 349 __ fcompp();
350 __ fwait(); 350 __ fwait();
351 __ nop(); 351 __ nop();
352 { 352 {
353 if (CpuFeatures::IsSupported(SSE2)) { 353 if (CpuFeatures::IsSupported(SSE2)) {
354 CpuFeatureScope fscope(&assm, SSE2); 354 CpuFeatureScope fscope(&assm, SSE2);
355 __ cvttss2si(edx, Operand(ebx, ecx, times_4, 10000)); 355 __ cvttss2si(edx, Operand(ebx, ecx, times_4, 10000));
356 __ cvtsi2sd(xmm1, Operand(ebx, ecx, times_4, 10000)); 356 __ cvtsi2sd(xmm1, Operand(ebx, ecx, times_4, 10000));
357 __ addsd(xmm1, xmm0);
358 __ mulsd(xmm1, xmm0);
359 __ subsd(xmm1, xmm0);
360 __ divsd(xmm1, xmm0);
361 __ movsd(xmm1, Operand(ebx, ecx, times_4, 10000)); 357 __ movsd(xmm1, Operand(ebx, ecx, times_4, 10000));
362 __ movsd(Operand(ebx, ecx, times_4, 10000), xmm1); 358 __ movsd(Operand(ebx, ecx, times_4, 10000), xmm1);
363 __ ucomisd(xmm0, xmm1); 359 __ movaps(xmm0, xmm1);
364
365 // 128 bit move instructions. 360 // 128 bit move instructions.
366 __ movdqa(xmm0, Operand(ebx, ecx, times_4, 10000)); 361 __ movdqa(xmm0, Operand(ebx, ecx, times_4, 10000));
367 __ movdqa(Operand(ebx, ecx, times_4, 10000), xmm0); 362 __ movdqa(Operand(ebx, ecx, times_4, 10000), xmm0);
368 __ movdqu(xmm0, Operand(ebx, ecx, times_4, 10000)); 363 __ movdqu(xmm0, Operand(ebx, ecx, times_4, 10000));
369 __ movdqu(Operand(ebx, ecx, times_4, 10000), xmm0); 364 __ movdqu(Operand(ebx, ecx, times_4, 10000), xmm0);
365
366 __ addsd(xmm1, xmm0);
367 __ mulsd(xmm1, xmm0);
368 __ subsd(xmm1, xmm0);
369 __ divsd(xmm1, xmm0);
370 __ ucomisd(xmm0, xmm1);
371 __ cmpltsd(xmm0, xmm1);
372
373 __ andps(xmm0, xmm1);
374 __ orps(xmm0, xmm1);
375 __ andpd(xmm0, xmm1);
376 __ psllq(xmm0, 17);
377 __ psllq(xmm0, xmm1);
378 __ psrlq(xmm0, 17);
379 __ psrlq(xmm0, xmm1);
380 __ por(xmm0, xmm1);
370 } 381 }
371 } 382 }
372 383
373 // cmov. 384 // cmov.
374 { 385 {
375 if (CpuFeatures::IsSupported(CMOV)) { 386 if (CpuFeatures::IsSupported(CMOV)) {
376 CpuFeatureScope use_cmov(&assm, CMOV); 387 CpuFeatureScope use_cmov(&assm, CMOV);
377 __ cmov(overflow, eax, Operand(eax, 0)); 388 __ cmov(overflow, eax, Operand(eax, 0));
378 __ cmov(no_overflow, eax, Operand(eax, 1)); 389 __ cmov(no_overflow, eax, Operand(eax, 1));
379 __ cmov(below, eax, Operand(eax, 2)); 390 __ cmov(below, eax, Operand(eax, 2));
380 __ cmov(above_equal, eax, Operand(eax, 3)); 391 __ cmov(above_equal, eax, Operand(eax, 3));
381 __ cmov(equal, eax, Operand(ebx, 0)); 392 __ cmov(equal, eax, Operand(ebx, 0));
382 __ cmov(not_equal, eax, Operand(ebx, 1)); 393 __ cmov(not_equal, eax, Operand(ebx, 1));
383 __ cmov(below_equal, eax, Operand(ebx, 2)); 394 __ cmov(below_equal, eax, Operand(ebx, 2));
384 __ cmov(above, eax, Operand(ebx, 3)); 395 __ cmov(above, eax, Operand(ebx, 3));
385 __ cmov(sign, eax, Operand(ecx, 0)); 396 __ cmov(sign, eax, Operand(ecx, 0));
386 __ cmov(not_sign, eax, Operand(ecx, 1)); 397 __ cmov(not_sign, eax, Operand(ecx, 1));
387 __ cmov(parity_even, eax, Operand(ecx, 2)); 398 __ cmov(parity_even, eax, Operand(ecx, 2));
388 __ cmov(parity_odd, eax, Operand(ecx, 3)); 399 __ cmov(parity_odd, eax, Operand(ecx, 3));
389 __ cmov(less, eax, Operand(edx, 0)); 400 __ cmov(less, eax, Operand(edx, 0));
390 __ cmov(greater_equal, eax, Operand(edx, 1)); 401 __ cmov(greater_equal, eax, Operand(edx, 1));
391 __ cmov(less_equal, eax, Operand(edx, 2)); 402 __ cmov(less_equal, eax, Operand(edx, 2));
392 __ cmov(greater, eax, Operand(edx, 3)); 403 __ cmov(greater, eax, Operand(edx, 3));
393 } 404 }
394 } 405 }
395 406
396 // andpd, cmpltsd, movaps, psllq, psrlq, por.
397 {
398 if (CpuFeatures::IsSupported(SSE2)) {
399 CpuFeatureScope fscope(&assm, SSE2);
400 __ andpd(xmm0, xmm1);
401 __ andpd(xmm1, xmm2);
402
403 __ cmpltsd(xmm0, xmm1);
404 __ cmpltsd(xmm1, xmm2);
405
406 __ movaps(xmm0, xmm1);
407 __ movaps(xmm1, xmm2);
408
409 __ psllq(xmm0, 17);
410 __ psllq(xmm1, 42);
411
412 __ psllq(xmm0, xmm1);
413 __ psllq(xmm1, xmm2);
414
415 __ psrlq(xmm0, 17);
416 __ psrlq(xmm1, 42);
417
418 __ psrlq(xmm0, xmm1);
419 __ psrlq(xmm1, xmm2);
420
421 __ por(xmm0, xmm1);
422 __ por(xmm1, xmm2);
423 }
424 }
425
426 { 407 {
427 if (CpuFeatures::IsSupported(SSE2) && 408 if (CpuFeatures::IsSupported(SSE2) &&
428 CpuFeatures::IsSupported(SSE4_1)) { 409 CpuFeatures::IsSupported(SSE4_1)) {
429 CpuFeatureScope scope(&assm, SSE4_1); 410 CpuFeatureScope scope(&assm, SSE4_1);
430 __ pextrd(eax, xmm0, 1); 411 __ pextrd(eax, xmm0, 1);
431 __ pinsrd(xmm1, eax, 0); 412 __ pinsrd(xmm1, eax, 0);
432 __ extractps(eax, xmm1, 0); 413 __ extractps(eax, xmm1, 0);
433 } 414 }
434 } 415 }
435 416
(...skipping 13 matching lines...) Expand all
449 CHECK(code->IsCode()); 430 CHECK(code->IsCode());
450 #ifdef OBJECT_PRINT 431 #ifdef OBJECT_PRINT
451 Code::cast(code)->Print(); 432 Code::cast(code)->Print();
452 byte* begin = Code::cast(code)->instruction_start(); 433 byte* begin = Code::cast(code)->instruction_start();
453 byte* end = begin + Code::cast(code)->instruction_size(); 434 byte* end = begin + Code::cast(code)->instruction_size();
454 disasm::Disassembler::Disassemble(stdout, begin, end); 435 disasm::Disassembler::Disassemble(stdout, begin, end);
455 #endif 436 #endif
456 } 437 }
457 438
458 #undef __ 439 #undef __
OLDNEW
« no previous file with comments | « test/cctest/test-dictionary.cc ('k') | test/cctest/test-disasm-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698