[RTL]--emit lib call got error

Jim Wilson wilson@specifixinc.com
Tue Jun 8 06:01:00 GMT 2004


Íõ ÒÝ wrote:
> emit_library_call(gen_rtx(SYMBOL_REF, Pmode, "my_function_1"), LCT_NORMAL, SImode, 1, GEN_INT(0), SImode);
> trying to pass an argument(integer 0) to the emitted lib call, I got some error.

There isn't enough info to determine what the problem is.  It isn't
clear what change you made to the compiler, or what error you got.  The
given emit_library_call line looks reasonable, so the problem may be
that you didn't do something else that was necessary.  But since I don't
know exactly what patch you added, it is difficult for me to comment on
that.

If you think there is something wrong with the emit_lib_call_value_1
call, then put a breakpoint there in gdb and step through it to see what
happens.

> //program halted here and I pressed ctrl+c

Are you sure the program halted here?  Maybe it is just slow?

> 0x08231ed2 in ggc_alloc (size=1226062116) at /home/ups/src/gcc-3.4.0-patched/gcc/ggc-page.c:1205
> 1205    }

This indicates a possible garbage collection problem.  Maybe your
SYMBOL_REF is live across a garbage collection point, and has not been
marked as reachable from any GC root?  Putting it in libfunc_table would
solve this.

By the way, there is already an option to emit a function call in every
function.  See the documentation for the -finstrument-functions option.
-- 
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com



More information about the Gcc mailing list