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

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: Fix comment. 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
« no previous file with comments | « src/IceAssemblerARM32.h ('k') | src/IceInstARM32.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceAssemblerARM32.cpp
diff --git a/src/IceAssemblerARM32.cpp b/src/IceAssemblerARM32.cpp
index 107c9e86dec90f3eda54367c7c1f191d4c0e084b..2ef7e2f8a0174071af5b8e2c86007761c2e86eb5 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;
@@ -1088,6 +1092,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) {
« no previous file with comments | « src/IceAssemblerARM32.h ('k') | src/IceInstARM32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698