Calling gen_nop.
Jeffrey A Law
law@cygnus.com
Thu Apr 6 11:28:00 GMT 2000
In message < 200004061525.QAA16250@cam-mail2.cambridge.arm.com >you write:
> 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?
Ugh. Gross.
Anyway, you can probably deal with this with something like
(define_insn "nop"
[(clobber (const_int 0))]
""
"*
{
if (TARGET_ARM)
return "mov%?\\t%|r0, %|r0\\t%@ nop";
else
return "mov\\tr8, r8";
})
I'd consider it a band-aid since we'd really like a better way to deal with
this problem.
jeff
More information about the Gcc
mailing list