Skip to content
  1. Dec 12, 2009
  2. Nov 24, 2009
  3. Nov 17, 2009
  4. Nov 16, 2009
    • Jeffrey Yasskin's avatar
      Make X86-64 in the Large model always emit 64-bit calls. · 10d3604a
      Jeffrey Yasskin authored
      The large code model is documented at
      http://www.x86-64.org/documentation/abi.pdf and says that calls should
      assume their target doesn't live within the 32-bit pc-relative offset
      that fits in the call instruction.
      
      To do this, we turn off the global-address->target-global-address
      conversion in X86TargetLowering::LowerCall(). The first attempt at
      this broke the lazy JIT because it can separate the movabs(imm->reg)
      from the actual call instruction. The lazy JIT receives the address of
      the movabs as a relocation and needs to record the return address from
      the call; and then when that call happens, it needs to patch the
      movabs with the newly-compiled target. We could thread the call
      instruction into the relocation and record the movabs<->call mapping
      explicitly, but that seems to require at least as much new
      complication in the code generator as this change.
      
      To fix this, we make lazy functions _always_ go through a call
      stub. You'd think we'd only have to force lazy calls through a stub on
      difficult platforms, but that turns out to break indirect calls
      through a function pointer. The right fix for that is to distinguish
      between calls and address-of operations on uncompiled functions, but
      that's complex enough to leave for someone else to do.
      
      Another attempt at this defined a new CALL64i pseudo-instruction,
      which expanded to a 2-instruction sequence in the assembly output and
      was special-cased in the X86CodeEmitter's emitInstruction()
      function. That broke indirect calls in the same way as above.
      
      This patch also removes a hack forcing Darwin to the small code model.
      Without far-call-stubs, the small code model requires things of the
      JITMemoryManager that the DefaultJITMemoryManager can't provide.
      
      Thanks to echristo for lots of testing!
      
      llvm-svn: 88984
      10d3604a
  5. Nov 14, 2009
  6. Nov 13, 2009
  7. Nov 12, 2009
  8. Nov 11, 2009
  9. Nov 09, 2009
  10. Oct 28, 2009
  11. Oct 27, 2009
  12. Oct 24, 2009
    • Jeffrey Yasskin's avatar
      Fix http://llvm.org/PR4822: allow module deletion after a function has been · d0fc8f80
      Jeffrey Yasskin authored
      compiled.
      
      When functions are compiled, they accumulate references in the JITResolver's
      stub maps. This patch removes those references when the functions are
      destroyed.  It's illegal to destroy a Function when any thread may still try to
      call its machine code.
      
      This patch also updates r83987 to use ValueMap instead of explicit CallbackVHs
      and fixes a couple "do stuff inside assert()" bugs from r84522.
      
      llvm-svn: 84975
      d0fc8f80
  13. Oct 20, 2009
  14. Oct 19, 2009
  15. Oct 15, 2009
  16. Oct 14, 2009
  17. Oct 13, 2009
  18. Oct 10, 2009
  19. Oct 06, 2009
  20. Aug 13, 2009
  21. Aug 05, 2009
  22. Jul 31, 2009
  23. Jul 30, 2009
  24. Jul 25, 2009
  25. Jul 24, 2009
  26. Jul 23, 2009
  27. Jul 18, 2009
  28. Jul 15, 2009
Loading