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 2264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2275 void Assembler::clz(Register rd, Register rs) { | 2275 void Assembler::clz(Register rd, Register rs) { |
2276 if (kArchVariant != kMips64r6) { | 2276 if (kArchVariant != kMips64r6) { |
2277 // Clz instr requires same GPR number in 'rd' and 'rt' fields. | 2277 // Clz instr requires same GPR number in 'rd' and 'rt' fields. |
2278 GenInstrRegister(SPECIAL2, rs, rd, rd, 0, CLZ); | 2278 GenInstrRegister(SPECIAL2, rs, rd, rd, 0, CLZ); |
2279 } else { | 2279 } else { |
2280 GenInstrRegister(SPECIAL, rs, zero_reg, rd, 1, CLZ_R6); | 2280 GenInstrRegister(SPECIAL, rs, zero_reg, rd, 1, CLZ_R6); |
2281 } | 2281 } |
2282 } | 2282 } |
2283 | 2283 |
2284 | 2284 |
| 2285 void Assembler::dclz(Register rd, Register rs) { |
| 2286 if (kArchVariant != kMips64r6) { |
| 2287 // dclz instr requires same GPR number in 'rd' and 'rt' fields. |
| 2288 GenInstrRegister(SPECIAL2, rs, rd, rd, 0, DCLZ); |
| 2289 } else { |
| 2290 GenInstrRegister(SPECIAL, rs, zero_reg, rd, 1, DCLZ_R6); |
| 2291 } |
| 2292 } |
| 2293 |
| 2294 |
2285 void Assembler::ins_(Register rt, Register rs, uint16_t pos, uint16_t size) { | 2295 void Assembler::ins_(Register rt, Register rs, uint16_t pos, uint16_t size) { |
2286 // Should be called via MacroAssembler::Ins. | 2296 // Should be called via MacroAssembler::Ins. |
2287 // Ins instr has 'rt' field as dest, and two uint5: msb, lsb. | 2297 // Ins instr has 'rt' field as dest, and two uint5: msb, lsb. |
2288 DCHECK((kArchVariant == kMips64r2) || (kArchVariant == kMips64r6)); | 2298 DCHECK((kArchVariant == kMips64r2) || (kArchVariant == kMips64r6)); |
2289 GenInstrRegister(SPECIAL3, rs, rt, pos + size - 1, pos, INS); | 2299 GenInstrRegister(SPECIAL3, rs, rt, pos + size - 1, pos, INS); |
2290 } | 2300 } |
2291 | 2301 |
2292 | 2302 |
2293 void Assembler::ext_(Register rt, Register rs, uint16_t pos, uint16_t size) { | 2303 void Assembler::ext_(Register rt, Register rs, uint16_t pos, uint16_t size) { |
2294 // Should be called via MacroAssembler::Ext. | 2304 // Should be called via MacroAssembler::Ext. |
(...skipping 959 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3254 if (icache_flush_mode != SKIP_ICACHE_FLUSH) { | 3264 if (icache_flush_mode != SKIP_ICACHE_FLUSH) { |
3255 CpuFeatures::FlushICache(pc, 4 * Assembler::kInstrSize); | 3265 CpuFeatures::FlushICache(pc, 4 * Assembler::kInstrSize); |
3256 } | 3266 } |
3257 } | 3267 } |
3258 | 3268 |
3259 | 3269 |
3260 } // namespace internal | 3270 } // namespace internal |
3261 } // namespace v8 | 3271 } // namespace v8 |
3262 | 3272 |
3263 #endif // V8_TARGET_ARCH_MIPS64 | 3273 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |