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 1902 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1913 } | 1913 } |
1914 | 1914 |
1915 | 1915 |
1916 void Assembler::movf(Register rd, Register rs, uint16_t cc) { | 1916 void Assembler::movf(Register rd, Register rs, uint16_t cc) { |
1917 Register rt; | 1917 Register rt; |
1918 rt.code_ = (cc & 0x0007) << 2 | 0; | 1918 rt.code_ = (cc & 0x0007) << 2 | 0; |
1919 GenInstrRegister(SPECIAL, rs, rt, rd, 0, MOVCI); | 1919 GenInstrRegister(SPECIAL, rs, rt, rd, 0, MOVCI); |
1920 } | 1920 } |
1921 | 1921 |
1922 | 1922 |
1923 void Assembler::seleqz(Register rs, Register rt, Register rd) { | 1923 void Assembler::sel(SecondaryField fmt, FPURegister fd, FPURegister fs, |
1924 FPURegister ft) { | |
1925 DCHECK(kArchVariant == kMips64r6); | |
paul.l...
2015/04/03 17:56:17
Should be kMips32r6 here.
| |
1926 DCHECK((fmt == D) || (fmt == S)); | |
1927 | |
1928 Instr instr = COP1 | fmt << kRsShift | ft.code() << kFtShift | | |
1929 fs.code() << kFsShift | fd.code() << kFdShift | SEL; | |
1930 emit(instr); | |
1931 } | |
1932 | |
1933 | |
1934 void Assembler::seleqz(Register rd, Register rs, Register rt) { | |
1924 DCHECK(IsMipsArchVariant(kMips32r6)); | 1935 DCHECK(IsMipsArchVariant(kMips32r6)); |
1925 GenInstrRegister(SPECIAL, rs, rt, rd, 0, SELEQZ_S); | 1936 GenInstrRegister(SPECIAL, rs, rt, rd, 0, SELEQZ_S); |
1926 } | 1937 } |
1927 | 1938 |
1928 | 1939 |
1929 void Assembler::seleqz(SecondaryField fmt, FPURegister fd, FPURegister ft, | 1940 void Assembler::seleqz(SecondaryField fmt, FPURegister fd, FPURegister fs, |
1930 FPURegister fs) { | 1941 FPURegister ft) { |
1931 DCHECK(IsMipsArchVariant(kMips32r6)); | 1942 DCHECK(IsMipsArchVariant(kMips32r6)); |
1932 DCHECK((fmt == D) || (fmt == S)); | 1943 DCHECK((fmt == D) || (fmt == S)); |
1933 GenInstrRegister(COP1, fmt, ft, fs, fd, SELEQZ_C); | 1944 GenInstrRegister(COP1, fmt, ft, fs, fd, SELEQZ_C); |
1934 } | 1945 } |
1935 | 1946 |
1936 | 1947 |
1937 void Assembler::selnez(Register rs, Register rt, Register rd) { | 1948 void Assembler::selnez(Register rd, Register rs, Register rt) { |
1938 DCHECK(IsMipsArchVariant(kMips32r6)); | 1949 DCHECK(IsMipsArchVariant(kMips32r6)); |
1939 GenInstrRegister(SPECIAL, rs, rt, rd, 0, SELNEZ_S); | 1950 GenInstrRegister(SPECIAL, rs, rt, rd, 0, SELNEZ_S); |
1940 } | 1951 } |
1941 | 1952 |
1942 | 1953 |
1943 void Assembler::selnez(SecondaryField fmt, FPURegister fd, FPURegister ft, | 1954 void Assembler::selnez(SecondaryField fmt, FPURegister fd, FPURegister fs, |
1944 FPURegister fs) { | 1955 FPURegister ft) { |
1945 DCHECK(IsMipsArchVariant(kMips32r6)); | 1956 DCHECK(IsMipsArchVariant(kMips32r6)); |
1946 DCHECK((fmt == D) || (fmt == S)); | 1957 DCHECK((fmt == D) || (fmt == S)); |
1947 GenInstrRegister(COP1, fmt, ft, fs, fd, SELNEZ_C); | 1958 GenInstrRegister(COP1, fmt, ft, fs, fd, SELNEZ_C); |
1948 } | 1959 } |
1949 | 1960 |
1950 | 1961 |
1951 // Bit twiddling. | 1962 // Bit twiddling. |
1952 void Assembler::clz(Register rd, Register rs) { | 1963 void Assembler::clz(Register rd, Register rs) { |
1953 if (!IsMipsArchVariant(kMips32r6)) { | 1964 if (!IsMipsArchVariant(kMips32r6)) { |
1954 // Clz instr requires same GPR number in 'rd' and 'rt' fields. | 1965 // Clz instr requires same GPR number in 'rd' and 'rt' fields. |
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2254 void Assembler::ceil_l_s(FPURegister fd, FPURegister fs) { | 2265 void Assembler::ceil_l_s(FPURegister fd, FPURegister fs) { |
2255 GenInstrRegister(COP1, S, f0, fs, fd, CEIL_L_S); | 2266 GenInstrRegister(COP1, S, f0, fs, fd, CEIL_L_S); |
2256 } | 2267 } |
2257 | 2268 |
2258 | 2269 |
2259 void Assembler::ceil_l_d(FPURegister fd, FPURegister fs) { | 2270 void Assembler::ceil_l_d(FPURegister fd, FPURegister fs) { |
2260 GenInstrRegister(COP1, D, f0, fs, fd, CEIL_L_D); | 2271 GenInstrRegister(COP1, D, f0, fs, fd, CEIL_L_D); |
2261 } | 2272 } |
2262 | 2273 |
2263 | 2274 |
2264 void Assembler::min(SecondaryField fmt, FPURegister fd, FPURegister ft, | 2275 void Assembler::min(SecondaryField fmt, FPURegister fd, FPURegister fs, |
2265 FPURegister fs) { | 2276 FPURegister ft) { |
2266 DCHECK(IsMipsArchVariant(kMips32r6)); | 2277 DCHECK(IsMipsArchVariant(kMips32r6)); |
2267 DCHECK((fmt == D) || (fmt == S)); | 2278 DCHECK((fmt == D) || (fmt == S)); |
2268 GenInstrRegister(COP1, fmt, ft, fs, fd, MIN); | 2279 GenInstrRegister(COP1, fmt, ft, fs, fd, MIN); |
2269 } | 2280 } |
2270 | 2281 |
2271 | 2282 |
2272 void Assembler::mina(SecondaryField fmt, FPURegister fd, FPURegister ft, | 2283 void Assembler::mina(SecondaryField fmt, FPURegister fd, FPURegister fs, |
2273 FPURegister fs) { | 2284 FPURegister ft) { |
2274 DCHECK(IsMipsArchVariant(kMips32r6)); | 2285 DCHECK(IsMipsArchVariant(kMips32r6)); |
2275 DCHECK((fmt == D) || (fmt == S)); | 2286 DCHECK((fmt == D) || (fmt == S)); |
2276 GenInstrRegister(COP1, fmt, ft, fs, fd, MINA); | 2287 GenInstrRegister(COP1, fmt, ft, fs, fd, MINA); |
2277 } | 2288 } |
2278 | 2289 |
2279 | 2290 |
2280 void Assembler::max(SecondaryField fmt, FPURegister fd, FPURegister ft, | 2291 void Assembler::max(SecondaryField fmt, FPURegister fd, FPURegister fs, |
2281 FPURegister fs) { | 2292 FPURegister ft) { |
2282 DCHECK(IsMipsArchVariant(kMips32r6)); | 2293 DCHECK(IsMipsArchVariant(kMips32r6)); |
2283 DCHECK((fmt == D) || (fmt == S)); | 2294 DCHECK((fmt == D) || (fmt == S)); |
2284 GenInstrRegister(COP1, fmt, ft, fs, fd, MAX); | 2295 GenInstrRegister(COP1, fmt, ft, fs, fd, MAX); |
2285 } | 2296 } |
2286 | 2297 |
2287 | 2298 |
2288 void Assembler::maxa(SecondaryField fmt, FPURegister fd, FPURegister ft, | 2299 void Assembler::maxa(SecondaryField fmt, FPURegister fd, FPURegister fs, |
2289 FPURegister fs) { | 2300 FPURegister ft) { |
2290 DCHECK(IsMipsArchVariant(kMips32r6)); | 2301 DCHECK(IsMipsArchVariant(kMips32r6)); |
2291 DCHECK((fmt == D) || (fmt == S)); | 2302 DCHECK((fmt == D) || (fmt == S)); |
2292 GenInstrRegister(COP1, fmt, ft, fs, fd, MAXA); | 2303 GenInstrRegister(COP1, fmt, ft, fs, fd, MAXA); |
2293 } | 2304 } |
2294 | 2305 |
2295 | 2306 |
2296 void Assembler::cvt_s_w(FPURegister fd, FPURegister fs) { | 2307 void Assembler::cvt_s_w(FPURegister fd, FPURegister fs) { |
2297 GenInstrRegister(COP1, W, f0, fs, fd, CVT_S_W); | 2308 GenInstrRegister(COP1, W, f0, fs, fd, CVT_S_W); |
2298 } | 2309 } |
2299 | 2310 |
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2807 void Assembler::PopulateConstantPool(ConstantPoolArray* constant_pool) { | 2818 void Assembler::PopulateConstantPool(ConstantPoolArray* constant_pool) { |
2808 // No out-of-line constant pool support. | 2819 // No out-of-line constant pool support. |
2809 DCHECK(!FLAG_enable_ool_constant_pool); | 2820 DCHECK(!FLAG_enable_ool_constant_pool); |
2810 return; | 2821 return; |
2811 } | 2822 } |
2812 | 2823 |
2813 | 2824 |
2814 } } // namespace v8::internal | 2825 } } // namespace v8::internal |
2815 | 2826 |
2816 #endif // V8_TARGET_ARCH_MIPS | 2827 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |