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 2543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2554 } | 2554 } |
2555 | 2555 |
2556 | 2556 |
2557 void Assembler::dalign(Register rd, Register rs, Register rt, uint8_t bp) { | 2557 void Assembler::dalign(Register rd, Register rs, Register rt, uint8_t bp) { |
2558 DCHECK(kArchVariant == kMips64r6); | 2558 DCHECK(kArchVariant == kMips64r6); |
2559 DCHECK(is_uint3(bp)); | 2559 DCHECK(is_uint3(bp)); |
2560 uint16_t sa = (DALIGN << kBp3Bits) | bp; | 2560 uint16_t sa = (DALIGN << kBp3Bits) | bp; |
2561 GenInstrRegister(SPECIAL3, rs, rt, rd, sa, DBSHFL); | 2561 GenInstrRegister(SPECIAL3, rs, rt, rd, sa, DBSHFL); |
2562 } | 2562 } |
2563 | 2563 |
| 2564 void Assembler::wsbh(Register rd, Register rt) { |
| 2565 DCHECK(kArchVariant == kMips64r2 || kArchVariant == kMips64r6); |
| 2566 GenInstrRegister(SPECIAL3, zero_reg, rt, rd, WSBH, BSHFL); |
| 2567 } |
| 2568 |
| 2569 void Assembler::dsbh(Register rd, Register rt) { |
| 2570 DCHECK(kArchVariant == kMips64r2 || kArchVariant == kMips64r6); |
| 2571 GenInstrRegister(SPECIAL3, zero_reg, rt, rd, DSBH, DBSHFL); |
| 2572 } |
| 2573 |
| 2574 void Assembler::dshd(Register rd, Register rt) { |
| 2575 DCHECK(kArchVariant == kMips64r2 || kArchVariant == kMips64r6); |
| 2576 GenInstrRegister(SPECIAL3, zero_reg, rt, rd, DSHD, DBSHFL); |
| 2577 } |
| 2578 |
| 2579 void Assembler::seh(Register rd, Register rt) { |
| 2580 DCHECK(kArchVariant == kMips64r2 || kArchVariant == kMips64r6); |
| 2581 GenInstrRegister(SPECIAL3, zero_reg, rt, rd, SEH, BSHFL); |
| 2582 } |
| 2583 |
| 2584 void Assembler::seb(Register rd, Register rt) { |
| 2585 DCHECK(kArchVariant == kMips64r2 || kArchVariant == kMips64r6); |
| 2586 GenInstrRegister(SPECIAL3, zero_reg, rt, rd, SEB, BSHFL); |
| 2587 } |
2564 | 2588 |
2565 // --------Coprocessor-instructions---------------- | 2589 // --------Coprocessor-instructions---------------- |
2566 | 2590 |
2567 // Load, store, move. | 2591 // Load, store, move. |
2568 void Assembler::lwc1(FPURegister fd, const MemOperand& src) { | 2592 void Assembler::lwc1(FPURegister fd, const MemOperand& src) { |
2569 if (is_int16(src.offset_)) { | 2593 if (is_int16(src.offset_)) { |
2570 GenInstrImmediate(LWC1, src.rm(), fd, src.offset_); | 2594 GenInstrImmediate(LWC1, src.rm(), fd, src.offset_); |
2571 } else { // Offset > 16 bits, use multiple instructions to load. | 2595 } else { // Offset > 16 bits, use multiple instructions to load. |
2572 LoadRegPlusOffsetToAt(src); | 2596 LoadRegPlusOffsetToAt(src); |
2573 GenInstrImmediate(LWC1, at, fd, 0); | 2597 GenInstrImmediate(LWC1, at, fd, 0); |
(...skipping 887 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3461 *(p + 1) = ORI | (rt_code << kRtShift) | (rt_code << kRsShift) | 3485 *(p + 1) = ORI | (rt_code << kRtShift) | (rt_code << kRsShift) |
3462 | ((itarget >> 16) & kImm16Mask); | 3486 | ((itarget >> 16) & kImm16Mask); |
3463 *(p + 3) = ORI | (rt_code << kRsShift) | (rt_code << kRtShift) | 3487 *(p + 3) = ORI | (rt_code << kRsShift) | (rt_code << kRtShift) |
3464 | (itarget & kImm16Mask); | 3488 | (itarget & kImm16Mask); |
3465 | 3489 |
3466 if (icache_flush_mode != SKIP_ICACHE_FLUSH) { | 3490 if (icache_flush_mode != SKIP_ICACHE_FLUSH) { |
3467 Assembler::FlushICache(isolate, pc, 4 * Assembler::kInstrSize); | 3491 Assembler::FlushICache(isolate, pc, 4 * Assembler::kInstrSize); |
3468 } | 3492 } |
3469 } | 3493 } |
3470 | 3494 |
3471 | |
3472 } // namespace internal | 3495 } // namespace internal |
3473 } // namespace v8 | 3496 } // namespace v8 |
3474 | 3497 |
3475 #endif // V8_TARGET_ARCH_MIPS64 | 3498 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |