Calling gen_nop.
Richard Earnshaw
rearnsha@arm.com
Thu Apr 6 08:25:00 GMT 2000
The new arm backend is currently failing g++.law.profile1.C because
toplev.c is trying to output a NOP at the start of the file, but is trying
to do so without generating RTL. With the new ARM back-end this fails
because what we output is dependent on whether we are generating ARM or
Thumb code (and this breaks an assumption here that a NOP is a NOP is a
NOP and will always be the same). The result is that the compiler aborts
in get_insn_template.
The code in question is in compile_file() and reads:
if (profile_flag || profile_block_flag)
{
/* It's best if we can write a nop here since some
assemblers don't tolerate zeros in the text section. */
output_asm_insn (get_insn_template (CODE_FOR_nop, NULL), NULL_PTR);
}
Is it safe to call gen_nop() here to create a real insn? If so, what, if
anything, will I need to reset after emitting the insn? Is there a better
way of solving this?
R.
More information about the Gcc
mailing list