Fix function pointer miscompilation on ARM

Sanghyeon Seo sh4.seo at samsung.com
Fri Mar 15 03:55:57 PDT 2013


The following patch fixes the regression introduced in r168587.
http://llvm.org/bugs/show_bug.cgi?id=15520

Index: lib/Target/ARM/ARMAsmPrinter.cpp
===================================================================
--- lib/Target/ARM/ARMAsmPrinter.cpp    (리비전 177145)
+++ lib/Target/ARM/ARMAsmPrinter.cpp    (작업 사본)
@@ -1357,7 +1357,7 @@

     OutStreamer.EmitInstruction(MCInstBuilder(ARM::MOVr)
       .addReg(ARM::PC)
-      .addImm(MI->getOperand(0).getReg())
+      .addReg(MI->getOperand(0).getReg())
       // Add predicate operands.
       .addImm(ARMCC::AL)
       .addReg(0)




More information about the llvm-commits mailing list