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

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

Issue 275253004: Require CMOV support for the ia32 port. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: restore uses of cmov Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « src/x64/assembler-x64.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 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 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 __ andpd(xmm0, xmm1); 407 __ andpd(xmm0, xmm1);
408 __ psllq(xmm0, 17); 408 __ psllq(xmm0, 17);
409 __ psllq(xmm0, xmm1); 409 __ psllq(xmm0, xmm1);
410 __ psrlq(xmm0, 17); 410 __ psrlq(xmm0, 17);
411 __ psrlq(xmm0, xmm1); 411 __ psrlq(xmm0, xmm1);
412 __ por(xmm0, xmm1); 412 __ por(xmm0, xmm1);
413 } 413 }
414 414
415 // cmov. 415 // cmov.
416 { 416 {
417 if (CpuFeatures::IsSupported(CMOV)) { 417 __ cmov(overflow, eax, Operand(eax, 0));
418 CpuFeatureScope use_cmov(&assm, CMOV); 418 __ cmov(no_overflow, eax, Operand(eax, 1));
419 __ cmov(overflow, eax, Operand(eax, 0)); 419 __ cmov(below, eax, Operand(eax, 2));
420 __ cmov(no_overflow, eax, Operand(eax, 1)); 420 __ cmov(above_equal, eax, Operand(eax, 3));
421 __ cmov(below, eax, Operand(eax, 2)); 421 __ cmov(equal, eax, Operand(ebx, 0));
422 __ cmov(above_equal, eax, Operand(eax, 3)); 422 __ cmov(not_equal, eax, Operand(ebx, 1));
423 __ cmov(equal, eax, Operand(ebx, 0)); 423 __ cmov(below_equal, eax, Operand(ebx, 2));
424 __ cmov(not_equal, eax, Operand(ebx, 1)); 424 __ cmov(above, eax, Operand(ebx, 3));
425 __ cmov(below_equal, eax, Operand(ebx, 2)); 425 __ cmov(sign, eax, Operand(ecx, 0));
426 __ cmov(above, eax, Operand(ebx, 3)); 426 __ cmov(not_sign, eax, Operand(ecx, 1));
427 __ cmov(sign, eax, Operand(ecx, 0)); 427 __ cmov(parity_even, eax, Operand(ecx, 2));
428 __ cmov(not_sign, eax, Operand(ecx, 1)); 428 __ cmov(parity_odd, eax, Operand(ecx, 3));
429 __ cmov(parity_even, eax, Operand(ecx, 2)); 429 __ cmov(less, eax, Operand(edx, 0));
430 __ cmov(parity_odd, eax, Operand(ecx, 3)); 430 __ cmov(greater_equal, eax, Operand(edx, 1));
431 __ cmov(less, eax, Operand(edx, 0)); 431 __ cmov(less_equal, eax, Operand(edx, 2));
432 __ cmov(greater_equal, eax, Operand(edx, 1)); 432 __ cmov(greater, eax, Operand(edx, 3));
433 __ cmov(less_equal, eax, Operand(edx, 2));
434 __ cmov(greater, eax, Operand(edx, 3));
435 }
436 } 433 }
437 434
438 { 435 {
439 if (CpuFeatures::IsSupported(SSE4_1)) { 436 if (CpuFeatures::IsSupported(SSE4_1)) {
440 CpuFeatureScope scope(&assm, SSE4_1); 437 CpuFeatureScope scope(&assm, SSE4_1);
441 __ pextrd(eax, xmm0, 1); 438 __ pextrd(eax, xmm0, 1);
442 __ pinsrd(xmm1, eax, 0); 439 __ pinsrd(xmm1, eax, 0);
443 __ extractps(eax, xmm1, 0); 440 __ extractps(eax, xmm1, 0);
444 } 441 }
445 } 442 }
(...skipping 12 matching lines...) Expand all
458 USE(code); 455 USE(code);
459 #ifdef OBJECT_PRINT 456 #ifdef OBJECT_PRINT
460 code->Print(); 457 code->Print();
461 byte* begin = code->instruction_start(); 458 byte* begin = code->instruction_start();
462 byte* end = begin + code->instruction_size(); 459 byte* end = begin + code->instruction_size();
463 disasm::Disassembler::Disassemble(stdout, begin, end); 460 disasm::Disassembler::Disassemble(stdout, begin, end);
464 #endif 461 #endif
465 } 462 }
466 463
467 #undef __ 464 #undef __
OLDNEW
« no previous file with comments | « src/x64/assembler-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698