Skip to content
  • Henrik Gramner's avatar
    x86inc: Improve XMM-spilling functionality on 64-bit Windows · 585e0199
    Henrik Gramner authored and Henrik Gramner's avatar Henrik Gramner committed
    Prior to this change dealing with the scenario where the number of
    XMM registers spilled depends on if a branch is taken or not was
    complicated to handle well. There was essentially three options:
    
    1) Always spill the largest number of XMM register. Results in
       unnecessary spills.
    
    2) Do the spilling after the branch. Results in code duplication
       for the shared subset of spills.
    
    3) Do the spilling manually. Optimal, but overly complex and vexing.
    
    This adds an additional optional argument to the WIN64_SPILL_XMM
    and WIN64_PUSH_XMM macros to make it possible to allocate space
    for a certain number of registers but initially only push a subset
    of those, with the option of pushing additional register later.
    585e0199