generate eh_info when vector registers are saved according to the traceback table.
struct eh_info_t {
unsigned version; /* EH info version 0 */
#if defined(64BIT)
char _pad[4]; /* padding */
#endif
unsigned long lsda; /* Pointer to Language Specific Data Area */ unsigned long personality; /* Pointer to the personality routine */
};
the value of lsda and personality is zero when the number of vector registers saved is large zero and there is not personality of the function
I don't feel like this function belong in AsmPrinter.
This function feels more like a PPCFunctionInfo class function.
Admittedly, doing that means in AIXException.cpp, you would need to do an include like this: `#include ../../Target/PowerPC/PPCMachineFunctionInfo.h", which I don't see very often in the llvm source.
Not sure if this is an acceptable practice. @hubert.reinterpretcast any ideas?
The other way of doing this without that weird include in AIXException.cpp would be to move the content in AIXException.cpp to PPCAIXAsmPrinter instead. That way, you will definitely have access to everything you need in the PPCAIXAsmPrinter context.
Other than that, I am not sure if there is a better way on how to encasuplate what's needed for knowing if the vector register is save. i.e. The fundamental issue here is the knowledge of the PPC vector register is in lib/Target/PowerPC directory, so whenever you need to know that knowledge from another directory (and in case, lib/CodeGen/AsmPrinter/AIXException.cpp), it's hard to pass the information in.