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