| 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 |
| 2154 void Assembler::max(SecondaryField fmt, FPURegister fd, FPURegister fs, | 2152 void Assembler::max(SecondaryField fmt, FPURegister fd, FPURegister fs, |
| 2155 FPURegister ft) { | 2153 FPURegister ft) { |
| 2156 DCHECK(kArchVariant == kMips64r6); | 2154 DCHECK(kArchVariant == kMips64r6); |
| 2157 DCHECK((fmt == D) || (fmt == S)); | 2155 DCHECK((fmt == D) || (fmt == S)); |
| 2158 GenInstrRegister(COP1, fmt, ft, fs, fd, MAX); | 2156 GenInstrRegister(COP1, fmt, ft, fs, fd, MAX); |
| 2159 } | 2157 } |
| 2160 | 2158 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 2182 } | 2180 } |
| 2183 | 2181 |
| 2184 | 2182 |
| 2185 // GPR. | 2183 // GPR. |
| 2186 void Assembler::selnez(Register rd, Register rs, Register rt) { | 2184 void Assembler::selnez(Register rd, Register rs, Register rt) { |
| 2187 DCHECK(kArchVariant == kMips64r6); | 2185 DCHECK(kArchVariant == kMips64r6); |
| 2188 GenInstrRegister(SPECIAL, rs, rt, rd, 0, SELNEZ_S); | 2186 GenInstrRegister(SPECIAL, rs, rt, rd, 0, SELNEZ_S); |
| 2189 } | 2187 } |
| 2190 | 2188 |
| 2191 | 2189 |
| 2190 void Assembler::movz_s(FPURegister fd, FPURegister fs, Register rt) { |
| 2191 DCHECK(kArchVariant == kMips64r2); |
| 2192 GenInstrRegister(COP1, S, rt, fs, fd, MOVZ_C); |
| 2193 } |
| 2194 |
| 2195 |
| 2196 void Assembler::movz_d(FPURegister fd, FPURegister fs, Register rt) { |
| 2197 DCHECK(kArchVariant == kMips64r2); |
| 2198 GenInstrRegister(COP1, D, rt, fs, fd, MOVZ_C); |
| 2199 } |
| 2200 |
| 2201 |
| 2202 void Assembler::movt_s(FPURegister fd, FPURegister fs, uint16_t cc) { |
| 2203 DCHECK(kArchVariant == kMips64r2); |
| 2204 FPURegister ft; |
| 2205 ft.code_ = (cc & 0x0007) << 2 | 1; |
| 2206 GenInstrRegister(COP1, S, ft, fs, fd, MOVF); |
| 2207 } |
| 2208 |
| 2209 |
| 2210 void Assembler::movt_d(FPURegister fd, FPURegister fs, uint16_t cc) { |
| 2211 DCHECK(kArchVariant == kMips64r2); |
| 2212 FPURegister ft; |
| 2213 ft.code_ = (cc & 0x0007) << 2 | 1; |
| 2214 GenInstrRegister(COP1, D, ft, fs, fd, MOVF); |
| 2215 } |
| 2216 |
| 2217 |
| 2218 void Assembler::movf_s(FPURegister fd, FPURegister fs, uint16_t cc) { |
| 2219 DCHECK(kArchVariant == kMips64r2); |
| 2220 FPURegister ft; |
| 2221 ft.code_ = (cc & 0x0007) << 2 | 0; |
| 2222 GenInstrRegister(COP1, S, ft, fs, fd, MOVF); |
| 2223 } |
| 2224 |
| 2225 |
| 2226 void Assembler::movf_d(FPURegister fd, FPURegister fs, uint16_t cc) { |
| 2227 DCHECK(kArchVariant == kMips64r2); |
| 2228 FPURegister ft; |
| 2229 ft.code_ = (cc & 0x0007) << 2 | 0; |
| 2230 GenInstrRegister(COP1, D, ft, fs, fd, MOVF); |
| 2231 } |
| 2232 |
| 2233 |
| 2234 void Assembler::movn_s(FPURegister fd, FPURegister fs, Register rt) { |
| 2235 DCHECK(kArchVariant == kMips64r2); |
| 2236 GenInstrRegister(COP1, S, rt, fs, fd, MOVN_C); |
| 2237 } |
| 2238 |
| 2239 |
| 2240 void Assembler::movn_d(FPURegister fd, FPURegister fs, Register rt) { |
| 2241 DCHECK(kArchVariant == kMips64r2); |
| 2242 GenInstrRegister(COP1, D, rt, fs, fd, MOVN_C); |
| 2243 } |
| 2244 |
| 2245 |
| 2192 // FPR. | 2246 // FPR. |
| 2193 void Assembler::selnez(SecondaryField fmt, FPURegister fd, FPURegister fs, | 2247 void Assembler::selnez(SecondaryField fmt, FPURegister fd, FPURegister fs, |
| 2194 FPURegister ft) { | 2248 FPURegister ft) { |
| 2195 DCHECK(kArchVariant == kMips64r6); | 2249 DCHECK(kArchVariant == kMips64r6); |
| 2196 DCHECK((fmt == D) || (fmt == S)); | 2250 DCHECK((fmt == D) || (fmt == S)); |
| 2197 GenInstrRegister(COP1, fmt, ft, fs, fd, SELNEZ_C); | 2251 GenInstrRegister(COP1, fmt, ft, fs, fd, SELNEZ_C); |
| 2198 } | 2252 } |
| 2199 | 2253 |
| 2200 | 2254 |
| 2201 // Bit twiddling. | 2255 // Bit twiddling. |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2389 void Assembler::abs_d(FPURegister fd, FPURegister fs) { | 2443 void Assembler::abs_d(FPURegister fd, FPURegister fs) { |
| 2390 GenInstrRegister(COP1, D, f0, fs, fd, ABS_D); | 2444 GenInstrRegister(COP1, D, f0, fs, fd, ABS_D); |
| 2391 } | 2445 } |
| 2392 | 2446 |
| 2393 | 2447 |
| 2394 void Assembler::mov_d(FPURegister fd, FPURegister fs) { | 2448 void Assembler::mov_d(FPURegister fd, FPURegister fs) { |
| 2395 GenInstrRegister(COP1, D, f0, fs, fd, MOV_D); | 2449 GenInstrRegister(COP1, D, f0, fs, fd, MOV_D); |
| 2396 } | 2450 } |
| 2397 | 2451 |
| 2398 | 2452 |
| 2453 void Assembler::mov_s(FPURegister fd, FPURegister fs) { |
| 2454 GenInstrRegister(COP1, S, f0, fs, fd, MOV_D); |
| 2455 } |
| 2456 |
| 2457 |
| 2399 void Assembler::neg_s(FPURegister fd, FPURegister fs) { | 2458 void Assembler::neg_s(FPURegister fd, FPURegister fs) { |
| 2400 GenInstrRegister(COP1, S, f0, fs, fd, NEG_D); | 2459 GenInstrRegister(COP1, S, f0, fs, fd, NEG_D); |
| 2401 } | 2460 } |
| 2402 | 2461 |
| 2403 | 2462 |
| 2404 void Assembler::neg_d(FPURegister fd, FPURegister fs) { | 2463 void Assembler::neg_d(FPURegister fd, FPURegister fs) { |
| 2405 GenInstrRegister(COP1, D, f0, fs, fd, NEG_D); | 2464 GenInstrRegister(COP1, D, f0, fs, fd, NEG_D); |
| 2406 } | 2465 } |
| 2407 | 2466 |
| 2408 | 2467 |
| 2409 void Assembler::sqrt_s(FPURegister fd, FPURegister fs) { | 2468 void Assembler::sqrt_s(FPURegister fd, FPURegister fs) { |
| 2410 GenInstrRegister(COP1, S, f0, fs, fd, SQRT_D); | 2469 GenInstrRegister(COP1, S, f0, fs, fd, SQRT_D); |
| 2411 } | 2470 } |
| 2412 | 2471 |
| 2413 | 2472 |
| 2414 void Assembler::sqrt_d(FPURegister fd, FPURegister fs) { | 2473 void Assembler::sqrt_d(FPURegister fd, FPURegister fs) { |
| 2415 GenInstrRegister(COP1, D, f0, fs, fd, SQRT_D); | 2474 GenInstrRegister(COP1, D, f0, fs, fd, SQRT_D); |
| 2416 } | 2475 } |
| 2417 | 2476 |
| 2418 | 2477 |
| 2478 void Assembler::rsqrt_s(FPURegister fd, FPURegister fs) { |
| 2479 GenInstrRegister(COP1, S, f0, fs, fd, RSQRT_D); |
| 2480 } |
| 2481 |
| 2482 |
| 2483 void Assembler::rsqrt_d(FPURegister fd, FPURegister fs) { |
| 2484 GenInstrRegister(COP1, D, f0, fs, fd, RSQRT_D); |
| 2485 } |
| 2486 |
| 2487 |
| 2488 void Assembler::recip_d(FPURegister fd, FPURegister fs) { |
| 2489 GenInstrRegister(COP1, D, f0, fs, fd, RECIP); |
| 2490 } |
| 2491 |
| 2492 |
| 2493 void Assembler::recip_s(FPURegister fd, FPURegister fs) { |
| 2494 GenInstrRegister(COP1, S, f0, fs, fd, RECIP); |
| 2495 } |
| 2496 |
| 2497 |
| 2419 // Conversions. | 2498 // Conversions. |
| 2420 | |
| 2421 void Assembler::cvt_w_s(FPURegister fd, FPURegister fs) { | 2499 void Assembler::cvt_w_s(FPURegister fd, FPURegister fs) { |
| 2422 GenInstrRegister(COP1, S, f0, fs, fd, CVT_W_S); | 2500 GenInstrRegister(COP1, S, f0, fs, fd, CVT_W_S); |
| 2423 } | 2501 } |
| 2424 | 2502 |
| 2425 | 2503 |
| 2426 void Assembler::cvt_w_d(FPURegister fd, FPURegister fs) { | 2504 void Assembler::cvt_w_d(FPURegister fd, FPURegister fs) { |
| 2427 GenInstrRegister(COP1, D, f0, fs, fd, CVT_W_D); | 2505 GenInstrRegister(COP1, D, f0, fs, fd, CVT_W_D); |
| 2428 } | 2506 } |
| 2429 | 2507 |
| 2430 | 2508 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2469 | 2547 |
| 2470 | 2548 |
| 2471 void Assembler::rint_s(FPURegister fd, FPURegister fs) { rint(S, fd, fs); } | 2549 void Assembler::rint_s(FPURegister fd, FPURegister fs) { rint(S, fd, fs); } |
| 2472 | 2550 |
| 2473 | 2551 |
| 2474 void Assembler::rint_d(FPURegister fd, FPURegister fs) { rint(D, fd, fs); } | 2552 void Assembler::rint_d(FPURegister fd, FPURegister fs) { rint(D, fd, fs); } |
| 2475 | 2553 |
| 2476 | 2554 |
| 2477 void Assembler::rint(SecondaryField fmt, FPURegister fd, FPURegister fs) { | 2555 void Assembler::rint(SecondaryField fmt, FPURegister fd, FPURegister fs) { |
| 2478 DCHECK(kArchVariant == kMips64r6); | 2556 DCHECK(kArchVariant == kMips64r6); |
| 2479 GenInstrRegister(COP1, D, f0, fs, fd, RINT); | 2557 GenInstrRegister(COP1, fmt, f0, fs, fd, RINT); |
| 2480 } | 2558 } |
| 2481 | 2559 |
| 2482 | 2560 |
| 2483 void Assembler::cvt_l_s(FPURegister fd, FPURegister fs) { | 2561 void Assembler::cvt_l_s(FPURegister fd, FPURegister fs) { |
| 2484 DCHECK(kArchVariant == kMips64r2); | 2562 DCHECK(kArchVariant == kMips64r2); |
| 2485 GenInstrRegister(COP1, S, f0, fs, fd, CVT_L_S); | 2563 GenInstrRegister(COP1, S, f0, fs, fd, CVT_L_S); |
| 2486 } | 2564 } |
| 2487 | 2565 |
| 2488 | 2566 |
| 2489 void Assembler::cvt_l_d(FPURegister fd, FPURegister fs) { | 2567 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) { | 2605 void Assembler::ceil_l_s(FPURegister fd, FPURegister fs) { |
| 2528 GenInstrRegister(COP1, S, f0, fs, fd, CEIL_L_S); | 2606 GenInstrRegister(COP1, S, f0, fs, fd, CEIL_L_S); |
| 2529 } | 2607 } |
| 2530 | 2608 |
| 2531 | 2609 |
| 2532 void Assembler::ceil_l_d(FPURegister fd, FPURegister fs) { | 2610 void Assembler::ceil_l_d(FPURegister fd, FPURegister fs) { |
| 2533 GenInstrRegister(COP1, D, f0, fs, fd, CEIL_L_D); | 2611 GenInstrRegister(COP1, D, f0, fs, fd, CEIL_L_D); |
| 2534 } | 2612 } |
| 2535 | 2613 |
| 2536 | 2614 |
| 2537 void Assembler::mina(SecondaryField fmt, FPURegister fd, FPURegister ft, | 2615 void Assembler::mina(SecondaryField fmt, FPURegister fd, FPURegister fs, |
| 2538 FPURegister fs) { | 2616 FPURegister ft) { |
| 2539 DCHECK(kArchVariant == kMips64r6); | 2617 DCHECK(kArchVariant == kMips64r6); |
| 2540 DCHECK((fmt == D) || (fmt == S)); | 2618 DCHECK((fmt == D) || (fmt == S)); |
| 2541 GenInstrRegister(COP1, fmt, ft, fs, fd, MINA); | 2619 GenInstrRegister(COP1, fmt, ft, fs, fd, MINA); |
| 2542 } | 2620 } |
| 2543 | 2621 |
| 2544 | 2622 |
| 2545 void Assembler::maxa(SecondaryField fmt, FPURegister fd, FPURegister ft, | 2623 void Assembler::maxa(SecondaryField fmt, FPURegister fd, FPURegister fs, |
| 2546 FPURegister fs) { | 2624 FPURegister ft) { |
| 2547 DCHECK(kArchVariant == kMips64r6); | 2625 DCHECK(kArchVariant == kMips64r6); |
| 2548 DCHECK((fmt == D) || (fmt == S)); | 2626 DCHECK((fmt == D) || (fmt == S)); |
| 2549 GenInstrRegister(COP1, fmt, ft, fs, fd, MAXA); | 2627 GenInstrRegister(COP1, fmt, ft, fs, fd, MAXA); |
| 2550 } | 2628 } |
| 2551 | 2629 |
| 2552 | 2630 |
| 2553 void Assembler::cvt_s_w(FPURegister fd, FPURegister fs) { | 2631 void Assembler::cvt_s_w(FPURegister fd, FPURegister fs) { |
| 2554 GenInstrRegister(COP1, W, f0, fs, fd, CVT_S_W); | 2632 GenInstrRegister(COP1, W, f0, fs, fd, CVT_S_W); |
| 2555 } | 2633 } |
| 2556 | 2634 |
| (...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2971 void Assembler::PopulateConstantPool(ConstantPoolArray* constant_pool) { | 3049 void Assembler::PopulateConstantPool(ConstantPoolArray* constant_pool) { |
| 2972 // No out-of-line constant pool support. | 3050 // No out-of-line constant pool support. |
| 2973 DCHECK(!FLAG_enable_ool_constant_pool); | 3051 DCHECK(!FLAG_enable_ool_constant_pool); |
| 2974 return; | 3052 return; |
| 2975 } | 3053 } |
| 2976 | 3054 |
| 2977 | 3055 |
| 2978 } } // namespace v8::internal | 3056 } } // namespace v8::internal |
| 2979 | 3057 |
| 2980 #endif // V8_TARGET_ARCH_MIPS64 | 3058 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |