[LLVMbugs] [Bug 917] NEW: Fix PowerPC function stub generation for distant functions

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Wed Sep 20 10:39:54 PDT 2006


           Summary: Fix PowerPC function stub generation for distant
           Product: libraries
           Version: 1.5
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Backend: PowerPC
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: sabre at nondot.org

In the JIT, stubs are currently used for two purposes:  1. lazy compilation of functions, and 2. calls to 
functions that are beyond the branch displacement supported by the target.

Currently, the target-independent code that runs the JIT (in JIT/JITEmitter.cpp) manages stub 
generation for 2) for the PPC backend.  It does this with the "DoesntNeedStub" mechanism.  This is 
broken for a couple of reasons.  First, this probably breaks the ELF/macho writers, which have to deal 
with this stuff in totally different ways.  Second, this breaks clients that take random function pointers 
and stuff them into the global mapping.

A better solution for 2) would be to have the target JIT-specific "relocate" method emit function stubs if 
the relocation is out of range.  This gets the code for 2) into the target-specific JIT code, where it 
belongs, fixing both #1 and #2.


------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.

More information about the llvm-bugs mailing list