This is the mail archive of the
mailing list for the GCC project.
- From: Ian Lance Taylor <iant at google dot com>
- To: Jamie Prescott <jpresss at yahoo dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 20 May 2009 21:50:50 -0700
- Subject: Re: nops
- References: <email@example.com>
Jamie Prescott <firstname.lastname@example.org> writes:
> Under which conditions GCC generates nops?
It depends entirely on the target. For many targets, gcc will never
generate a nop instruction, except as a byproduct of alignment.
> I noticed that with 4.4.0, gen_nop() is required, thing that wasn't with 4.3.3.
> Can I just define an empty insn for nop, of GCC requires a one-byte insn for its
> own alignment purposes?
Normally gcc does alignment by issuing an assembler directive, and the
assembler is responsible for generating nop instructions when necessary.