| 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 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 435 | 435 |
| 436 __ psrlq(xmm0, xmm1); | 436 __ psrlq(xmm0, xmm1); |
| 437 __ psrlq(xmm1, xmm2); | 437 __ psrlq(xmm1, xmm2); |
| 438 | 438 |
| 439 __ por(xmm0, xmm1); | 439 __ por(xmm0, xmm1); |
| 440 __ por(xmm1, xmm2); | 440 __ por(xmm1, xmm2); |
| 441 } | 441 } |
| 442 } | 442 } |
| 443 | 443 |
| 444 { | 444 { |
| 445 if (CpuFeatures::IsSupported(SSE2) && | 445 if (CpuFeatures::IsSupported(SSE4_1)) { |
| 446 CpuFeatures::IsSupported(SSE4_1)) { | |
| 447 CpuFeatures::Scope scope(SSE4_1); | 446 CpuFeatures::Scope scope(SSE4_1); |
| 448 __ pextrd(eax, xmm0, 1); | 447 __ pextrd(eax, xmm0, 1); |
| 449 __ pinsrd(xmm1, eax, 0); | 448 __ pinsrd(xmm1, eax, 0); |
| 450 } | 449 } |
| 451 } | 450 } |
| 452 | 451 |
| 453 // Nop instructions | 452 // Nop instructions |
| 454 for (int i = 0; i < 16; i++) { | 453 for (int i = 0; i < 16; i++) { |
| 455 __ Nop(i); | 454 __ Nop(i); |
| 456 } | 455 } |
| 457 | 456 |
| 458 __ ret(0); | 457 __ ret(0); |
| 459 | 458 |
| 460 CodeDesc desc; | 459 CodeDesc desc; |
| 461 assm.GetCode(&desc); | 460 assm.GetCode(&desc); |
| 462 Object* code = HEAP->CreateCode( | 461 Object* code = HEAP->CreateCode( |
| 463 desc, | 462 desc, |
| 464 Code::ComputeFlags(Code::STUB), | 463 Code::ComputeFlags(Code::STUB), |
| 465 Handle<Object>(HEAP->undefined_value()))->ToObjectChecked(); | 464 Handle<Object>(HEAP->undefined_value()))->ToObjectChecked(); |
| 466 CHECK(code->IsCode()); | 465 CHECK(code->IsCode()); |
| 467 #ifdef OBJECT_PRINT | 466 #ifdef OBJECT_PRINT |
| 468 Code::cast(code)->Print(); | 467 Code::cast(code)->Print(); |
| 469 byte* begin = Code::cast(code)->instruction_start(); | 468 byte* begin = Code::cast(code)->instruction_start(); |
| 470 byte* end = begin + Code::cast(code)->instruction_size(); | 469 byte* end = begin + Code::cast(code)->instruction_size(); |
| 471 disasm::Disassembler::Disassemble(stdout, begin, end); | 470 disasm::Disassembler::Disassemble(stdout, begin, end); |
| 472 #endif | 471 #endif |
| 473 } | 472 } |
| 474 | 473 |
| 475 #undef __ | 474 #undef __ |
| OLD | NEW |