This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Add NOP after store operation
- From: Eric Christopher <echristo at redhat dot com>
- To: Nick Clifton <nickc at redhat dot com>
- Cc: Michael Trimarchi <trimarchi at gandalf dot sssup dot it>, binutils at sources dot redhat dot com
- Date: Fri, 17 Jun 2005 10:57:01 -0700
- Subject: Re: Add NOP after store operation
- References: <42B29DC7.4040903@gandalf.sssup.it> <42B2DCDD.4000804@redhat.com>
> Unless you are programming only in assembler then the answer is "no".
> You must gcc instead. This is because GCC calculates the length of
> branches and uses different instructions depending upon how far away the
> target of the branch is. So if you insert NOPs without gcc knowing
> about it, it will generate code that does not assemble.
>
> If you are restricting yourself to assembler then you should be able to
> contain all the modifications you make just to the tc-arm.c file.
Should probably do both, or flag a warning in gas if there aren't enough
nops there.
The mips port uses this kind of stuff extensively to work around cpu
bugs. You can look at the mips port of gcc and gas for some other ideas
on how to do this.
-eric