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

Unified Diff: src/IceAssemblerMIPS32.cpp

Issue 2364093002: Subzero, MIPS32: Intrinsic calls Ctlz and Cttz for i64 (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Bitcast added Created 4 years, 3 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
Index: src/IceAssemblerMIPS32.cpp
diff --git a/src/IceAssemblerMIPS32.cpp b/src/IceAssemblerMIPS32.cpp
index aede16c0ecfd926b29929a272ec06ebc44aeb4d5..236abeb0db25478c3fc712205b230d3b2db31629 100644
--- a/src/IceAssemblerMIPS32.cpp
+++ b/src/IceAssemblerMIPS32.cpp
@@ -521,6 +521,14 @@ void AssemblerMIPS32::div_s(const Operand *OpFd, const Operand *OpFs,
emitCOP1FmtFtFsFd(Opcode, SinglePrecision, OpFd, OpFs, OpFt, "div.s");
}
+void AssemblerMIPS32::lui(const Operand *OpRt, const uint16_t Imm) {
+ IValueT Opcode = 0x3C000000;
+ const IValueT Rt = encodeGPRegister(OpRt, "Rt", "lui");
+ Opcode |= Rt << 16;
+ Opcode |= Imm;
+ emitInst(Opcode);
+}
+
void AssemblerMIPS32::lw(const Operand *OpRt, const Operand *OpBase,
const uint32_t Offset) {
switch (OpRt->getType()) {
@@ -627,7 +635,7 @@ void AssemblerMIPS32::movf(const Operand *OpRd, const Operand *OpRs,
void AssemblerMIPS32::movn(const Operand *OpRd, const Operand *OpRs,
const Operand *OpRt) {
- static constexpr IValueT Opcode = 0x44000013;
+ static constexpr IValueT Opcode = 0x0000000B;
emitRdRsRt(Opcode, OpRd, OpRs, OpRt, "movn");
}

Powered by Google App Engine
This is Rietveld 408576698