This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: define_delay working only when optimization on!
- From: Hans-Peter Nilsson <hp at bitrange dot com>
- To: Spundun Bhatt <spundun at ISI dot EDU>
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 18 Mar 2003 21:35:48 -0500 (EST)
- Subject: 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