This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Calling gen_nop.
- To: rearnsha at arm dot com
- Subject: Re: Calling gen_nop.
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Thu, 06 Apr 2000 12:27:14 -0600
- cc: gcc at gcc dot gnu dot org
- Reply-To: law at cygnus dot com
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