[PATCH target/86811] Mark VAX as not needing speculation barriers

Segher Boessenkool segher@kernel.crashing.org
Thu Oct 3 10:34:00 GMT 2019


On Thu, Oct 03, 2019 at 03:12:34AM +0100, Maciej W. Rozycki wrote:
> On Fri, 20 Sep 2019, Jeff Law wrote:
> 
> > > According to Bob Supnik (who is a very authoritative source on VAX),
> > > 
> > >> Funny you should ask. The short answer is no. No VAX ever did
> > >> speculative or out of order execution.
> > > 
> > > As such, marking VAX as not needing speculation barriers.
> > > 
> > > 
> > > 	PR target/86811
> > > 	* config/vax/vax.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
> > > 	Define to speculation_safe_value_not_needed.
> > Installed on the trunk.
> 
>  I don't think this is right.  As I have just mentioned in a related 
> discussion elsewhere, the NVAX and NVAX+ implementations include a branch 
> predictor in their microarchitecture[1], so obviously they do execute 
> speculatively.  I think this change would best be reverted and the issue 
> further investigated.
> 
> References:
> 
> [1] G. Michael Uhler et al, "The NVAX and NVAX+ High-performance VAX
>     Microprocessors", Digital Technical Journal Vol. 4 No. 3 Summer 1992
>     <ftp://ftp.linux-mips.org/pub/linux/mips/people/macro/DEC/DTJ/DTJ701/DTJ701PF.PDF>

As that article explains, the NVAX does *not* execute speculatively.  You
can have branch prediction without speculative execution just fine.  It
is beneficial, too, because this hides the fetch latency when a branch is
predicted correctly.

When a (conditional) branch executes, it is detected if the branch was
mispredicted, and if so it (and everything after it) is flushed.  This is
similar to how it was done on the PowerPC 6xx CPUs, or on the original
Pentium, etc.


Segher



More information about the Gcc-patches mailing list