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

Side by Side Diff: src/ia32/assembler-ia32.cc

Issue 6529032: Merge 6168:6800 from bleeding_edge to experimental/gc branch. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: Created 9 years, 10 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/ia32/assembler-ia32.h ('k') | src/ia32/assembler-ia32-inl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 1994-2006 Sun Microsystems Inc. 1 // Copyright (c) 1994-2006 Sun Microsystems Inc.
2 // All Rights Reserved. 2 // All Rights Reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions 5 // modification, are permitted provided that the following conditions
6 // are met: 6 // are met:
7 // 7 //
8 // - Redistributions of source code must retain the above copyright notice, 8 // - Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer. 9 // this list of conditions and the following disclaimer.
10 // 10 //
(...skipping 2447 matching lines...) Expand 10 before | Expand all | Expand 10 after
2458 ASSERT(CpuFeatures::IsEnabled(SSE2)); 2458 ASSERT(CpuFeatures::IsEnabled(SSE2));
2459 EnsureSpace ensure_space(this); 2459 EnsureSpace ensure_space(this);
2460 last_pc_ = pc_; 2460 last_pc_ = pc_;
2461 EMIT(0x66); 2461 EMIT(0x66);
2462 EMIT(0x0F); 2462 EMIT(0x0F);
2463 EMIT(0xEF); 2463 EMIT(0xEF);
2464 emit_sse_operand(dst, src); 2464 emit_sse_operand(dst, src);
2465 } 2465 }
2466 2466
2467 2467
2468 void Assembler::por(XMMRegister dst, XMMRegister src) {
2469 ASSERT(CpuFeatures::IsEnabled(SSE2));
2470 EnsureSpace ensure_space(this);
2471 last_pc_ = pc_;
2472 EMIT(0x66);
2473 EMIT(0x0F);
2474 EMIT(0xEB);
2475 emit_sse_operand(dst, src);
2476 }
2477
2478
2468 void Assembler::ptest(XMMRegister dst, XMMRegister src) { 2479 void Assembler::ptest(XMMRegister dst, XMMRegister src) {
2469 ASSERT(CpuFeatures::IsEnabled(SSE4_1)); 2480 ASSERT(CpuFeatures::IsEnabled(SSE4_1));
2470 EnsureSpace ensure_space(this); 2481 EnsureSpace ensure_space(this);
2471 last_pc_ = pc_; 2482 last_pc_ = pc_;
2472 EMIT(0x66); 2483 EMIT(0x66);
2473 EMIT(0x0F); 2484 EMIT(0x0F);
2474 EMIT(0x38); 2485 EMIT(0x38);
2475 EMIT(0x17); 2486 EMIT(0x17);
2476 emit_sse_operand(dst, src); 2487 emit_sse_operand(dst, src);
2477 } 2488 }
2478 2489
2479 2490
2480 void Assembler::psllq(XMMRegister reg, int8_t shift) { 2491 void Assembler::psllq(XMMRegister reg, int8_t shift) {
2481 ASSERT(CpuFeatures::IsEnabled(SSE2)); 2492 ASSERT(CpuFeatures::IsEnabled(SSE2));
2482 EnsureSpace ensure_space(this); 2493 EnsureSpace ensure_space(this);
2483 last_pc_ = pc_; 2494 last_pc_ = pc_;
2484 EMIT(0x66); 2495 EMIT(0x66);
2485 EMIT(0x0F); 2496 EMIT(0x0F);
2486 EMIT(0x73); 2497 EMIT(0x73);
2487 emit_sse_operand(esi, reg); // esi == 6 2498 emit_sse_operand(esi, reg); // esi == 6
2488 EMIT(shift); 2499 EMIT(shift);
2489 } 2500 }
2490 2501
2491 2502
2503 void Assembler::psllq(XMMRegister dst, XMMRegister src) {
2504 ASSERT(CpuFeatures::IsEnabled(SSE2));
2505 EnsureSpace ensure_space(this);
2506 last_pc_ = pc_;
2507 EMIT(0x66);
2508 EMIT(0x0F);
2509 EMIT(0xF3);
2510 emit_sse_operand(dst, src);
2511 }
2512
2513
2514 void Assembler::psrlq(XMMRegister reg, int8_t shift) {
2515 ASSERT(CpuFeatures::IsEnabled(SSE2));
2516 EnsureSpace ensure_space(this);
2517 last_pc_ = pc_;
2518 EMIT(0x66);
2519 EMIT(0x0F);
2520 EMIT(0x73);
2521 emit_sse_operand(edx, reg); // edx == 2
2522 EMIT(shift);
2523 }
2524
2525
2526 void Assembler::psrlq(XMMRegister dst, XMMRegister src) {
2527 ASSERT(CpuFeatures::IsEnabled(SSE2));
2528 EnsureSpace ensure_space(this);
2529 last_pc_ = pc_;
2530 EMIT(0x66);
2531 EMIT(0x0F);
2532 EMIT(0xD3);
2533 emit_sse_operand(dst, src);
2534 }
2535
2536
2492 void Assembler::pshufd(XMMRegister dst, XMMRegister src, int8_t shuffle) { 2537 void Assembler::pshufd(XMMRegister dst, XMMRegister src, int8_t shuffle) {
2493 ASSERT(CpuFeatures::IsEnabled(SSE2)); 2538 ASSERT(CpuFeatures::IsEnabled(SSE2));
2494 EnsureSpace ensure_space(this); 2539 EnsureSpace ensure_space(this);
2495 last_pc_ = pc_; 2540 last_pc_ = pc_;
2496 EMIT(0x66); 2541 EMIT(0x66);
2497 EMIT(0x0F); 2542 EMIT(0x0F);
2498 EMIT(0x70); 2543 EMIT(0x70);
2499 emit_sse_operand(dst, src); 2544 emit_sse_operand(dst, src);
2500 EMIT(shuffle); 2545 EMIT(shuffle);
2501 } 2546 }
2502 2547
2503 2548
2504 void Assembler::pextrd(const Operand& dst, XMMRegister src, int8_t offset) { 2549 void Assembler::pextrd(const Operand& dst, XMMRegister src, int8_t offset) {
2505 ASSERT(CpuFeatures::IsEnabled(SSE4_1)); 2550 ASSERT(CpuFeatures::IsEnabled(SSE4_1));
2506 EnsureSpace ensure_space(this); 2551 EnsureSpace ensure_space(this);
2507 last_pc_ = pc_; 2552 last_pc_ = pc_;
2508 EMIT(0x66); 2553 EMIT(0x66);
2509 EMIT(0x0F); 2554 EMIT(0x0F);
2510 EMIT(0x3A); 2555 EMIT(0x3A);
2511 EMIT(0x16); 2556 EMIT(0x16);
2512 emit_sse_operand(src, dst); 2557 emit_sse_operand(src, dst);
2513 EMIT(offset); 2558 EMIT(offset);
2514 } 2559 }
2515 2560
2516 2561
2562 void Assembler::pinsrd(XMMRegister dst, const Operand& src, int8_t offset) {
2563 ASSERT(CpuFeatures::IsEnabled(SSE4_1));
2564 EnsureSpace ensure_space(this);
2565 last_pc_ = pc_;
2566 EMIT(0x66);
2567 EMIT(0x0F);
2568 EMIT(0x3A);
2569 EMIT(0x22);
2570 emit_sse_operand(dst, src);
2571 EMIT(offset);
2572 }
2573
2574
2517 void Assembler::emit_sse_operand(XMMRegister reg, const Operand& adr) { 2575 void Assembler::emit_sse_operand(XMMRegister reg, const Operand& adr) {
2518 Register ireg = { reg.code() }; 2576 Register ireg = { reg.code() };
2519 emit_operand(ireg, adr); 2577 emit_operand(ireg, adr);
2520 } 2578 }
2521 2579
2522 2580
2523 void Assembler::emit_sse_operand(XMMRegister dst, XMMRegister src) { 2581 void Assembler::emit_sse_operand(XMMRegister dst, XMMRegister src) {
2524 EMIT(0xC0 | dst.code() << 3 | src.code()); 2582 EMIT(0xC0 | dst.code() << 3 | src.code());
2525 } 2583 }
2526 2584
(...skipping 15 matching lines...) Expand all
2542 } 2600 }
2543 2601
2544 2602
2545 void Assembler::RecordDebugBreakSlot() { 2603 void Assembler::RecordDebugBreakSlot() {
2546 positions_recorder()->WriteRecordedPositions(); 2604 positions_recorder()->WriteRecordedPositions();
2547 EnsureSpace ensure_space(this); 2605 EnsureSpace ensure_space(this);
2548 RecordRelocInfo(RelocInfo::DEBUG_BREAK_SLOT); 2606 RecordRelocInfo(RelocInfo::DEBUG_BREAK_SLOT);
2549 } 2607 }
2550 2608
2551 2609
2552 void Assembler::RecordComment(const char* msg) { 2610 void Assembler::RecordComment(const char* msg, bool force) {
2553 if (FLAG_code_comments) { 2611 if (FLAG_code_comments || force) {
2554 EnsureSpace ensure_space(this); 2612 EnsureSpace ensure_space(this);
2555 RecordRelocInfo(RelocInfo::COMMENT, reinterpret_cast<intptr_t>(msg)); 2613 RecordRelocInfo(RelocInfo::COMMENT, reinterpret_cast<intptr_t>(msg));
2556 } 2614 }
2557 } 2615 }
2558 2616
2559 2617
2560 void Assembler::GrowBuffer() { 2618 void Assembler::GrowBuffer() {
2561 ASSERT(overflow()); 2619 ASSERT(overflow());
2562 if (!own_buffer_) FATAL("external code buffer is too small"); 2620 if (!own_buffer_) FATAL("external code buffer is too small");
2563 2621
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
2733 fprintf(coverage_log, "%s\n", file_line); 2791 fprintf(coverage_log, "%s\n", file_line);
2734 fflush(coverage_log); 2792 fflush(coverage_log);
2735 } 2793 }
2736 } 2794 }
2737 2795
2738 #endif 2796 #endif
2739 2797
2740 } } // namespace v8::internal 2798 } } // namespace v8::internal
2741 2799
2742 #endif // V8_TARGET_ARCH_IA32 2800 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/assembler-ia32.h ('k') | src/ia32/assembler-ia32-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698