| 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 1668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1679 | 1679 |
| 1680 | 1680 |
| 1681 void Assembler::srav(Register rd, Register rt, Register rs) { | 1681 void Assembler::srav(Register rd, Register rt, Register rs) { |
| 1682 GenInstrRegister(SPECIAL, rs, rt, rd, 0, SRAV); | 1682 GenInstrRegister(SPECIAL, rs, rt, rd, 0, SRAV); |
| 1683 } | 1683 } |
| 1684 | 1684 |
| 1685 | 1685 |
| 1686 void Assembler::rotr(Register rd, Register rt, uint16_t sa) { | 1686 void Assembler::rotr(Register rd, Register rt, uint16_t sa) { |
| 1687 // Should be called via MacroAssembler::Ror. | 1687 // Should be called via MacroAssembler::Ror. |
| 1688 DCHECK(rd.is_valid() && rt.is_valid() && is_uint5(sa)); | 1688 DCHECK(rd.is_valid() && rt.is_valid() && is_uint5(sa)); |
| 1689 DCHECK(kArchVariant == kMips64r2); | 1689 DCHECK(kArchVariant == kMips64r2 || kArchVariant == kMips64r6); |
| 1690 Instr instr = SPECIAL | (1 << kRsShift) | (rt.code() << kRtShift) | 1690 Instr instr = SPECIAL | (1 << kRsShift) | (rt.code() << kRtShift) |
| 1691 | (rd.code() << kRdShift) | (sa << kSaShift) | SRL; | 1691 | (rd.code() << kRdShift) | (sa << kSaShift) | SRL; |
| 1692 emit(instr); | 1692 emit(instr); |
| 1693 } | 1693 } |
| 1694 | 1694 |
| 1695 | 1695 |
| 1696 void Assembler::rotrv(Register rd, Register rt, Register rs) { | 1696 void Assembler::rotrv(Register rd, Register rt, Register rs) { |
| 1697 // Should be called via MacroAssembler::Ror. | 1697 // Should be called via MacroAssembler::Ror. |
| 1698 DCHECK(rd.is_valid() && rt.is_valid() && rs.is_valid() ); | 1698 DCHECK(rd.is_valid() && rt.is_valid() && rs.is_valid() ); |
| 1699 DCHECK(kArchVariant == kMips64r2); | 1699 DCHECK(kArchVariant == kMips64r2 || kArchVariant == kMips64r6); |
| 1700 Instr instr = SPECIAL | (rs.code() << kRsShift) | (rt.code() << kRtShift) | 1700 Instr instr = SPECIAL | (rs.code() << kRsShift) | (rt.code() << kRtShift) |
| 1701 | (rd.code() << kRdShift) | (1 << kSaShift) | SRLV; | 1701 | (rd.code() << kRdShift) | (1 << kSaShift) | SRLV; |
| 1702 emit(instr); | 1702 emit(instr); |
| 1703 } | 1703 } |
| 1704 | 1704 |
| 1705 | 1705 |
| 1706 void Assembler::dsll(Register rd, Register rt, uint16_t sa) { | 1706 void Assembler::dsll(Register rd, Register rt, uint16_t sa) { |
| 1707 GenInstrRegister(SPECIAL, zero_reg, rt, rd, sa, DSLL); | 1707 GenInstrRegister(SPECIAL, zero_reg, rt, rd, sa, DSLL); |
| 1708 } | 1708 } |
| 1709 | 1709 |
| (...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2133 void Assembler::maxa_s(FPURegister fd, FPURegister fs, FPURegister ft) { | 2133 void Assembler::maxa_s(FPURegister fd, FPURegister fs, FPURegister ft) { |
| 2134 maxa(S, fd, fs, ft); | 2134 maxa(S, fd, fs, ft); |
| 2135 } | 2135 } |
| 2136 | 2136 |
| 2137 | 2137 |
| 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, | |
| 2144 FPURegister ft) { | |
| 2145 DCHECK(kArchVariant == kMips64r6); | |
| 2146 DCHECK((fmt == D) || (fmt == S)); | |
| 2147 | |
| 2148 Instr instr = COP1 | fmt << kRsShift | ft.code() << kFtShift | | |
| 2149 fs.code() << kFsShift | fd.code() << kFdShift | SEL; | |
| 2150 emit(instr); | |
| 2151 } | |
| 2152 | |
| 2153 | |
| 2154 void Assembler::max(SecondaryField fmt, FPURegister fd, FPURegister fs, | 2143 void Assembler::max(SecondaryField fmt, FPURegister fd, FPURegister fs, |
| 2155 FPURegister ft) { | 2144 FPURegister ft) { |
| 2156 DCHECK(kArchVariant == kMips64r6); | 2145 DCHECK(kArchVariant == kMips64r6); |
| 2157 DCHECK((fmt == D) || (fmt == S)); | 2146 DCHECK((fmt == D) || (fmt == S)); |
| 2158 GenInstrRegister(COP1, fmt, ft, fs, fd, MAX); | 2147 GenInstrRegister(COP1, fmt, ft, fs, fd, MAX); |
| 2159 } | 2148 } |
| 2160 | 2149 |
| 2161 | 2150 |
| 2162 void Assembler::min(SecondaryField fmt, FPURegister fd, FPURegister fs, | 2151 void Assembler::min(SecondaryField fmt, FPURegister fd, FPURegister fs, |
| 2163 FPURegister ft) { | 2152 FPURegister ft) { |
| 2164 DCHECK(kArchVariant == kMips64r6); | 2153 DCHECK(kArchVariant == kMips64r6); |
| 2165 DCHECK((fmt == D) || (fmt == S)); | 2154 DCHECK((fmt == D) || (fmt == S)); |
| 2166 GenInstrRegister(COP1, fmt, ft, fs, fd, MIN); | 2155 GenInstrRegister(COP1, fmt, ft, fs, fd, MIN); |
| 2167 } | 2156 } |
| 2168 | 2157 |
| 2169 | 2158 |
| 2170 // GPR. | 2159 // GPR. |
| 2171 void Assembler::seleqz(Register rd, Register rs, Register rt) { | 2160 void Assembler::seleqz(Register rd, Register rs, Register rt) { |
| 2172 DCHECK(kArchVariant == kMips64r6); | 2161 DCHECK(kArchVariant == kMips64r6); |
| 2173 GenInstrRegister(SPECIAL, rs, rt, rd, 0, SELEQZ_S); | 2162 GenInstrRegister(SPECIAL, rs, rt, rd, 0, SELEQZ_S); |
| 2174 } | 2163 } |
| 2175 | 2164 |
| 2176 | 2165 |
| 2177 // FPR. | |
| 2178 void Assembler::seleqz(SecondaryField fmt, FPURegister fd, FPURegister fs, | |
| 2179 FPURegister ft) { | |
| 2180 DCHECK((fmt == D) || (fmt == S)); | |
| 2181 GenInstrRegister(COP1, fmt, ft, fs, fd, SELEQZ_C); | |
| 2182 } | |
| 2183 | |
| 2184 | |
| 2185 // GPR. | 2166 // GPR. |
| 2186 void Assembler::selnez(Register rd, Register rs, Register rt) { | 2167 void Assembler::selnez(Register rd, Register rs, Register rt) { |
| 2187 DCHECK(kArchVariant == kMips64r6); | 2168 DCHECK(kArchVariant == kMips64r6); |
| 2188 GenInstrRegister(SPECIAL, rs, rt, rd, 0, SELNEZ_S); | 2169 GenInstrRegister(SPECIAL, rs, rt, rd, 0, SELNEZ_S); |
| 2189 } | 2170 } |
| 2190 | 2171 |
| 2191 | 2172 |
| 2192 // FPR. | |
| 2193 void Assembler::selnez(SecondaryField fmt, FPURegister fd, FPURegister fs, | |
| 2194 FPURegister ft) { | |
| 2195 DCHECK(kArchVariant == kMips64r6); | |
| 2196 DCHECK((fmt == D) || (fmt == S)); | |
| 2197 GenInstrRegister(COP1, fmt, ft, fs, fd, SELNEZ_C); | |
| 2198 } | |
| 2199 | |
| 2200 | |
| 2201 // Bit twiddling. | 2173 // Bit twiddling. |
| 2202 void Assembler::clz(Register rd, Register rs) { | 2174 void Assembler::clz(Register rd, Register rs) { |
| 2203 if (kArchVariant != kMips64r6) { | 2175 if (kArchVariant != kMips64r6) { |
| 2204 // Clz instr requires same GPR number in 'rd' and 'rt' fields. | 2176 // Clz instr requires same GPR number in 'rd' and 'rt' fields. |
| 2205 GenInstrRegister(SPECIAL2, rs, rd, rd, 0, CLZ); | 2177 GenInstrRegister(SPECIAL2, rs, rd, rd, 0, CLZ); |
| 2206 } else { | 2178 } else { |
| 2207 GenInstrRegister(SPECIAL, rs, zero_reg, rd, 1, CLZ_R6); | 2179 GenInstrRegister(SPECIAL, rs, zero_reg, rd, 1, CLZ_R6); |
| 2208 } | 2180 } |
| 2209 } | 2181 } |
| 2210 | 2182 |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2326 | 2298 |
| 2327 void Assembler::DoubleAsTwoUInt32(double d, uint32_t* lo, uint32_t* hi) { | 2299 void Assembler::DoubleAsTwoUInt32(double d, uint32_t* lo, uint32_t* hi) { |
| 2328 uint64_t i; | 2300 uint64_t i; |
| 2329 memcpy(&i, &d, 8); | 2301 memcpy(&i, &d, 8); |
| 2330 | 2302 |
| 2331 *lo = i & 0xffffffff; | 2303 *lo = i & 0xffffffff; |
| 2332 *hi = i >> 32; | 2304 *hi = i >> 32; |
| 2333 } | 2305 } |
| 2334 | 2306 |
| 2335 | 2307 |
| 2308 void Assembler::sel(SecondaryField fmt, FPURegister fd, FPURegister fs, |
| 2309 FPURegister ft) { |
| 2310 DCHECK(kArchVariant == kMips64r6); |
| 2311 DCHECK((fmt == D) || (fmt == S)); |
| 2312 |
| 2313 GenInstrRegister(COP1, fmt, ft, fs, fd, SEL); |
| 2314 } |
| 2315 |
| 2316 |
| 2317 void Assembler::sel_s(FPURegister fd, FPURegister fs, FPURegister ft) { |
| 2318 sel(S, fd, fs, ft); |
| 2319 } |
| 2320 |
| 2321 |
| 2322 void Assembler::sel_d(FPURegister fd, FPURegister fs, FPURegister ft) { |
| 2323 sel(D, fd, fs, ft); |
| 2324 } |
| 2325 |
| 2326 |
| 2327 // FPR. |
| 2328 void Assembler::seleqz(SecondaryField fmt, FPURegister fd, FPURegister fs, |
| 2329 FPURegister ft) { |
| 2330 DCHECK((fmt == D) || (fmt == S)); |
| 2331 GenInstrRegister(COP1, fmt, ft, fs, fd, SELEQZ_C); |
| 2332 } |
| 2333 |
| 2334 |
| 2335 void Assembler::seleqz_d(FPURegister fd, FPURegister fs, FPURegister ft) { |
| 2336 seleqz(D, fd, fs, ft); |
| 2337 } |
| 2338 |
| 2339 |
| 2340 void Assembler::seleqz_s(FPURegister fd, FPURegister fs, FPURegister ft) { |
| 2341 seleqz(S, fd, fs, ft); |
| 2342 } |
| 2343 |
| 2344 |
| 2345 void Assembler::selnez_d(FPURegister fd, FPURegister fs, FPURegister ft) { |
| 2346 selnez(D, fd, fs, ft); |
| 2347 } |
| 2348 |
| 2349 |
| 2350 void Assembler::selnez_s(FPURegister fd, FPURegister fs, FPURegister ft) { |
| 2351 selnez(S, fd, fs, ft); |
| 2352 } |
| 2353 |
| 2354 |
| 2355 void Assembler::movz_s(FPURegister fd, FPURegister fs, Register rt) { |
| 2356 DCHECK(kArchVariant == kMips64r2); |
| 2357 GenInstrRegister(COP1, S, rt, fs, fd, MOVZ_C); |
| 2358 } |
| 2359 |
| 2360 |
| 2361 void Assembler::movz_d(FPURegister fd, FPURegister fs, Register rt) { |
| 2362 DCHECK(kArchVariant == kMips64r2); |
| 2363 GenInstrRegister(COP1, D, rt, fs, fd, MOVZ_C); |
| 2364 } |
| 2365 |
| 2366 |
| 2367 void Assembler::movt_s(FPURegister fd, FPURegister fs, uint16_t cc) { |
| 2368 DCHECK(kArchVariant == kMips64r2); |
| 2369 FPURegister ft; |
| 2370 ft.code_ = (cc & 0x0007) << 2 | 1; |
| 2371 GenInstrRegister(COP1, S, ft, fs, fd, MOVF); |
| 2372 } |
| 2373 |
| 2374 |
| 2375 void Assembler::movt_d(FPURegister fd, FPURegister fs, uint16_t cc) { |
| 2376 DCHECK(kArchVariant == kMips64r2); |
| 2377 FPURegister ft; |
| 2378 ft.code_ = (cc & 0x0007) << 2 | 1; |
| 2379 GenInstrRegister(COP1, D, ft, fs, fd, MOVF); |
| 2380 } |
| 2381 |
| 2382 |
| 2383 void Assembler::movf_s(FPURegister fd, FPURegister fs, uint16_t cc) { |
| 2384 DCHECK(kArchVariant == kMips64r2); |
| 2385 FPURegister ft; |
| 2386 ft.code_ = (cc & 0x0007) << 2 | 0; |
| 2387 GenInstrRegister(COP1, S, ft, fs, fd, MOVF); |
| 2388 } |
| 2389 |
| 2390 |
| 2391 void Assembler::movf_d(FPURegister fd, FPURegister fs, uint16_t cc) { |
| 2392 DCHECK(kArchVariant == kMips64r2); |
| 2393 FPURegister ft; |
| 2394 ft.code_ = (cc & 0x0007) << 2 | 0; |
| 2395 GenInstrRegister(COP1, D, ft, fs, fd, MOVF); |
| 2396 } |
| 2397 |
| 2398 |
| 2399 void Assembler::movn_s(FPURegister fd, FPURegister fs, Register rt) { |
| 2400 DCHECK(kArchVariant == kMips64r2); |
| 2401 GenInstrRegister(COP1, S, rt, fs, fd, MOVN_C); |
| 2402 } |
| 2403 |
| 2404 |
| 2405 void Assembler::movn_d(FPURegister fd, FPURegister fs, Register rt) { |
| 2406 DCHECK(kArchVariant == kMips64r2); |
| 2407 GenInstrRegister(COP1, D, rt, fs, fd, MOVN_C); |
| 2408 } |
| 2409 |
| 2410 |
| 2411 // FPR. |
| 2412 void Assembler::selnez(SecondaryField fmt, FPURegister fd, FPURegister fs, |
| 2413 FPURegister ft) { |
| 2414 DCHECK(kArchVariant == kMips64r6); |
| 2415 DCHECK((fmt == D) || (fmt == S)); |
| 2416 GenInstrRegister(COP1, fmt, ft, fs, fd, SELNEZ_C); |
| 2417 } |
| 2418 |
| 2419 |
| 2336 // Arithmetic. | 2420 // Arithmetic. |
| 2337 | 2421 |
| 2338 void Assembler::add_s(FPURegister fd, FPURegister fs, FPURegister ft) { | 2422 void Assembler::add_s(FPURegister fd, FPURegister fs, FPURegister ft) { |
| 2339 GenInstrRegister(COP1, S, ft, fs, fd, ADD_D); | 2423 GenInstrRegister(COP1, S, ft, fs, fd, ADD_D); |
| 2340 } | 2424 } |
| 2341 | 2425 |
| 2342 | 2426 |
| 2343 void Assembler::add_d(FPURegister fd, FPURegister fs, FPURegister ft) { | 2427 void Assembler::add_d(FPURegister fd, FPURegister fs, FPURegister ft) { |
| 2344 GenInstrRegister(COP1, D, ft, fs, fd, ADD_D); | 2428 GenInstrRegister(COP1, D, ft, fs, fd, ADD_D); |
| 2345 } | 2429 } |
| (...skipping 43 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_S); |
| 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_D); |
| 2520 } |
| 2521 |
| 2522 |
| 2523 void Assembler::recip_s(FPURegister fd, FPURegister fs) { |
| 2524 GenInstrRegister(COP1, S, f0, fs, fd, RECIP_S); |
| 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 || kArchVariant == kMips64r6); |
| 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) { |
| 2490 DCHECK(kArchVariant == kMips64r2); | 2598 DCHECK(kArchVariant == kMips64r2 || kArchVariant == kMips64r6); |
| 2491 GenInstrRegister(COP1, D, f0, fs, fd, CVT_L_D); | 2599 GenInstrRegister(COP1, D, f0, fs, fd, CVT_L_D); |
| 2492 } | 2600 } |
| 2493 | 2601 |
| 2494 | 2602 |
| 2495 void Assembler::trunc_l_s(FPURegister fd, FPURegister fs) { | 2603 void Assembler::trunc_l_s(FPURegister fd, FPURegister fs) { |
| 2496 DCHECK(kArchVariant == kMips64r2); | 2604 DCHECK(kArchVariant == kMips64r2 || kArchVariant == kMips64r6); |
| 2497 GenInstrRegister(COP1, S, f0, fs, fd, TRUNC_L_S); | 2605 GenInstrRegister(COP1, S, f0, fs, fd, TRUNC_L_S); |
| 2498 } | 2606 } |
| 2499 | 2607 |
| 2500 | 2608 |
| 2501 void Assembler::trunc_l_d(FPURegister fd, FPURegister fs) { | 2609 void Assembler::trunc_l_d(FPURegister fd, FPURegister fs) { |
| 2502 DCHECK(kArchVariant == kMips64r2); | 2610 DCHECK(kArchVariant == kMips64r2 || kArchVariant == kMips64r6); |
| 2503 GenInstrRegister(COP1, D, f0, fs, fd, TRUNC_L_D); | 2611 GenInstrRegister(COP1, D, f0, fs, fd, TRUNC_L_D); |
| 2504 } | 2612 } |
| 2505 | 2613 |
| 2506 | 2614 |
| 2507 void Assembler::round_l_s(FPURegister fd, FPURegister fs) { | 2615 void Assembler::round_l_s(FPURegister fd, FPURegister fs) { |
| 2508 GenInstrRegister(COP1, S, f0, fs, fd, ROUND_L_S); | 2616 GenInstrRegister(COP1, S, f0, fs, fd, ROUND_L_S); |
| 2509 } | 2617 } |
| 2510 | 2618 |
| 2511 | 2619 |
| 2512 void Assembler::round_l_d(FPURegister fd, FPURegister fs) { | 2620 void Assembler::round_l_d(FPURegister fd, FPURegister fs) { |
| (...skipping 14 matching lines...) Expand all 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 |
| 2557 | 2665 |
| 2558 void Assembler::cvt_s_l(FPURegister fd, FPURegister fs) { | 2666 void Assembler::cvt_s_l(FPURegister fd, FPURegister fs) { |
| 2559 DCHECK(kArchVariant == kMips64r2); | 2667 DCHECK(kArchVariant == kMips64r2 || kArchVariant == kMips64r6); |
| 2560 GenInstrRegister(COP1, L, f0, fs, fd, CVT_S_L); | 2668 GenInstrRegister(COP1, L, f0, fs, fd, CVT_S_L); |
| 2561 } | 2669 } |
| 2562 | 2670 |
| 2563 | 2671 |
| 2564 void Assembler::cvt_s_d(FPURegister fd, FPURegister fs) { | 2672 void Assembler::cvt_s_d(FPURegister fd, FPURegister fs) { |
| 2565 GenInstrRegister(COP1, D, f0, fs, fd, CVT_S_D); | 2673 GenInstrRegister(COP1, D, f0, fs, fd, CVT_S_D); |
| 2566 } | 2674 } |
| 2567 | 2675 |
| 2568 | 2676 |
| 2569 void Assembler::cvt_d_w(FPURegister fd, FPURegister fs) { | 2677 void Assembler::cvt_d_w(FPURegister fd, FPURegister fs) { |
| 2570 GenInstrRegister(COP1, W, f0, fs, fd, CVT_D_W); | 2678 GenInstrRegister(COP1, W, f0, fs, fd, CVT_D_W); |
| 2571 } | 2679 } |
| 2572 | 2680 |
| 2573 | 2681 |
| 2574 void Assembler::cvt_d_l(FPURegister fd, FPURegister fs) { | 2682 void Assembler::cvt_d_l(FPURegister fd, FPURegister fs) { |
| 2575 DCHECK(kArchVariant == kMips64r2); | 2683 DCHECK(kArchVariant == kMips64r2 || kArchVariant == kMips64r6); |
| 2576 GenInstrRegister(COP1, L, f0, fs, fd, CVT_D_L); | 2684 GenInstrRegister(COP1, L, f0, fs, fd, CVT_D_L); |
| 2577 } | 2685 } |
| 2578 | 2686 |
| 2579 | 2687 |
| 2580 void Assembler::cvt_d_s(FPURegister fd, FPURegister fs) { | 2688 void Assembler::cvt_d_s(FPURegister fd, FPURegister fs) { |
| 2581 GenInstrRegister(COP1, S, f0, fs, fd, CVT_D_S); | 2689 GenInstrRegister(COP1, S, f0, fs, fd, CVT_D_S); |
| 2582 } | 2690 } |
| 2583 | 2691 |
| 2584 | 2692 |
| 2585 // Conditions for >= MIPSr6. | 2693 // Conditions for >= MIPSr6. |
| (...skipping 19 matching lines...) Expand all Loading... |
| 2605 Instr instr = COP1 | BC1NEZ | ft.code() << kFtShift | (offset & kImm16Mask); | 2713 Instr instr = COP1 | BC1NEZ | ft.code() << kFtShift | (offset & kImm16Mask); |
| 2606 emit(instr); | 2714 emit(instr); |
| 2607 } | 2715 } |
| 2608 | 2716 |
| 2609 | 2717 |
| 2610 // Conditions for < MIPSr6. | 2718 // Conditions for < MIPSr6. |
| 2611 void Assembler::c(FPUCondition cond, SecondaryField fmt, | 2719 void Assembler::c(FPUCondition cond, SecondaryField fmt, |
| 2612 FPURegister fs, FPURegister ft, uint16_t cc) { | 2720 FPURegister fs, FPURegister ft, uint16_t cc) { |
| 2613 DCHECK(kArchVariant != kMips64r6); | 2721 DCHECK(kArchVariant != kMips64r6); |
| 2614 DCHECK(is_uint3(cc)); | 2722 DCHECK(is_uint3(cc)); |
| 2723 DCHECK(fmt == S || fmt == D); |
| 2615 DCHECK((fmt & ~(31 << kRsShift)) == 0); | 2724 DCHECK((fmt & ~(31 << kRsShift)) == 0); |
| 2616 Instr instr = COP1 | fmt | ft.code() << kFtShift | fs.code() << kFsShift | 2725 Instr instr = COP1 | fmt | ft.code() << kFtShift | fs.code() << kFsShift |
| 2617 | cc << 8 | 3 << 4 | cond; | 2726 | cc << 8 | 3 << 4 | cond; |
| 2618 emit(instr); | 2727 emit(instr); |
| 2619 } | 2728 } |
| 2620 | 2729 |
| 2621 | 2730 |
| 2622 void Assembler::fcmp(FPURegister src1, const double src2, | 2731 void Assembler::fcmp(FPURegister src1, const double src2, |
| 2623 FPUCondition cond) { | 2732 FPUCondition cond) { |
| 2624 DCHECK(src2 == 0.0); | 2733 DCHECK(src2 == 0.0); |
| (...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2971 void Assembler::PopulateConstantPool(ConstantPoolArray* constant_pool) { | 3080 void Assembler::PopulateConstantPool(ConstantPoolArray* constant_pool) { |
| 2972 // No out-of-line constant pool support. | 3081 // No out-of-line constant pool support. |
| 2973 DCHECK(!FLAG_enable_ool_constant_pool); | 3082 DCHECK(!FLAG_enable_ool_constant_pool); |
| 2974 return; | 3083 return; |
| 2975 } | 3084 } |
| 2976 | 3085 |
| 2977 | 3086 |
| 2978 } } // namespace v8::internal | 3087 } } // namespace v8::internal |
| 2979 | 3088 |
| 2980 #endif // V8_TARGET_ARCH_MIPS64 | 3089 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |