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

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

Issue 597005: Ported ia32 optimization of revision 3487 to x64. (Closed)
Patch Set: Created 10 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
OLDNEW
1 // Copyright 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 2490 matching lines...) Expand 10 before | Expand all | Expand 10 after
2501 EnsureSpace ensure_space(this); 2501 EnsureSpace ensure_space(this);
2502 last_pc_ = pc_; 2502 last_pc_ = pc_;
2503 emit(0xF2); 2503 emit(0xF2);
2504 emit_optional_rex_32(dst, src); 2504 emit_optional_rex_32(dst, src);
2505 emit(0x0F); 2505 emit(0x0F);
2506 emit(0x5E); 2506 emit(0x5E);
2507 emit_sse_operand(dst, src); 2507 emit_sse_operand(dst, src);
2508 } 2508 }
2509 2509
2510 2510
2511 void Assembler::xorpd(XMMRegister dst, XMMRegister src) {
2512 EnsureSpace ensure_space(this);
2513 last_pc_ = pc_;
2514 emit(0x66);
2515 emit_optional_rex_32(dst, src);
2516 emit(0x0f);
2517 emit(0x57);
2518 emit_sse_operand(dst, src);
2519 }
2520
2521
2522 void Assembler::comisd(XMMRegister dst, XMMRegister src) {
2523 EnsureSpace ensure_space(this);
2524 last_pc_ = pc_;
2525 emit(0x66);
2526 emit_optional_rex_32(dst, src);
2527 emit(0x0f);
2528 emit(0x2f);
2529 emit_sse_operand(dst, src);
2530 }
2531
2532
2533 void Assembler::ucomisd(XMMRegister dst, XMMRegister src) {
2534 EnsureSpace ensure_space(this);
2535 last_pc_ = pc_;
2536 emit(0x66);
2537 emit_optional_rex_32(dst, src);
2538 emit(0x0f);
2539 emit(0x2e);
2540 emit_sse_operand(dst, src);
2541 }
2542
2511 2543
2512 void Assembler::emit_sse_operand(XMMRegister reg, const Operand& adr) { 2544 void Assembler::emit_sse_operand(XMMRegister reg, const Operand& adr) {
2513 Register ireg = { reg.code() }; 2545 Register ireg = { reg.code() };
2514 emit_operand(ireg, adr); 2546 emit_operand(ireg, adr);
2515 } 2547 }
2516 2548
2517 2549
2518 void Assembler::emit_sse_operand(XMMRegister dst, XMMRegister src) { 2550 void Assembler::emit_sse_operand(XMMRegister dst, XMMRegister src) {
2519 emit(0xC0 | (dst.low_bits() << 3) | src.low_bits()); 2551 emit(0xC0 | (dst.low_bits() << 3) | src.low_bits());
2520 } 2552 }
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
2585 written_position_ = current_position_; 2617 written_position_ = current_position_;
2586 } 2618 }
2587 } 2619 }
2588 2620
2589 2621
2590 const int RelocInfo::kApplyMask = RelocInfo::kCodeTargetMask | 2622 const int RelocInfo::kApplyMask = RelocInfo::kCodeTargetMask |
2591 1 << RelocInfo::INTERNAL_REFERENCE | 2623 1 << RelocInfo::INTERNAL_REFERENCE |
2592 1 << RelocInfo::JS_RETURN; 2624 1 << RelocInfo::JS_RETURN;
2593 2625
2594 } } // namespace v8::internal 2626 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/x64/assembler-x64.h ('k') | src/x64/codegen-x64.h » ('j') | src/x64/codegen-x64.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698