| 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 2127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2138 void Assembler::maxa_d(FPURegister fd, FPURegister fs, FPURegister ft) { | 2138 void Assembler::maxa_d(FPURegister fd, FPURegister fs, FPURegister ft) { |
| 2139 maxa(D, fd, fs, ft); | 2139 maxa(D, fd, fs, ft); |
| 2140 } | 2140 } |
| 2141 | 2141 |
| 2142 | 2142 |
| 2143 void Assembler::sel(SecondaryField fmt, FPURegister fd, FPURegister fs, | 2143 void Assembler::sel(SecondaryField fmt, FPURegister fd, FPURegister fs, |
| 2144 FPURegister ft) { | 2144 FPURegister ft) { |
| 2145 DCHECK(kArchVariant == kMips64r6); | 2145 DCHECK(kArchVariant == kMips64r6); |
| 2146 DCHECK((fmt == D) || (fmt == S)); | 2146 DCHECK((fmt == D) || (fmt == S)); |
| 2147 | 2147 |
| 2148 Instr instr = COP1 | fmt << kRsShift | ft.code() << kFtShift | | 2148 GenInstrRegister(COP1, fmt, ft, fs, fd, SEL); |
| 2149 fs.code() << kFsShift | fd.code() << kFdShift | SEL; | |
| 2150 emit(instr); | |
| 2151 } | 2149 } |
| 2152 | 2150 |
| 2153 | 2151 |
| 2152 void Assembler::sel_s(FPURegister fd, FPURegister fs, FPURegister ft) { |
| 2153 sel(S, fd, fs, ft); |
| 2154 } |
| 2155 |
| 2156 |
| 2157 void Assembler::sel_d(FPURegister fd, FPURegister fs, FPURegister ft) { |
| 2158 sel(D, fd, fs, ft); |
| 2159 } |
| 2160 |
| 2161 |
| 2154 void Assembler::max(SecondaryField fmt, FPURegister fd, FPURegister fs, | 2162 void Assembler::max(SecondaryField fmt, FPURegister fd, FPURegister fs, |
| 2155 FPURegister ft) { | 2163 FPURegister ft) { |
| 2156 DCHECK(kArchVariant == kMips64r6); | 2164 DCHECK(kArchVariant == kMips64r6); |
| 2157 DCHECK((fmt == D) || (fmt == S)); | 2165 DCHECK((fmt == D) || (fmt == S)); |
| 2158 GenInstrRegister(COP1, fmt, ft, fs, fd, MAX); | 2166 GenInstrRegister(COP1, fmt, ft, fs, fd, MAX); |
| 2159 } | 2167 } |
| 2160 | 2168 |
| 2161 | 2169 |
| 2162 void Assembler::min(SecondaryField fmt, FPURegister fd, FPURegister fs, | 2170 void Assembler::min(SecondaryField fmt, FPURegister fd, FPURegister fs, |
| 2163 FPURegister ft) { | 2171 FPURegister ft) { |
| (...skipping 18 matching lines...) Expand all Loading... |
| 2182 } | 2190 } |
| 2183 | 2191 |
| 2184 | 2192 |
| 2185 // GPR. | 2193 // GPR. |
| 2186 void Assembler::selnez(Register rd, Register rs, Register rt) { | 2194 void Assembler::selnez(Register rd, Register rs, Register rt) { |
| 2187 DCHECK(kArchVariant == kMips64r6); | 2195 DCHECK(kArchVariant == kMips64r6); |
| 2188 GenInstrRegister(SPECIAL, rs, rt, rd, 0, SELNEZ_S); | 2196 GenInstrRegister(SPECIAL, rs, rt, rd, 0, SELNEZ_S); |
| 2189 } | 2197 } |
| 2190 | 2198 |
| 2191 | 2199 |
| 2200 void Assembler::seleqz_d(FPURegister fd, FPURegister fs, FPURegister ft) { |
| 2201 seleqz(D, fd, fs, ft); |
| 2202 } |
| 2203 |
| 2204 |
| 2205 void Assembler::seleqz_s(FPURegister fd, FPURegister fs, FPURegister ft) { |
| 2206 seleqz(S, fd, fs, ft); |
| 2207 } |
| 2208 |
| 2209 |
| 2210 void Assembler::selnez_d(FPURegister fd, FPURegister fs, FPURegister ft) { |
| 2211 selnez(D, fd, fs, ft); |
| 2212 } |
| 2213 |
| 2214 |
| 2215 void Assembler::selnez_s(FPURegister fd, FPURegister fs, FPURegister ft) { |
| 2216 selnez(S, fd, fs, ft); |
| 2217 } |
| 2218 |
| 2219 |
| 2220 void Assembler::movz_s(FPURegister fd, FPURegister fs, Register rt) { |
| 2221 DCHECK(kArchVariant == kMips64r2); |
| 2222 GenInstrRegister(COP1, S, rt, fs, fd, MOVZ_C); |
| 2223 } |
| 2224 |
| 2225 |
| 2226 void Assembler::movz_d(FPURegister fd, FPURegister fs, Register rt) { |
| 2227 DCHECK(kArchVariant == kMips64r2); |
| 2228 GenInstrRegister(COP1, D, rt, fs, fd, MOVZ_C); |
| 2229 } |
| 2230 |
| 2231 |
| 2232 void Assembler::movt_s(FPURegister fd, FPURegister fs, uint16_t cc) { |
| 2233 DCHECK(kArchVariant == kMips64r2); |
| 2234 FPURegister ft; |
| 2235 ft.code_ = (cc & 0x0007) << 2 | 1; |
| 2236 GenInstrRegister(COP1, S, ft, fs, fd, MOVF); |
| 2237 } |
| 2238 |
| 2239 |
| 2240 void Assembler::movt_d(FPURegister fd, FPURegister fs, uint16_t cc) { |
| 2241 DCHECK(kArchVariant == kMips64r2); |
| 2242 FPURegister ft; |
| 2243 ft.code_ = (cc & 0x0007) << 2 | 1; |
| 2244 GenInstrRegister(COP1, D, ft, fs, fd, MOVF); |
| 2245 } |
| 2246 |
| 2247 |
| 2248 void Assembler::movf_s(FPURegister fd, FPURegister fs, uint16_t cc) { |
| 2249 DCHECK(kArchVariant == kMips64r2); |
| 2250 FPURegister ft; |
| 2251 ft.code_ = (cc & 0x0007) << 2 | 0; |
| 2252 GenInstrRegister(COP1, S, ft, fs, fd, MOVF); |
| 2253 } |
| 2254 |
| 2255 |
| 2256 void Assembler::movf_d(FPURegister fd, FPURegister fs, uint16_t cc) { |
| 2257 DCHECK(kArchVariant == kMips64r2); |
| 2258 FPURegister ft; |
| 2259 ft.code_ = (cc & 0x0007) << 2 | 0; |
| 2260 GenInstrRegister(COP1, D, ft, fs, fd, MOVF); |
| 2261 } |
| 2262 |
| 2263 |
| 2264 void Assembler::movn_s(FPURegister fd, FPURegister fs, Register rt) { |
| 2265 DCHECK(kArchVariant == kMips64r2); |
| 2266 GenInstrRegister(COP1, S, rt, fs, fd, MOVN_C); |
| 2267 } |
| 2268 |
| 2269 |
| 2270 void Assembler::movn_d(FPURegister fd, FPURegister fs, Register rt) { |
| 2271 DCHECK(kArchVariant == kMips64r2); |
| 2272 GenInstrRegister(COP1, D, rt, fs, fd, MOVN_C); |
| 2273 } |
| 2274 |
| 2275 |
| 2192 // FPR. | 2276 // FPR. |
| 2193 void Assembler::selnez(SecondaryField fmt, FPURegister fd, FPURegister fs, | 2277 void Assembler::selnez(SecondaryField fmt, FPURegister fd, FPURegister fs, |
| 2194 FPURegister ft) { | 2278 FPURegister ft) { |
| 2195 DCHECK(kArchVariant == kMips64r6); | 2279 DCHECK(kArchVariant == kMips64r6); |
| 2196 DCHECK((fmt == D) || (fmt == S)); | 2280 DCHECK((fmt == D) || (fmt == S)); |
| 2197 GenInstrRegister(COP1, fmt, ft, fs, fd, SELNEZ_C); | 2281 GenInstrRegister(COP1, fmt, ft, fs, fd, SELNEZ_C); |
| 2198 } | 2282 } |
| 2199 | 2283 |
| 2200 | 2284 |
| 2201 // Bit twiddling. | 2285 // Bit twiddling. |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2389 void Assembler::abs_d(FPURegister fd, FPURegister fs) { | 2473 void Assembler::abs_d(FPURegister fd, FPURegister fs) { |
| 2390 GenInstrRegister(COP1, D, f0, fs, fd, ABS_D); | 2474 GenInstrRegister(COP1, D, f0, fs, fd, ABS_D); |
| 2391 } | 2475 } |
| 2392 | 2476 |
| 2393 | 2477 |
| 2394 void Assembler::mov_d(FPURegister fd, FPURegister fs) { | 2478 void Assembler::mov_d(FPURegister fd, FPURegister fs) { |
| 2395 GenInstrRegister(COP1, D, f0, fs, fd, MOV_D); | 2479 GenInstrRegister(COP1, D, f0, fs, fd, MOV_D); |
| 2396 } | 2480 } |
| 2397 | 2481 |
| 2398 | 2482 |
| 2483 void Assembler::mov_s(FPURegister fd, FPURegister fs) { |
| 2484 GenInstrRegister(COP1, S, f0, fs, fd, MOV_D); |
| 2485 } |
| 2486 |
| 2487 |
| 2399 void Assembler::neg_s(FPURegister fd, FPURegister fs) { | 2488 void Assembler::neg_s(FPURegister fd, FPURegister fs) { |
| 2400 GenInstrRegister(COP1, S, f0, fs, fd, NEG_D); | 2489 GenInstrRegister(COP1, S, f0, fs, fd, NEG_D); |
| 2401 } | 2490 } |
| 2402 | 2491 |
| 2403 | 2492 |
| 2404 void Assembler::neg_d(FPURegister fd, FPURegister fs) { | 2493 void Assembler::neg_d(FPURegister fd, FPURegister fs) { |
| 2405 GenInstrRegister(COP1, D, f0, fs, fd, NEG_D); | 2494 GenInstrRegister(COP1, D, f0, fs, fd, NEG_D); |
| 2406 } | 2495 } |
| 2407 | 2496 |
| 2408 | 2497 |
| 2409 void Assembler::sqrt_s(FPURegister fd, FPURegister fs) { | 2498 void Assembler::sqrt_s(FPURegister fd, FPURegister fs) { |
| 2410 GenInstrRegister(COP1, S, f0, fs, fd, SQRT_D); | 2499 GenInstrRegister(COP1, S, f0, fs, fd, SQRT_D); |
| 2411 } | 2500 } |
| 2412 | 2501 |
| 2413 | 2502 |
| 2414 void Assembler::sqrt_d(FPURegister fd, FPURegister fs) { | 2503 void Assembler::sqrt_d(FPURegister fd, FPURegister fs) { |
| 2415 GenInstrRegister(COP1, D, f0, fs, fd, SQRT_D); | 2504 GenInstrRegister(COP1, D, f0, fs, fd, SQRT_D); |
| 2416 } | 2505 } |
| 2417 | 2506 |
| 2418 | 2507 |
| 2508 void Assembler::rsqrt_s(FPURegister fd, FPURegister fs) { |
| 2509 GenInstrRegister(COP1, S, f0, fs, fd, RSQRT_D); |
| 2510 } |
| 2511 |
| 2512 |
| 2513 void Assembler::rsqrt_d(FPURegister fd, FPURegister fs) { |
| 2514 GenInstrRegister(COP1, D, f0, fs, fd, RSQRT_D); |
| 2515 } |
| 2516 |
| 2517 |
| 2518 void Assembler::recip_d(FPURegister fd, FPURegister fs) { |
| 2519 GenInstrRegister(COP1, D, f0, fs, fd, RECIP); |
| 2520 } |
| 2521 |
| 2522 |
| 2523 void Assembler::recip_s(FPURegister fd, FPURegister fs) { |
| 2524 GenInstrRegister(COP1, S, f0, fs, fd, RECIP); |
| 2525 } |
| 2526 |
| 2527 |
| 2419 // Conversions. | 2528 // Conversions. |
| 2420 | |
| 2421 void Assembler::cvt_w_s(FPURegister fd, FPURegister fs) { | 2529 void Assembler::cvt_w_s(FPURegister fd, FPURegister fs) { |
| 2422 GenInstrRegister(COP1, S, f0, fs, fd, CVT_W_S); | 2530 GenInstrRegister(COP1, S, f0, fs, fd, CVT_W_S); |
| 2423 } | 2531 } |
| 2424 | 2532 |
| 2425 | 2533 |
| 2426 void Assembler::cvt_w_d(FPURegister fd, FPURegister fs) { | 2534 void Assembler::cvt_w_d(FPURegister fd, FPURegister fs) { |
| 2427 GenInstrRegister(COP1, D, f0, fs, fd, CVT_W_D); | 2535 GenInstrRegister(COP1, D, f0, fs, fd, CVT_W_D); |
| 2428 } | 2536 } |
| 2429 | 2537 |
| 2430 | 2538 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2469 | 2577 |
| 2470 | 2578 |
| 2471 void Assembler::rint_s(FPURegister fd, FPURegister fs) { rint(S, fd, fs); } | 2579 void Assembler::rint_s(FPURegister fd, FPURegister fs) { rint(S, fd, fs); } |
| 2472 | 2580 |
| 2473 | 2581 |
| 2474 void Assembler::rint_d(FPURegister fd, FPURegister fs) { rint(D, fd, fs); } | 2582 void Assembler::rint_d(FPURegister fd, FPURegister fs) { rint(D, fd, fs); } |
| 2475 | 2583 |
| 2476 | 2584 |
| 2477 void Assembler::rint(SecondaryField fmt, FPURegister fd, FPURegister fs) { | 2585 void Assembler::rint(SecondaryField fmt, FPURegister fd, FPURegister fs) { |
| 2478 DCHECK(kArchVariant == kMips64r6); | 2586 DCHECK(kArchVariant == kMips64r6); |
| 2479 GenInstrRegister(COP1, D, f0, fs, fd, RINT); | 2587 GenInstrRegister(COP1, fmt, f0, fs, fd, RINT); |
| 2480 } | 2588 } |
| 2481 | 2589 |
| 2482 | 2590 |
| 2483 void Assembler::cvt_l_s(FPURegister fd, FPURegister fs) { | 2591 void Assembler::cvt_l_s(FPURegister fd, FPURegister fs) { |
| 2484 DCHECK(kArchVariant == kMips64r2); | 2592 DCHECK(kArchVariant == kMips64r2); |
| 2485 GenInstrRegister(COP1, S, f0, fs, fd, CVT_L_S); | 2593 GenInstrRegister(COP1, S, f0, fs, fd, CVT_L_S); |
| 2486 } | 2594 } |
| 2487 | 2595 |
| 2488 | 2596 |
| 2489 void Assembler::cvt_l_d(FPURegister fd, FPURegister fs) { | 2597 void Assembler::cvt_l_d(FPURegister fd, FPURegister fs) { |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2527 void Assembler::ceil_l_s(FPURegister fd, FPURegister fs) { | 2635 void Assembler::ceil_l_s(FPURegister fd, FPURegister fs) { |
| 2528 GenInstrRegister(COP1, S, f0, fs, fd, CEIL_L_S); | 2636 GenInstrRegister(COP1, S, f0, fs, fd, CEIL_L_S); |
| 2529 } | 2637 } |
| 2530 | 2638 |
| 2531 | 2639 |
| 2532 void Assembler::ceil_l_d(FPURegister fd, FPURegister fs) { | 2640 void Assembler::ceil_l_d(FPURegister fd, FPURegister fs) { |
| 2533 GenInstrRegister(COP1, D, f0, fs, fd, CEIL_L_D); | 2641 GenInstrRegister(COP1, D, f0, fs, fd, CEIL_L_D); |
| 2534 } | 2642 } |
| 2535 | 2643 |
| 2536 | 2644 |
| 2537 void Assembler::mina(SecondaryField fmt, FPURegister fd, FPURegister ft, | 2645 void Assembler::mina(SecondaryField fmt, FPURegister fd, FPURegister fs, |
| 2538 FPURegister fs) { | 2646 FPURegister ft) { |
| 2539 DCHECK(kArchVariant == kMips64r6); | 2647 DCHECK(kArchVariant == kMips64r6); |
| 2540 DCHECK((fmt == D) || (fmt == S)); | 2648 DCHECK((fmt == D) || (fmt == S)); |
| 2541 GenInstrRegister(COP1, fmt, ft, fs, fd, MINA); | 2649 GenInstrRegister(COP1, fmt, ft, fs, fd, MINA); |
| 2542 } | 2650 } |
| 2543 | 2651 |
| 2544 | 2652 |
| 2545 void Assembler::maxa(SecondaryField fmt, FPURegister fd, FPURegister ft, | 2653 void Assembler::maxa(SecondaryField fmt, FPURegister fd, FPURegister fs, |
| 2546 FPURegister fs) { | 2654 FPURegister ft) { |
| 2547 DCHECK(kArchVariant == kMips64r6); | 2655 DCHECK(kArchVariant == kMips64r6); |
| 2548 DCHECK((fmt == D) || (fmt == S)); | 2656 DCHECK((fmt == D) || (fmt == S)); |
| 2549 GenInstrRegister(COP1, fmt, ft, fs, fd, MAXA); | 2657 GenInstrRegister(COP1, fmt, ft, fs, fd, MAXA); |
| 2550 } | 2658 } |
| 2551 | 2659 |
| 2552 | 2660 |
| 2553 void Assembler::cvt_s_w(FPURegister fd, FPURegister fs) { | 2661 void Assembler::cvt_s_w(FPURegister fd, FPURegister fs) { |
| 2554 GenInstrRegister(COP1, W, f0, fs, fd, CVT_S_W); | 2662 GenInstrRegister(COP1, W, f0, fs, fd, CVT_S_W); |
| 2555 } | 2663 } |
| 2556 | 2664 |
| (...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2971 void Assembler::PopulateConstantPool(ConstantPoolArray* constant_pool) { | 3079 void Assembler::PopulateConstantPool(ConstantPoolArray* constant_pool) { |
| 2972 // No out-of-line constant pool support. | 3080 // No out-of-line constant pool support. |
| 2973 DCHECK(!FLAG_enable_ool_constant_pool); | 3081 DCHECK(!FLAG_enable_ool_constant_pool); |
| 2974 return; | 3082 return; |
| 2975 } | 3083 } |
| 2976 | 3084 |
| 2977 | 3085 |
| 2978 } } // namespace v8::internal | 3086 } } // namespace v8::internal |
| 2979 | 3087 |
| 2980 #endif // V8_TARGET_ARCH_MIPS64 | 3088 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |