This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Epilogue problems x86


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








Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]