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