OLD | NEW |
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 2187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2198 | 2198 |
2199 | 2199 |
2200 void Assembler::dext_(Register rt, Register rs, uint16_t pos, uint16_t size) { | 2200 void Assembler::dext_(Register rt, Register rs, uint16_t pos, uint16_t size) { |
2201 // Should be called via MacroAssembler::Ext. | 2201 // Should be called via MacroAssembler::Ext. |
2202 // Dext instr has 'rt' field as dest, and two uint5: msb, lsb. | 2202 // Dext instr has 'rt' field as dest, and two uint5: msb, lsb. |
2203 DCHECK(kArchVariant == kMips64r2 || kArchVariant == kMips64r6); | 2203 DCHECK(kArchVariant == kMips64r2 || kArchVariant == kMips64r6); |
2204 GenInstrRegister(SPECIAL3, rs, rt, size - 1, pos, DEXT); | 2204 GenInstrRegister(SPECIAL3, rs, rt, size - 1, pos, DEXT); |
2205 } | 2205 } |
2206 | 2206 |
2207 | 2207 |
| 2208 void Assembler::bitswap(Register rd, Register rt) { |
| 2209 DCHECK(kArchVariant == kMips64r6); |
| 2210 GenInstrRegister(SPECIAL3, zero_reg, rt, rd, 0, BITSWAP); |
| 2211 } |
| 2212 |
| 2213 |
| 2214 void Assembler::dbitswap(Register rd, Register rt) { |
| 2215 DCHECK(kArchVariant == kMips64r6); |
| 2216 GenInstrRegister(SPECIAL3, zero_reg, rt, rd, 0, DBITSWAP); |
| 2217 } |
| 2218 |
| 2219 |
2208 void Assembler::pref(int32_t hint, const MemOperand& rs) { | 2220 void Assembler::pref(int32_t hint, const MemOperand& rs) { |
2209 DCHECK(is_uint5(hint) && is_uint16(rs.offset_)); | 2221 DCHECK(is_uint5(hint) && is_uint16(rs.offset_)); |
2210 Instr instr = PREF | (rs.rm().code() << kRsShift) | (hint << kRtShift) | 2222 Instr instr = PREF | (rs.rm().code() << kRsShift) | (hint << kRtShift) |
2211 | (rs.offset_); | 2223 | (rs.offset_); |
2212 emit(instr); | 2224 emit(instr); |
2213 } | 2225 } |
2214 | 2226 |
2215 | 2227 |
2216 // --------Coprocessor-instructions---------------- | 2228 // --------Coprocessor-instructions---------------- |
2217 | 2229 |
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2635 void Assembler::ceil_l_s(FPURegister fd, FPURegister fs) { | 2647 void Assembler::ceil_l_s(FPURegister fd, FPURegister fs) { |
2636 GenInstrRegister(COP1, S, f0, fs, fd, CEIL_L_S); | 2648 GenInstrRegister(COP1, S, f0, fs, fd, CEIL_L_S); |
2637 } | 2649 } |
2638 | 2650 |
2639 | 2651 |
2640 void Assembler::ceil_l_d(FPURegister fd, FPURegister fs) { | 2652 void Assembler::ceil_l_d(FPURegister fd, FPURegister fs) { |
2641 GenInstrRegister(COP1, D, f0, fs, fd, CEIL_L_D); | 2653 GenInstrRegister(COP1, D, f0, fs, fd, CEIL_L_D); |
2642 } | 2654 } |
2643 | 2655 |
2644 | 2656 |
| 2657 void Assembler::class_s(FPURegister fd, FPURegister fs) { |
| 2658 DCHECK(kArchVariant == kMips64r6); |
| 2659 GenInstrRegister(COP1, S, f0, fs, fd, CLASS_S); |
| 2660 } |
| 2661 |
| 2662 |
| 2663 void Assembler::class_d(FPURegister fd, FPURegister fs) { |
| 2664 DCHECK(kArchVariant == kMips64r6); |
| 2665 GenInstrRegister(COP1, D, f0, fs, fd, CLASS_D); |
| 2666 } |
| 2667 |
| 2668 |
2645 void Assembler::mina(SecondaryField fmt, FPURegister fd, FPURegister fs, | 2669 void Assembler::mina(SecondaryField fmt, FPURegister fd, FPURegister fs, |
2646 FPURegister ft) { | 2670 FPURegister ft) { |
2647 DCHECK(kArchVariant == kMips64r6); | 2671 DCHECK(kArchVariant == kMips64r6); |
2648 DCHECK((fmt == D) || (fmt == S)); | 2672 DCHECK((fmt == D) || (fmt == S)); |
2649 GenInstrRegister(COP1, fmt, ft, fs, fd, MINA); | 2673 GenInstrRegister(COP1, fmt, ft, fs, fd, MINA); |
2650 } | 2674 } |
2651 | 2675 |
2652 | 2676 |
2653 void Assembler::maxa(SecondaryField fmt, FPURegister fd, FPURegister fs, | 2677 void Assembler::maxa(SecondaryField fmt, FPURegister fd, FPURegister fs, |
2654 FPURegister ft) { | 2678 FPURegister ft) { |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2694 void Assembler::cmp(FPUCondition cond, SecondaryField fmt, | 2718 void Assembler::cmp(FPUCondition cond, SecondaryField fmt, |
2695 FPURegister fd, FPURegister fs, FPURegister ft) { | 2719 FPURegister fd, FPURegister fs, FPURegister ft) { |
2696 DCHECK(kArchVariant == kMips64r6); | 2720 DCHECK(kArchVariant == kMips64r6); |
2697 DCHECK((fmt & ~(31 << kRsShift)) == 0); | 2721 DCHECK((fmt & ~(31 << kRsShift)) == 0); |
2698 Instr instr = COP1 | fmt | ft.code() << kFtShift | | 2722 Instr instr = COP1 | fmt | ft.code() << kFtShift | |
2699 fs.code() << kFsShift | fd.code() << kFdShift | (0 << 5) | cond; | 2723 fs.code() << kFsShift | fd.code() << kFdShift | (0 << 5) | cond; |
2700 emit(instr); | 2724 emit(instr); |
2701 } | 2725 } |
2702 | 2726 |
2703 | 2727 |
| 2728 void Assembler::cmp_s(FPUCondition cond, FPURegister fd, FPURegister fs, |
| 2729 FPURegister ft) { |
| 2730 cmp(cond, W, fd, fs, ft); |
| 2731 } |
| 2732 |
| 2733 void Assembler::cmp_d(FPUCondition cond, FPURegister fd, FPURegister fs, |
| 2734 FPURegister ft) { |
| 2735 cmp(cond, L, fd, fs, ft); |
| 2736 } |
| 2737 |
| 2738 |
2704 void Assembler::bc1eqz(int16_t offset, FPURegister ft) { | 2739 void Assembler::bc1eqz(int16_t offset, FPURegister ft) { |
2705 DCHECK(kArchVariant == kMips64r6); | 2740 DCHECK(kArchVariant == kMips64r6); |
2706 Instr instr = COP1 | BC1EQZ | ft.code() << kFtShift | (offset & kImm16Mask); | 2741 Instr instr = COP1 | BC1EQZ | ft.code() << kFtShift | (offset & kImm16Mask); |
2707 emit(instr); | 2742 emit(instr); |
2708 } | 2743 } |
2709 | 2744 |
2710 | 2745 |
2711 void Assembler::bc1nez(int16_t offset, FPURegister ft) { | 2746 void Assembler::bc1nez(int16_t offset, FPURegister ft) { |
2712 DCHECK(kArchVariant == kMips64r6); | 2747 DCHECK(kArchVariant == kMips64r6); |
2713 Instr instr = COP1 | BC1NEZ | ft.code() << kFtShift | (offset & kImm16Mask); | 2748 Instr instr = COP1 | BC1NEZ | ft.code() << kFtShift | (offset & kImm16Mask); |
2714 emit(instr); | 2749 emit(instr); |
2715 } | 2750 } |
2716 | 2751 |
2717 | 2752 |
2718 // Conditions for < MIPSr6. | 2753 // Conditions for < MIPSr6. |
2719 void Assembler::c(FPUCondition cond, SecondaryField fmt, | 2754 void Assembler::c(FPUCondition cond, SecondaryField fmt, |
2720 FPURegister fs, FPURegister ft, uint16_t cc) { | 2755 FPURegister fs, FPURegister ft, uint16_t cc) { |
2721 DCHECK(kArchVariant != kMips64r6); | 2756 DCHECK(kArchVariant != kMips64r6); |
2722 DCHECK(is_uint3(cc)); | 2757 DCHECK(is_uint3(cc)); |
2723 DCHECK(fmt == S || fmt == D); | 2758 DCHECK(fmt == S || fmt == D); |
2724 DCHECK((fmt & ~(31 << kRsShift)) == 0); | 2759 DCHECK((fmt & ~(31 << kRsShift)) == 0); |
2725 Instr instr = COP1 | fmt | ft.code() << kFtShift | fs.code() << kFsShift | 2760 Instr instr = COP1 | fmt | ft.code() << kFtShift | fs.code() << kFsShift |
2726 | cc << 8 | 3 << 4 | cond; | 2761 | cc << 8 | 3 << 4 | cond; |
2727 emit(instr); | 2762 emit(instr); |
2728 } | 2763 } |
2729 | 2764 |
2730 | 2765 |
| 2766 void Assembler::c_s(FPUCondition cond, FPURegister fs, FPURegister ft, |
| 2767 uint16_t cc) { |
| 2768 c(cond, S, fs, ft, cc); |
| 2769 } |
| 2770 |
| 2771 |
| 2772 void Assembler::c_d(FPUCondition cond, FPURegister fs, FPURegister ft, |
| 2773 uint16_t cc) { |
| 2774 c(cond, D, fs, ft, cc); |
| 2775 } |
| 2776 |
| 2777 |
2731 void Assembler::fcmp(FPURegister src1, const double src2, | 2778 void Assembler::fcmp(FPURegister src1, const double src2, |
2732 FPUCondition cond) { | 2779 FPUCondition cond) { |
2733 DCHECK(src2 == 0.0); | 2780 DCHECK(src2 == 0.0); |
2734 mtc1(zero_reg, f14); | 2781 mtc1(zero_reg, f14); |
2735 cvt_d_w(f14, f14); | 2782 cvt_d_w(f14, f14); |
2736 c(cond, D, src1, f14, 0); | 2783 c(cond, D, src1, f14, 0); |
2737 } | 2784 } |
2738 | 2785 |
2739 | 2786 |
2740 void Assembler::bc1f(int16_t offset, uint16_t cc) { | 2787 void Assembler::bc1f(int16_t offset, uint16_t cc) { |
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3080 void Assembler::PopulateConstantPool(ConstantPoolArray* constant_pool) { | 3127 void Assembler::PopulateConstantPool(ConstantPoolArray* constant_pool) { |
3081 // No out-of-line constant pool support. | 3128 // No out-of-line constant pool support. |
3082 DCHECK(!FLAG_enable_ool_constant_pool); | 3129 DCHECK(!FLAG_enable_ool_constant_pool); |
3083 return; | 3130 return; |
3084 } | 3131 } |
3085 | 3132 |
3086 | 3133 |
3087 } } // namespace v8::internal | 3134 } } // namespace v8::internal |
3088 | 3135 |
3089 #endif // V8_TARGET_ARCH_MIPS64 | 3136 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |