This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: nops
- 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: <167204.32684.qm@web111614.mail.gq1.yahoo.com>
Jamie Prescott <jpresss@yahoo.com> 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.
Ian