OLD | NEW |
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 Loading... |
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 Loading... |
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 __ |
OLD | NEW |