• Peter Trommler's avatar
    PPC NCG: Fix and refactor TOC handling. · f4b0488d
    Peter Trommler authored
    In a call to a fixed function the TOC does not need to be saved.
    The linker handles TOC saving.
    
    Refactor TOC handling by folding the two functions toc_before and
    toc_after into the code generating the call sequence. This saves
    repeating the case distinction in those two functions.
    
    Test Plan: validate on PowerPC 32-bit Linux and AIX
    
    Reviewers: hvr, simonmar, austin, erikd, bgamari
    
    Reviewed By: bgamari
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D2328
    f4b0488d
CodeGen.hs 77.8 KB