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

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

Issue 1483973002: MIPS: [turbofan] Enable Word32 safe shifts. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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 | « src/compiler/mips64/instruction-selector-mips64.cc ('k') | src/mips64/assembler-mips64.cc » ('j') | 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 1635 matching lines...) Expand 10 before | Expand all | Expand 10 after
1646 // Shifts. 1646 // Shifts.
1647 void Assembler::sll(Register rd, 1647 void Assembler::sll(Register rd,
1648 Register rt, 1648 Register rt,
1649 uint16_t sa, 1649 uint16_t sa,
1650 bool coming_from_nop) { 1650 bool coming_from_nop) {
1651 // Don't allow nop instructions in the form sll zero_reg, zero_reg to be 1651 // Don't allow nop instructions in the form sll zero_reg, zero_reg to be
1652 // generated using the sll instruction. They must be generated using 1652 // generated using the sll instruction. They must be generated using
1653 // nop(int/NopMarkerTypes) or MarkCode(int/NopMarkerTypes) pseudo 1653 // nop(int/NopMarkerTypes) or MarkCode(int/NopMarkerTypes) pseudo
1654 // instructions. 1654 // instructions.
1655 DCHECK(coming_from_nop || !(rd.is(zero_reg) && rt.is(zero_reg))); 1655 DCHECK(coming_from_nop || !(rd.is(zero_reg) && rt.is(zero_reg)));
1656 GenInstrRegister(SPECIAL, zero_reg, rt, rd, sa, SLL); 1656 GenInstrRegister(SPECIAL, zero_reg, rt, rd, sa & 0x1F, SLL);
1657 } 1657 }
1658 1658
1659 1659
1660 void Assembler::sllv(Register rd, Register rt, Register rs) { 1660 void Assembler::sllv(Register rd, Register rt, Register rs) {
1661 GenInstrRegister(SPECIAL, rs, rt, rd, 0, SLLV); 1661 GenInstrRegister(SPECIAL, rs, rt, rd, 0, SLLV);
1662 } 1662 }
1663 1663
1664 1664
1665 void Assembler::srl(Register rd, Register rt, uint16_t sa) { 1665 void Assembler::srl(Register rd, Register rt, uint16_t sa) {
1666 GenInstrRegister(SPECIAL, zero_reg, rt, rd, sa, SRL); 1666 GenInstrRegister(SPECIAL, zero_reg, rt, rd, sa & 0x1F, SRL);
1667 } 1667 }
1668 1668
1669 1669
1670 void Assembler::srlv(Register rd, Register rt, Register rs) { 1670 void Assembler::srlv(Register rd, Register rt, Register rs) {
1671 GenInstrRegister(SPECIAL, rs, rt, rd, 0, SRLV); 1671 GenInstrRegister(SPECIAL, rs, rt, rd, 0, SRLV);
1672 } 1672 }
1673 1673
1674 1674
1675 void Assembler::sra(Register rd, Register rt, uint16_t sa) { 1675 void Assembler::sra(Register rd, Register rt, uint16_t sa) {
1676 GenInstrRegister(SPECIAL, zero_reg, rt, rd, sa, SRA); 1676 GenInstrRegister(SPECIAL, zero_reg, rt, rd, sa & 0x1F, SRA);
1677 } 1677 }
1678 1678
1679 1679
1680 void Assembler::srav(Register rd, Register rt, Register rs) { 1680 void Assembler::srav(Register rd, Register rt, Register rs) {
1681 GenInstrRegister(SPECIAL, rs, rt, rd, 0, SRAV); 1681 GenInstrRegister(SPECIAL, rs, rt, rd, 0, SRAV);
1682 } 1682 }
1683 1683
1684 1684
1685 void Assembler::rotr(Register rd, Register rt, uint16_t sa) { 1685 void Assembler::rotr(Register rd, Register rt, uint16_t sa) {
1686 // Should be called via MacroAssembler::Ror. 1686 // Should be called via MacroAssembler::Ror.
(...skipping 1361 matching lines...) Expand 10 before | Expand all | Expand 10 after
3048 3048
3049 if (icache_flush_mode != SKIP_ICACHE_FLUSH) { 3049 if (icache_flush_mode != SKIP_ICACHE_FLUSH) {
3050 Assembler::FlushICacheWithoutIsolate(pc, 2 * sizeof(int32_t)); 3050 Assembler::FlushICacheWithoutIsolate(pc, 2 * sizeof(int32_t));
3051 } 3051 }
3052 } 3052 }
3053 3053
3054 } // namespace internal 3054 } // namespace internal
3055 } // namespace v8 3055 } // namespace v8
3056 3056
3057 #endif // V8_TARGET_ARCH_MIPS 3057 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/compiler/mips64/instruction-selector-mips64.cc ('k') | src/mips64/assembler-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698