[PATCH] [mips][microMIPS] Implement BEQZ16 and BNEZ16 instructions
Sasa Stankovic
Sasa.Stankovic at imgtec.com
Tue Dec 30 08:42:07 PST 2014
================
Comment at: lib/Target/Mips/AsmParser/MipsAsmParser.cpp:1219
@@ +1218,3 @@
+ if (!Offset.isImm())
+ break; // We'll deal with this situation later on when applying fixups.
+ if (!isIntN(7, Offset.getImm()))
----------------
You should use 8 instead of 7.
================
Comment at: lib/Target/Mips/MicroMipsInstrInfo.td:423
@@ +422,3 @@
+// TODO: MipsLongBranch has to be fixed for begz16 and bnez16, because it
+// currently assumes that all branches have 16-bit offsets, and will produce
+// wrong code if branches whose allowed offsets are [-64, ..., 63] are present.
----------------
MipsLongBranch.cpp file is better place for this comment. Also, I was wrong in the previous review comment - allowed offsets for beqz16 and bnez16 are [-128, -126, ..., 126]
http://reviews.llvm.org/D5271
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list