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: define_delay working only when optimization on!


On 18 Mar 2003, Spundun Bhatt wrote:
> I just added a define_delay statement to my machine description file
> (derived from rs6000-2.95.3).

I suggest you use the CVS trunk, updating once in a while when
gcc-regression shows no regressions, carefully saving the tree
before you update.

> It works when I have optimization option like O1 and O2 on. But its not
> working ehn I dont supply any optimization options.
> Does anyone know why is this behavior? This would mean that without O
> options on, the compiler would produce wrong code, not taking care of my
> slotted branches.

No, you need to emit (the equivalence of) "nop" instructions
semi-manually in your port when GCC does not fill delay slots.
This can also happen with -O1 and -O2 (actually "optimized > 0
&& flag_delayed_branch").  See among others the CRIS port and
the SPARC port.  The documentation may need to be improved.
(Please?)

brgds, H-P


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