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

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

Issue 1860001: X64: Port inline transcendental cache to X64. (Closed)
Patch Set: Created 10 years, 7 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 2022 matching lines...) Expand 10 before | Expand all | Expand 10 after
2033 2033
2034 2034
2035 void Assembler::fldz() { 2035 void Assembler::fldz() {
2036 EnsureSpace ensure_space(this); 2036 EnsureSpace ensure_space(this);
2037 last_pc_ = pc_; 2037 last_pc_ = pc_;
2038 emit(0xD9); 2038 emit(0xD9);
2039 emit(0xEE); 2039 emit(0xEE);
2040 } 2040 }
2041 2041
2042 2042
2043 void Assembler::fldpi() {
2044 EnsureSpace ensure_space(this);
2045 last_pc_ = pc_;
2046 emit(0xD9);
2047 emit(0xEB);
2048 }
2049
2050
2043 void Assembler::fld_s(const Operand& adr) { 2051 void Assembler::fld_s(const Operand& adr) {
2044 EnsureSpace ensure_space(this); 2052 EnsureSpace ensure_space(this);
2045 last_pc_ = pc_; 2053 last_pc_ = pc_;
2046 emit_optional_rex_32(adr); 2054 emit_optional_rex_32(adr);
2047 emit(0xD9); 2055 emit(0xD9);
2048 emit_operand(0, adr); 2056 emit_operand(0, adr);
2049 } 2057 }
2050 2058
2051 2059
2052 void Assembler::fld_d(const Operand& adr) { 2060 void Assembler::fld_d(const Operand& adr) {
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
2391 EnsureSpace ensure_space(this); 2399 EnsureSpace ensure_space(this);
2392 last_pc_ = pc_; 2400 last_pc_ = pc_;
2393 emit(0x66); 2401 emit(0x66);
2394 emit_optional_rex_32(dst, src); 2402 emit_optional_rex_32(dst, src);
2395 emit(0x0F); 2403 emit(0x0F);
2396 emit(0x6E); 2404 emit(0x6E);
2397 emit_sse_operand(dst, src); 2405 emit_sse_operand(dst, src);
2398 } 2406 }
2399 2407
2400 2408
2409 void Assembler::movd(Register dst, XMMRegister src) {
2410 EnsureSpace ensure_space(this);
2411 last_pc_ = pc_;
2412 emit(0x66);
2413 emit_optional_rex_32(dst, src);
2414 emit(0x0F);
2415 emit(0x7E);
2416 emit_sse_operand(dst, src);
2417 }
2418
2419
2420 void Assembler::movq(XMMRegister dst, Register src) {
2421 EnsureSpace ensure_space(this);
2422 last_pc_ = pc_;
2423 emit(0x66);
2424 emit_rex_64(dst, src);
2425 emit(0x0F);
2426 emit(0x6E);
2427 emit_sse_operand(dst, src);
2428 }
2429
2430
2431 void Assembler::movq(Register dst, XMMRegister src) {
2432 EnsureSpace ensure_space(this);
2433 last_pc_ = pc_;
2434 emit(0x66);
2435 emit_rex_64(dst, src);
2436 emit(0x0F);
2437 emit(0x7E);
2438 emit_sse_operand(dst, src);
2439 }
2440
2441
2442 void Assembler::extractps(Register dst, XMMRegister src, byte imm8) {
2443 ASSERT(is_uint2(imm8));
2444 EnsureSpace ensure_space(this);
2445 last_pc_ = pc_;
2446 emit(0x66);
2447 emit_optional_rex_32(dst, src);
2448 emit(0x0F);
2449 emit(0x3A);
2450 emit(0x17);
2451 emit_sse_operand(dst, src);
2452 emit(imm8);
2453 }
2454
2455
2401 void Assembler::movsd(const Operand& dst, XMMRegister src) { 2456 void Assembler::movsd(const Operand& dst, XMMRegister src) {
2402 EnsureSpace ensure_space(this); 2457 EnsureSpace ensure_space(this);
2403 last_pc_ = pc_; 2458 last_pc_ = pc_;
2404 emit(0xF2); // double 2459 emit(0xF2); // double
2405 emit_optional_rex_32(src, dst); 2460 emit_optional_rex_32(src, dst);
2406 emit(0x0F); 2461 emit(0x0F);
2407 emit(0x11); // store 2462 emit(0x11); // store
2408 emit_sse_operand(src, dst); 2463 emit_sse_operand(src, dst);
2409 } 2464 }
2410 2465
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
2592 2647
2593 2648
2594 void Assembler::emit_sse_operand(XMMRegister dst, XMMRegister src) { 2649 void Assembler::emit_sse_operand(XMMRegister dst, XMMRegister src) {
2595 emit(0xC0 | (dst.low_bits() << 3) | src.low_bits()); 2650 emit(0xC0 | (dst.low_bits() << 3) | src.low_bits());
2596 } 2651 }
2597 2652
2598 void Assembler::emit_sse_operand(XMMRegister dst, Register src) { 2653 void Assembler::emit_sse_operand(XMMRegister dst, Register src) {
2599 emit(0xC0 | (dst.low_bits() << 3) | src.low_bits()); 2654 emit(0xC0 | (dst.low_bits() << 3) | src.low_bits());
2600 } 2655 }
2601 2656
2657 void Assembler::emit_sse_operand(Register dst, XMMRegister src) {
2658 emit(0xC0 | (dst.low_bits() << 3) | src.low_bits());
2659 }
2660
2602 2661
2603 // Relocation information implementations. 2662 // Relocation information implementations.
2604 2663
2605 void Assembler::RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data) { 2664 void Assembler::RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data) {
2606 ASSERT(rmode != RelocInfo::NONE); 2665 ASSERT(rmode != RelocInfo::NONE);
2607 // Don't record external references unless the heap will be serialized. 2666 // Don't record external references unless the heap will be serialized.
2608 if (rmode == RelocInfo::EXTERNAL_REFERENCE && 2667 if (rmode == RelocInfo::EXTERNAL_REFERENCE &&
2609 !Serializer::enabled() && 2668 !Serializer::enabled() &&
2610 !FLAG_debug_code) { 2669 !FLAG_debug_code) {
2611 return; 2670 return;
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
2661 written_position_ = current_position_; 2720 written_position_ = current_position_;
2662 } 2721 }
2663 } 2722 }
2664 2723
2665 2724
2666 const int RelocInfo::kApplyMask = RelocInfo::kCodeTargetMask | 2725 const int RelocInfo::kApplyMask = RelocInfo::kCodeTargetMask |
2667 1 << RelocInfo::INTERNAL_REFERENCE | 2726 1 << RelocInfo::INTERNAL_REFERENCE |
2668 1 << RelocInfo::JS_RETURN; 2727 1 << RelocInfo::JS_RETURN;
2669 2728
2670 } } // namespace v8::internal 2729 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/x64/assembler-x64.h ('k') | src/x64/assembler-x64-inl.h » ('j') | src/x64/codegen-x64.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698