[llvm-bugs] [Bug 24858] New: BLX being used in ARMv4 in ARMFastIsel

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Sep 17 05:06:39 PDT 2015


https://llvm.org/bugs/show_bug.cgi?id=24858

            Bug ID: 24858
           Summary: BLX being used in ARMv4 in ARMFastIsel
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: ARM
          Assignee: unassignedbugs at nondot.org
          Reporter: renato.golin at linaro.org
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Following from the bug report detected in Rust when using LLVM:

https://groups.google.com/forum/#!topic/llvm-dev/upPBDqUOLF4

ARMFastIsel doesn't recognise the lack of BLX in ARMv4 sub-architecture when
generating calls.

This commit has added support for global values call but forgot to consider
ARMv4 in the code:

+  if (!GV){
+    CallOpc = isThumb2 ? ARM::tBLXr : ARM::BLX;
+    CalleeReg = getRegForValue(Callee);
+    if (CalleeReg == 0) return false;
+  }

Currently, ARMFastISel::ARMEmitLibcal calls ARMSelectCallOp, which is
implemented similarly:

unsigned ARMFastISel::ARMSelectCallOp(bool UseReg) {                            
  if (UseReg)                                                                   
    return isThumb2 ? ARM::tBLXr : ARM::BLX;                                    
  else                                                                          
    return isThumb2 ? ARM::tBL : ARM::BL;                                       
}

which may need to be adapted to cope with ARMv4 hardware, but also be a bit
smarter about what the target is, not only the operand type.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150917/ccc3338c/attachment.html>


More information about the llvm-bugs mailing list