Index: src/arm/assembler-arm.cc |
diff --git a/src/arm/assembler-arm.cc b/src/arm/assembler-arm.cc |
index 1ccc3a6237cb10467980f790f7ff477071b1bb7e..a1f5b0d17924acd519be65c489bc790c99e3b9e6 100644 |
--- a/src/arm/assembler-arm.cc |
+++ b/src/arm/assembler-arm.cc |
@@ -2076,6 +2076,53 @@ void Assembler::strd(Register src1, Register src2, |
addrmod3(cond | B7 | B6 | B5 | B4, src1, dst); |
} |
+// Load/Store exclusive instructions. |
+void Assembler::ldrex(Register dst, Register src, Condition cond) { |
+ // Instruction details available in ARM DDI 0406C.b, A8.8.75. |
+ // cond(31-28) | 00011001(27-20) | Rn(19-16) | Rt(15-12) | 111110011111(11-0) |
+ emit(cond | B24 | B23 | B20 | src.code() * B16 | dst.code() * B12 | 0xf9f); |
+} |
+ |
+void Assembler::strex(Register src1, Register src2, Register dst, |
+ Condition cond) { |
+ // Instruction details available in ARM DDI 0406C.b, A8.8.212. |
+ // cond(31-28) | 00011000(27-20) | Rn(19-16) | Rd(15-12) | 11111001(11-4) | |
+ // Rt(3-0) |
+ emit(cond | B24 | B23 | dst.code() * B16 | src1.code() * B12 | 0xf9 * B4 | |
+ src2.code()); |
+} |
+ |
+void Assembler::ldrexb(Register dst, Register src, Condition cond) { |
+ // Instruction details available in ARM DDI 0406C.b, A8.8.76. |
+ // cond(31-28) | 00011101(27-20) | Rn(19-16) | Rt(15-12) | 111110011111(11-0) |
+ emit(cond | B24 | B23 | B22 | B20 | src.code() * B16 | dst.code() * B12 | |
+ 0xf9f); |
+} |
+ |
+void Assembler::strexb(Register src1, Register src2, Register dst, |
+ Condition cond) { |
+ // Instruction details available in ARM DDI 0406C.b, A8.8.213. |
+ // cond(31-28) | 00011100(27-20) | Rn(19-16) | Rd(15-12) | 11111001(11-4) | |
+ // Rt(3-0) |
+ emit(cond | B24 | B23 | B22 | dst.code() * B16 | src1.code() * B12 | |
+ 0xf9 * B4 | src2.code()); |
+} |
+ |
+void Assembler::ldrexh(Register dst, Register src, Condition cond) { |
+ // Instruction details available in ARM DDI 0406C.b, A8.8.78. |
+ // cond(31-28) | 00011111(27-20) | Rn(19-16) | Rt(15-12) | 111110011111(11-0) |
+ emit(cond | B24 | B23 | B22 | B21 | B20 | src.code() * B16 | |
+ dst.code() * B12 | 0xf9f); |
+} |
+ |
+void Assembler::strexh(Register src1, Register src2, Register dst, |
+ Condition cond) { |
+ // Instruction details available in ARM DDI 0406C.b, A8.8.215. |
+ // cond(31-28) | 00011110(27-20) | Rn(19-16) | Rd(15-12) | 11111001(11-4) | |
+ // Rt(3-0) |
+ emit(cond | B24 | B23 | B22 | B21 | dst.code() * B16 | src1.code() * B12 | |
+ 0xf9 * B4 | src2.code()); |
+} |
// Preload instructions. |
void Assembler::pld(const MemOperand& address) { |