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

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

Issue 1448383002: MIPS: Implementation of Float64RoundUp and Float64RoundTiesEven (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixing CLINT warning on function size Created 5 years, 1 month 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
« no previous file with comments | « src/compiler/mips/instruction-selector-mips.cc ('k') | no next file » | 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 are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // 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 2465 matching lines...) Expand 10 before | Expand all | Expand 10 after
2476 DCHECK(IsMipsArchVariant(kMips32r6)); 2476 DCHECK(IsMipsArchVariant(kMips32r6));
2477 DCHECK((fmt == D) || (fmt == S)); 2477 DCHECK((fmt == D) || (fmt == S));
2478 GenInstrRegister(COP1, fmt, f0, fs, fd, RINT); 2478 GenInstrRegister(COP1, fmt, f0, fs, fd, RINT);
2479 } 2479 }
2480 2480
2481 2481
2482 void Assembler::rint_d(FPURegister fd, FPURegister fs) { rint(D, fd, fs); } 2482 void Assembler::rint_d(FPURegister fd, FPURegister fs) { rint(D, fd, fs); }
2483 2483
2484 2484
2485 void Assembler::cvt_l_s(FPURegister fd, FPURegister fs) { 2485 void Assembler::cvt_l_s(FPURegister fd, FPURegister fs) {
2486 DCHECK(IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)); 2486 DCHECK((IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)) &&
2487 IsFp64Mode());
2487 GenInstrRegister(COP1, S, f0, fs, fd, CVT_L_S); 2488 GenInstrRegister(COP1, S, f0, fs, fd, CVT_L_S);
2488 } 2489 }
2489 2490
2490 2491
2491 void Assembler::cvt_l_d(FPURegister fd, FPURegister fs) { 2492 void Assembler::cvt_l_d(FPURegister fd, FPURegister fs) {
2492 DCHECK(IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)); 2493 DCHECK((IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)) &&
2494 IsFp64Mode());
2493 GenInstrRegister(COP1, D, f0, fs, fd, CVT_L_D); 2495 GenInstrRegister(COP1, D, f0, fs, fd, CVT_L_D);
2494 } 2496 }
2495 2497
2496 2498
2497 void Assembler::trunc_l_s(FPURegister fd, FPURegister fs) { 2499 void Assembler::trunc_l_s(FPURegister fd, FPURegister fs) {
2498 DCHECK(IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)); 2500 DCHECK((IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)) &&
2501 IsFp64Mode());
2499 GenInstrRegister(COP1, S, f0, fs, fd, TRUNC_L_S); 2502 GenInstrRegister(COP1, S, f0, fs, fd, TRUNC_L_S);
2500 } 2503 }
2501 2504
2502 2505
2503 void Assembler::trunc_l_d(FPURegister fd, FPURegister fs) { 2506 void Assembler::trunc_l_d(FPURegister fd, FPURegister fs) {
2504 DCHECK(IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)); 2507 DCHECK((IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)) &&
2508 IsFp64Mode());
2505 GenInstrRegister(COP1, D, f0, fs, fd, TRUNC_L_D); 2509 GenInstrRegister(COP1, D, f0, fs, fd, TRUNC_L_D);
2506 } 2510 }
2507 2511
2508 2512
2509 void Assembler::round_l_s(FPURegister fd, FPURegister fs) { 2513 void Assembler::round_l_s(FPURegister fd, FPURegister fs) {
2514 DCHECK((IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)) &&
2515 IsFp64Mode());
2510 GenInstrRegister(COP1, S, f0, fs, fd, ROUND_L_S); 2516 GenInstrRegister(COP1, S, f0, fs, fd, ROUND_L_S);
2511 } 2517 }
2512 2518
2513 2519
2514 void Assembler::round_l_d(FPURegister fd, FPURegister fs) { 2520 void Assembler::round_l_d(FPURegister fd, FPURegister fs) {
2521 DCHECK((IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)) &&
2522 IsFp64Mode());
2515 GenInstrRegister(COP1, D, f0, fs, fd, ROUND_L_D); 2523 GenInstrRegister(COP1, D, f0, fs, fd, ROUND_L_D);
2516 } 2524 }
2517 2525
2518 2526
2519 void Assembler::floor_l_s(FPURegister fd, FPURegister fs) { 2527 void Assembler::floor_l_s(FPURegister fd, FPURegister fs) {
2528 DCHECK((IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)) &&
2529 IsFp64Mode());
2520 GenInstrRegister(COP1, S, f0, fs, fd, FLOOR_L_S); 2530 GenInstrRegister(COP1, S, f0, fs, fd, FLOOR_L_S);
2521 } 2531 }
2522 2532
2523 2533
2524 void Assembler::floor_l_d(FPURegister fd, FPURegister fs) { 2534 void Assembler::floor_l_d(FPURegister fd, FPURegister fs) {
2535 DCHECK((IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)) &&
2536 IsFp64Mode());
2525 GenInstrRegister(COP1, D, f0, fs, fd, FLOOR_L_D); 2537 GenInstrRegister(COP1, D, f0, fs, fd, FLOOR_L_D);
2526 } 2538 }
2527 2539
2528 2540
2529 void Assembler::ceil_l_s(FPURegister fd, FPURegister fs) { 2541 void Assembler::ceil_l_s(FPURegister fd, FPURegister fs) {
2542 DCHECK((IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)) &&
2543 IsFp64Mode());
2530 GenInstrRegister(COP1, S, f0, fs, fd, CEIL_L_S); 2544 GenInstrRegister(COP1, S, f0, fs, fd, CEIL_L_S);
2531 } 2545 }
2532 2546
2533 2547
2534 void Assembler::ceil_l_d(FPURegister fd, FPURegister fs) { 2548 void Assembler::ceil_l_d(FPURegister fd, FPURegister fs) {
2549 DCHECK((IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)) &&
2550 IsFp64Mode());
2535 GenInstrRegister(COP1, D, f0, fs, fd, CEIL_L_D); 2551 GenInstrRegister(COP1, D, f0, fs, fd, CEIL_L_D);
2536 } 2552 }
2537 2553
2538 2554
2539 void Assembler::class_s(FPURegister fd, FPURegister fs) { 2555 void Assembler::class_s(FPURegister fd, FPURegister fs) {
2540 DCHECK(IsMipsArchVariant(kMips32r6)); 2556 DCHECK(IsMipsArchVariant(kMips32r6));
2541 GenInstrRegister(COP1, S, f0, fs, fd, CLASS_S); 2557 GenInstrRegister(COP1, S, f0, fs, fd, CLASS_S);
2542 } 2558 }
2543 2559
2544 2560
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
2619 maxa(D, fd, fs, ft); 2635 maxa(D, fd, fs, ft);
2620 } 2636 }
2621 2637
2622 2638
2623 void Assembler::cvt_s_w(FPURegister fd, FPURegister fs) { 2639 void Assembler::cvt_s_w(FPURegister fd, FPURegister fs) {
2624 GenInstrRegister(COP1, W, f0, fs, fd, CVT_S_W); 2640 GenInstrRegister(COP1, W, f0, fs, fd, CVT_S_W);
2625 } 2641 }
2626 2642
2627 2643
2628 void Assembler::cvt_s_l(FPURegister fd, FPURegister fs) { 2644 void Assembler::cvt_s_l(FPURegister fd, FPURegister fs) {
2629 DCHECK(IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)); 2645 DCHECK((IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)) &&
2646 IsFp64Mode());
2630 GenInstrRegister(COP1, L, f0, fs, fd, CVT_S_L); 2647 GenInstrRegister(COP1, L, f0, fs, fd, CVT_S_L);
2631 } 2648 }
2632 2649
2633 2650
2634 void Assembler::cvt_s_d(FPURegister fd, FPURegister fs) { 2651 void Assembler::cvt_s_d(FPURegister fd, FPURegister fs) {
2635 GenInstrRegister(COP1, D, f0, fs, fd, CVT_S_D); 2652 GenInstrRegister(COP1, D, f0, fs, fd, CVT_S_D);
2636 } 2653 }
2637 2654
2638 2655
2639 void Assembler::cvt_d_w(FPURegister fd, FPURegister fs) { 2656 void Assembler::cvt_d_w(FPURegister fd, FPURegister fs) {
2640 GenInstrRegister(COP1, W, f0, fs, fd, CVT_D_W); 2657 GenInstrRegister(COP1, W, f0, fs, fd, CVT_D_W);
2641 } 2658 }
2642 2659
2643 2660
2644 void Assembler::cvt_d_l(FPURegister fd, FPURegister fs) { 2661 void Assembler::cvt_d_l(FPURegister fd, FPURegister fs) {
2645 DCHECK(IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)); 2662 DCHECK((IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)) &&
2663 IsFp64Mode());
2646 GenInstrRegister(COP1, L, f0, fs, fd, CVT_D_L); 2664 GenInstrRegister(COP1, L, f0, fs, fd, CVT_D_L);
2647 } 2665 }
2648 2666
2649 2667
2650 void Assembler::cvt_d_s(FPURegister fd, FPURegister fs) { 2668 void Assembler::cvt_d_s(FPURegister fd, FPURegister fs) {
2651 GenInstrRegister(COP1, S, f0, fs, fd, CVT_D_S); 2669 GenInstrRegister(COP1, S, f0, fs, fd, CVT_D_S);
2652 } 2670 }
2653 2671
2654 2672
2655 // Conditions for >= MIPSr6. 2673 // Conditions for >= MIPSr6.
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
3023 3041
3024 if (icache_flush_mode != SKIP_ICACHE_FLUSH) { 3042 if (icache_flush_mode != SKIP_ICACHE_FLUSH) {
3025 CpuFeatures::FlushICache(pc, 2 * sizeof(int32_t)); 3043 CpuFeatures::FlushICache(pc, 2 * sizeof(int32_t));
3026 } 3044 }
3027 } 3045 }
3028 3046
3029 } // namespace internal 3047 } // namespace internal
3030 } // namespace v8 3048 } // namespace v8
3031 3049
3032 #endif // V8_TARGET_ARCH_MIPS 3050 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/compiler/mips/instruction-selector-mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698