Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(110)

Side by Side Diff: src/mips/assembler-mips.cc

Issue 1448843002: MIPS: Enable movt, movz, movn and movf instructions on mips32r1 (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 2170 matching lines...) Expand 10 before | Expand all | Expand 10 after
2181 void Assembler::DoubleAsTwoUInt32(double d, uint32_t* lo, uint32_t* hi) { 2181 void Assembler::DoubleAsTwoUInt32(double d, uint32_t* lo, uint32_t* hi) {
2182 uint64_t i; 2182 uint64_t i;
2183 memcpy(&i, &d, 8); 2183 memcpy(&i, &d, 8);
2184 2184
2185 *lo = i & 0xffffffff; 2185 *lo = i & 0xffffffff;
2186 *hi = i >> 32; 2186 *hi = i >> 32;
2187 } 2187 }
2188 2188
2189 2189
2190 void Assembler::movn_s(FPURegister fd, FPURegister fs, Register rt) { 2190 void Assembler::movn_s(FPURegister fd, FPURegister fs, Register rt) {
2191 DCHECK(IsMipsArchVariant(kMips32r2)); 2191 DCHECK(!IsMipsArchVariant(kMips32r6));
2192 GenInstrRegister(COP1, S, rt, fs, fd, MOVN_C); 2192 GenInstrRegister(COP1, S, rt, fs, fd, MOVN_C);
2193 } 2193 }
2194 2194
2195 2195
2196 void Assembler::movn_d(FPURegister fd, FPURegister fs, Register rt) { 2196 void Assembler::movn_d(FPURegister fd, FPURegister fs, Register rt) {
2197 DCHECK(IsMipsArchVariant(kMips32r2)); 2197 DCHECK(!IsMipsArchVariant(kMips32r6));
2198 GenInstrRegister(COP1, D, rt, fs, fd, MOVN_C); 2198 GenInstrRegister(COP1, D, rt, fs, fd, MOVN_C);
2199 } 2199 }
2200 2200
2201 2201
2202 void Assembler::sel(SecondaryField fmt, FPURegister fd, FPURegister fs, 2202 void Assembler::sel(SecondaryField fmt, FPURegister fd, FPURegister fs,
2203 FPURegister ft) { 2203 FPURegister ft) {
2204 DCHECK(IsMipsArchVariant(kMips32r6)); 2204 DCHECK(IsMipsArchVariant(kMips32r6));
2205 DCHECK((fmt == D) || (fmt == S)); 2205 DCHECK((fmt == D) || (fmt == S));
2206 2206
2207 GenInstrRegister(COP1, fmt, ft, fs, fd, SEL); 2207 GenInstrRegister(COP1, fmt, ft, fs, fd, SEL);
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
2254 selnez(D, fd, fs, ft); 2254 selnez(D, fd, fs, ft);
2255 } 2255 }
2256 2256
2257 2257
2258 void Assembler::selnez_s(FPURegister fd, FPURegister fs, FPURegister ft) { 2258 void Assembler::selnez_s(FPURegister fd, FPURegister fs, FPURegister ft) {
2259 selnez(S, fd, fs, ft); 2259 selnez(S, fd, fs, ft);
2260 } 2260 }
2261 2261
2262 2262
2263 void Assembler::movz_s(FPURegister fd, FPURegister fs, Register rt) { 2263 void Assembler::movz_s(FPURegister fd, FPURegister fs, Register rt) {
2264 DCHECK(IsMipsArchVariant(kMips32r2)); 2264 DCHECK(!IsMipsArchVariant(kMips32r6));
2265 GenInstrRegister(COP1, S, rt, fs, fd, MOVZ_C); 2265 GenInstrRegister(COP1, S, rt, fs, fd, MOVZ_C);
2266 } 2266 }
2267 2267
2268 2268
2269 void Assembler::movz_d(FPURegister fd, FPURegister fs, Register rt) { 2269 void Assembler::movz_d(FPURegister fd, FPURegister fs, Register rt) {
2270 DCHECK(IsMipsArchVariant(kMips32r2)); 2270 DCHECK(!IsMipsArchVariant(kMips32r6));
2271 GenInstrRegister(COP1, D, rt, fs, fd, MOVZ_C); 2271 GenInstrRegister(COP1, D, rt, fs, fd, MOVZ_C);
2272 } 2272 }
2273 2273
2274 2274
2275 void Assembler::movt_s(FPURegister fd, FPURegister fs, uint16_t cc) { 2275 void Assembler::movt_s(FPURegister fd, FPURegister fs, uint16_t cc) {
2276 DCHECK(IsMipsArchVariant(kMips32r2)); 2276 DCHECK(!IsMipsArchVariant(kMips32r6));
2277 FPURegister ft; 2277 FPURegister ft;
2278 ft.reg_code = (cc & 0x0007) << 2 | 1; 2278 ft.reg_code = (cc & 0x0007) << 2 | 1;
2279 GenInstrRegister(COP1, S, ft, fs, fd, MOVF); 2279 GenInstrRegister(COP1, S, ft, fs, fd, MOVF);
2280 } 2280 }
2281 2281
2282 2282
2283 void Assembler::movt_d(FPURegister fd, FPURegister fs, uint16_t cc) { 2283 void Assembler::movt_d(FPURegister fd, FPURegister fs, uint16_t cc) {
2284 DCHECK(IsMipsArchVariant(kMips32r2)); 2284 DCHECK(!IsMipsArchVariant(kMips32r6));
2285 FPURegister ft; 2285 FPURegister ft;
2286 ft.reg_code = (cc & 0x0007) << 2 | 1; 2286 ft.reg_code = (cc & 0x0007) << 2 | 1;
2287 GenInstrRegister(COP1, D, ft, fs, fd, MOVF); 2287 GenInstrRegister(COP1, D, ft, fs, fd, MOVF);
2288 } 2288 }
2289 2289
2290 2290
2291 void Assembler::movf_s(FPURegister fd, FPURegister fs, uint16_t cc) { 2291 void Assembler::movf_s(FPURegister fd, FPURegister fs, uint16_t cc) {
2292 DCHECK(IsMipsArchVariant(kMips32r2)); 2292 DCHECK(!IsMipsArchVariant(kMips32r6));
2293 FPURegister ft; 2293 FPURegister ft;
2294 ft.reg_code = (cc & 0x0007) << 2 | 0; 2294 ft.reg_code = (cc & 0x0007) << 2 | 0;
2295 GenInstrRegister(COP1, S, ft, fs, fd, MOVF); 2295 GenInstrRegister(COP1, S, ft, fs, fd, MOVF);
2296 } 2296 }
2297 2297
2298 2298
2299 void Assembler::movf_d(FPURegister fd, FPURegister fs, uint16_t cc) { 2299 void Assembler::movf_d(FPURegister fd, FPURegister fs, uint16_t cc) {
2300 DCHECK(IsMipsArchVariant(kMips32r2)); 2300 DCHECK(!IsMipsArchVariant(kMips32r6));
2301 FPURegister ft; 2301 FPURegister ft;
2302 ft.reg_code = (cc & 0x0007) << 2 | 0; 2302 ft.reg_code = (cc & 0x0007) << 2 | 0;
2303 GenInstrRegister(COP1, D, ft, fs, fd, MOVF); 2303 GenInstrRegister(COP1, D, ft, fs, fd, MOVF);
2304 } 2304 }
2305 2305
2306 2306
2307 // Arithmetic. 2307 // Arithmetic.
2308 2308
2309 void Assembler::add_s(FPURegister fd, FPURegister fs, FPURegister ft) { 2309 void Assembler::add_s(FPURegister fd, FPURegister fs, FPURegister ft) {
2310 GenInstrRegister(COP1, S, ft, fs, fd, ADD_S); 2310 GenInstrRegister(COP1, S, ft, fs, fd, ADD_S);
(...skipping 712 matching lines...) Expand 10 before | Expand all | Expand 10 after
3023 3023
3024 if (icache_flush_mode != SKIP_ICACHE_FLUSH) { 3024 if (icache_flush_mode != SKIP_ICACHE_FLUSH) {
3025 CpuFeatures::FlushICache(pc, 2 * sizeof(int32_t)); 3025 CpuFeatures::FlushICache(pc, 2 * sizeof(int32_t));
3026 } 3026 }
3027 } 3027 }
3028 3028
3029 } // namespace internal 3029 } // namespace internal
3030 } // namespace v8 3030 } // namespace v8
3031 3031
3032 #endif // V8_TARGET_ARCH_MIPS 3032 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698