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

Unified Diff: src/IceAssemblerARM32.cpp

Issue 1507873004: Add DMB instruction to the ARM integrated assembler. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.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 side-by-side diff with in-line comments
Download patch
Index: src/IceAssemblerARM32.cpp
diff --git a/src/IceAssemblerARM32.cpp b/src/IceAssemblerARM32.cpp
index 9077325a0acbf05838bc11da4c789a4bb74803f5..8db0ddc87df5817ef57ffd43e0157951d90fdf0e 100644
--- a/src/IceAssemblerARM32.cpp
+++ b/src/IceAssemblerARM32.cpp
@@ -45,6 +45,10 @@ static constexpr IValueT B12 = 1 << 12;
static constexpr IValueT B13 = 1 << 13;
static constexpr IValueT B14 = 1 << 14;
static constexpr IValueT B15 = 1 << 15;
+static constexpr IValueT B16 = 1 << 16;
+static constexpr IValueT B17 = 1 << 17;
+static constexpr IValueT B18 = 1 << 18;
+static constexpr IValueT B19 = 1 << 19;
static constexpr IValueT B20 = 1 << 20;
static constexpr IValueT B21 = 1 << 21;
static constexpr IValueT B22 = 1 << 22;
@@ -1077,6 +1081,20 @@ void AssemblerARM32::cmp(const Operand *OpRn, const Operand *OpSrc1,
emitCompareOp(Cond, CmpOpcode, OpRn, OpSrc1, CmpName);
}
+void AssemblerARM32::dmb(IValueT Option) {
+ // DMB - ARM section A8.8.43, encoding A1:
+ // dmb <option>
+ //
+ // 1111010101111111111100000101xxxx where xxxx=Option.
+ assert(Utils::IsUint(4, Option) && "Bad dmb option");
+ AssemblerBuffer::EnsureCapacity ensured(&Buffer);
+ const IValueT Encoding =
+ (encodeCondition(CondARM32::kNone) << kConditionShift) | B26 | B24 | B22 |
+ B21 | B20 | B19 | B18 | B17 | B16 | B15 | B14 | B13 | B12 | B6 | B4 |
+ Option;
+ emitInst(Encoding);
+}
+
void AssemblerARM32::eor(const Operand *OpRd, const Operand *OpRn,
const Operand *OpSrc1, bool SetFlags,
CondARM32::Cond Cond) {
« src/IceAssemblerARM32.h ('K') | « src/IceAssemblerARM32.h ('k') | src/IceInstARM32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698