Index: src/mips/assembler-mips.cc |
diff --git a/src/mips/assembler-mips.cc b/src/mips/assembler-mips.cc |
index 0394e4f17e0b19486b1cd4a8f66927060f9ce643..f32fb0772fb59a5919c0c9c53870ac5ef1398850 100644 |
--- a/src/mips/assembler-mips.cc |
+++ b/src/mips/assembler-mips.cc |
@@ -1956,7 +1956,6 @@ void Assembler::aui(Register rt, Register rs, int32_t j) { |
GenInstrImmediate(LUI, rs, rt, j); |
} |
- |
// ---------PC-Relative instructions----------- |
void Assembler::addiupc(Register rs, int32_t imm19) { |
@@ -2191,6 +2190,21 @@ void Assembler::align(Register rd, Register rs, Register rt, uint8_t bp) { |
GenInstrRegister(SPECIAL3, rs, rt, rd, sa, BSHFL); |
} |
+// Byte swap. |
+void Assembler::wsbh(Register rd, Register rt) { |
+ DCHECK(IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)); |
+ GenInstrRegister(SPECIAL3, zero_reg, rt, rd, WSBH, BSHFL); |
+} |
+ |
+void Assembler::seh(Register rd, Register rt) { |
+ DCHECK(IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)); |
+ GenInstrRegister(SPECIAL3, zero_reg, rt, rd, SEH, BSHFL); |
+} |
+ |
+void Assembler::seb(Register rd, Register rt) { |
+ DCHECK(IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)); |
+ GenInstrRegister(SPECIAL3, zero_reg, rt, rd, SEB, BSHFL); |
+} |
// --------Coprocessor-instructions---------------- |