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

Unified Diff: src/IceAssemblerMIPS32.cpp

Issue 2504253002: [Subzero][MIPS] Implements atomic intrinsics for MIPS32 (Closed)
Patch Set: Created 4 years, 1 month 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/IceAssemblerMIPS32.cpp
diff --git a/src/IceAssemblerMIPS32.cpp b/src/IceAssemblerMIPS32.cpp
index c35dff0b672398c642558c4850212da12503fc63..24bd7ee729750943781e054b1086bb26ec4c977b 100644
--- a/src/IceAssemblerMIPS32.cpp
+++ b/src/IceAssemblerMIPS32.cpp
@@ -696,6 +696,12 @@ void AssemblerMIPS32::ldc1(const Operand *OpRt, const Operand *OpBase,
emitInst(Opcode);
}
+void AssemblerMIPS32::ll(const Operand *OpRt, const Operand *OpBase,
+ const uint32_t Offset) {
+ static constexpr IValueT Opcode = 0xC0000000;
+ emitRtRsImm16(Opcode, OpRt, OpBase, Offset, "ll");
+}
+
void AssemblerMIPS32::lw(const Operand *OpRt, const Operand *OpBase,
const uint32_t Offset) {
switch (OpRt->getType()) {
@@ -959,6 +965,12 @@ void AssemblerMIPS32::ret(void) {
nop(); // delay slot
}
+void AssemblerMIPS32::sc(const Operand *OpRt, const Operand *OpBase,
+ const uint32_t Offset) {
+ static constexpr IValueT Opcode = 0xE0000000;
+ emitRtRsImm16(Opcode, OpRt, OpBase, Offset, "sc");
+}
+
void AssemblerMIPS32::sll(const Operand *OpRd, const Operand *OpRt,
const uint32_t Sa) {
static constexpr IValueT Opcode = 0x00000000;
@@ -1122,6 +1134,11 @@ void AssemblerMIPS32::swc1(const Operand *OpRt, const Operand *OpBase,
emitInst(Opcode);
}
+void AssemblerMIPS32::sync() {
+ IValueT Opcode = 0x0000000f;
Jim Stichnoth 2016/11/17 05:35:38 static constexpr like the others?
sagar.thakur 2016/11/17 10:57:28 Done.
+ emitInst(Opcode);
+}
+
void AssemblerMIPS32::teq(const Operand *OpRs, const Operand *OpRt,
const uint32_t TrapCode) {
IValueT Opcode = 0x00000034;
« no previous file with comments | « src/IceAssemblerMIPS32.h ('k') | src/IceInstMIPS32.h » ('j') | src/IceInstMIPS32.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698