This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: nops


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]