GCC backend development
Radu Hobincu
radu.hobincu@arh.pub.ro
Tue Mar 22 14:01:00 GMT 2011
Hello,
I'm trying to write a GCC backend for a custom RISC machine and
suddenly I seems to have a problem while compiling some C++ classes.
After changing some code from all the implementation in the header
file to declaration of the class in the header file and implementation
in the .cpp file, the compiler started asking me for a
STATIC_CHAIN_REGNUM. I'm a bit unfamiliar with this concept and google
didn't really help (altho I found out there's a band called Static
Chain...) so I was wondering if there are some links/ docs that
explain what this does.
Anyway, after declaring the macro and adding/ fixing some rtx
templates in order to load a label into a register, now, when
compiling the cpp file, I get some strange calls to some functions
I've never seen before: __gxx_personality_sj0, _Unwind_SjLj_Resume,
_Unwind_SjLj_Unregister. I'm pretty sure these are functions defined
somewhere in libstdc++ but I have no idea what they do and I don't
know why they suddenly appeared now, after I split the code in
header/implementation.
At the same time, some asm inlines which worked fine before started
givimg me "error: ‘asm’ operand requires impossible reload", but
however still work, as in they generate valid asm inline code.
So, to summarize:
1. what exactly is a static chain?
2. why is that after splitting the code, calls to stdlibc++
suddenly appear, and is there a way to keep them from appearing?
3. is the asm error a fatal error or can I live with it/ fix it?
Thank you in advance,
Radu
More information about the Gcc-help
mailing list