[llvm-dev] CFI directives for callee saved registers

Zaara Syeda via llvm-dev llvm-dev at lists.llvm.org
Fri Oct 6 12:55:43 PDT 2017


Hello,

I've made changes to the prologue to not spill callee saved gprs to the 
stack but rather spill them to unused vector registers. I'm not sure how 
to handle this in the cfi directives. Originally, we would use cfi_offset 
to give an offset of where it is saved on the stack.  I tried to instead 
use the cfi_restore directive. As the docs say ".cfi_restore says that the 
rule for Register is now the same as it was at the beginning of the 
function, after all initial instructions added by .cfi_startproc were 
executed." To use this, I need to add new instructions that move the value 
from the vector back into the gpr after the .cfi_startproc section. 
However, when I tried this, the instructions were executed on entry to the 
function before the vector registers have been assigned. How do I add 
these instructions so they appear after .cfi_startproc but are not 
executed on entry to the function? Or is there another approach I need to 
take?

Thanks,
Zaara Syeda

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20171006/666d7814/attachment.html>


More information about the llvm-dev mailing list