[PATCH] D27483: [mips] For PIC code convert unconditional jump to unconditional branch

Simon Dardis via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 12 03:54:32 PST 2016


sdardis added a comment.

LGTM with the nits addressed.



================
Comment at: lib/Target/Mips/AsmParser/MipsAsmParser.cpp:1791
+      inPicMode()) {
+    // For PIC code convert unconditional jump to unconditional branch.
+    MCInst BInst;
----------------
Nit: This comment should be before the "if ((Inst.getOpcode() == ..".


================
Comment at: test/MC/Mips/expansion-j-sym-pic.s:2-8
+# RUN:   FileCheck %s -check-prefix=NORMAL
+
+# RUN: llvm-mc %s -arch=mips -mcpu=mips64 -target-abi n32 -show-encoding |\
+# RUN:   FileCheck %s -check-prefix=NORMAL
+
+# RUN: llvm-mc %s -arch=mips64 -mcpu=mips64 -target-abi n64 -show-encoding |\
+# RUN:   FileCheck %s -check-prefix=NORMAL
----------------
Tiny nit: the check prefix should be MIPS.


================
Comment at: test/MC/Mips/expansion-j-sym-pic.s:10-17
+# RUN: llvm-mc %s -arch=mips -mcpu=mips32 -mattr=micromips -show-encoding |\
+# RUN:   FileCheck %s -check-prefix=MICRO
+
+# RUN: llvm-mc %s -arch=mips64 -mcpu=mips64 -target-abi n32 -mattr=micromips -show-encoding |\
+# RUN:   FileCheck %s -check-prefix=MICRO
+
+# RUN: llvm-mc %s -arch=mips64 -mcpu=mips64 -target-abi n64 -mattr=micromips -show-encoding |\
----------------
Tiny nit: the check prefix should MM.


Repository:
  rL LLVM

https://reviews.llvm.org/D27483





More information about the llvm-commits mailing list