Browse Source

Bump GCC to 5.3.0

There was one change required here: support for "MEMMODEL_SYNC_*".  This
very long  GCC post <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65697>
talks about the formalization of the C++ memory model.  It looks like
this is it to allow for some ARM stupidity where they can speculatively
issue some memory operations.

As far as I can tell, the right thing to do here is to just treat the
SYNC versions the same as the non-SYNC versions -- this is the same
thing ia64 and rs600 do.  I can't find "MEMMODEL_SYNC" anywhere else
interesting, so there might be some flag to set to avoid doing this, but
I couldn't find it.
pull/111/head
Palmer Dabbelt 10 years ago
parent
commit
cc5321b5a3
  1. 2
      Makefile.in
  2. 3
      gcc/gcc/config/riscv/sync.md

2
Makefile.in

@ -3,7 +3,7 @@ builddir := @abs_top_builddir@
INSTALL_DIR := @prefix@
PACKAGES := binutils gcc glibc newlib
gcc_version := 5.2.0
gcc_version := 5.3.0
binutils_version := 2.25.1
glibc_version := 2.22
newlib_version := 2.2.0

3
gcc/gcc/config/riscv/sync.md

@ -55,12 +55,15 @@
switch (INTVAL (operands[1]))
{
case MEMMODEL_SEQ_CST:
case MEMMODEL_SYNC_SEQ_CST:
case MEMMODEL_ACQ_REL:
return "fence rw,rw";
case MEMMODEL_ACQUIRE:
case MEMMODEL_SYNC_ACQUIRE:
case MEMMODEL_CONSUME:
return "fence r,rw";
case MEMMODEL_RELEASE:
case MEMMODEL_SYNC_RELEASE:
return "fence rw,w";
default:
gcc_unreachable();

Loading…
Cancel
Save