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

Unified Diff: src/arm/assembler-arm.cc

Issue 1993033002: Add ldrex and strex instructions to ARM assembler/disassmbler (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/arm/assembler-arm.h ('k') | src/arm/disasm-arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « src/arm/assembler-arm.h ('k') | src/arm/disasm-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698