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]

Re: Multiple jumps in one instruction



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.





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