This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Multiple jumps in one instruction
- To: jsm28 at cam dot ac dot uk (Joseph S. Myers)
- Subject: Re: Multiple jumps in one instruction
- From: Joe Buck <jbuck at synopsys dot COM>
- Date: Fri, 25 May 2001 12:27:35 -0700 (PDT)
- Cc: jonathan at buzzard dot org dot uk (Jonathan Buzzard), gcc at gcc dot gnu dot org
On Fri, 25 May 2001, Jonathan Buzzard wrote:
> > For example if I had a line like
> >
> > a = func1(n)+func2(n);
> >
> > I would want to compile this into a single jump instruction that goes
> > to two places. Think of it as hardware multi-threading and you should
> > get the idea.
Joseph S. Myers writes:
> Note that the ISO C committee ruled that function calls do not overlap;
> see DR#087. So it would be inappropriate for GCC to execute functions in
> parallel even if there isn't a sequence point between them.
However, there's always the rule that trumps all others: if you can't
build a conforming program that can tell the difference, you can do it.
So, if you can assure that func1 and func2 don't have any side effects
that collide in a way that makes it evident to an observer that the
execution was interleaved, you can execute them in parallel.