This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Epilogue problems x86
- From: Brian <bblietz at iastate dot edu>
- To: gcc-help at gcc dot gnu dot org
- Date: Thu, 18 Sep 2003 01:14:12 -0500
- Subject: Epilogue problems x86
- Reply-to: bblietz at iastate dot edu
I am trying to insert a label at the end of every function.
Then, I will use this label later when I parse the assembly to
insert a function call
Keep in mind that my approach requires the -S flag for C files.
Then I parse the asm and fix it up, and finally compile the asm file to
an executable or object file.
I search for the EPILOGE_END note using the following:
if(GET_CODE(insn_ptr) == NOTE)
{
if(strcmp("NOTE_INSN_EPILOGUE_BEG", GET_NOTE_INSN_NAME
(NOTE_LINE_NUMBER (insn_ptr))) == 0)
After I see this I use emit_label_before(pattern, insn_ptr)
(I have also tried emit_label_after, and several permutations thereof)
For small files everything is fine and dandy, but for large compiles
I inevitably get an internal error. For example:
samplein.c: In function `initAIFF':
samplein.c:595: internal error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugzilla.redhat.com/bugzilla/> for instructions.
Any ideas on why the compiler bombs here?
Brian