Module Name:    src
Committed By:   dennis
Date:           Mon Dec 22 21:15:48 UTC 2014

Modified Files:
        src/external/gpl3/gcc/dist/gcc/config/riscv: sync.md
        src/external/gpl3/gcc/lib/libasan: Makefile

Log Message:
Apply a fix, extracted from the UCB RISC-V gcc sources, for the (known)
problems with compiling atomics for the riscv64 target with gcc.  Remove
the now-unneeded workarounds for the 2 files in libasan that were formerly
failing to compile with the optimizer turned on.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/gpl3/gcc/dist/gcc/config/riscv/sync.md
cvs rdiff -u -r1.8 -r1.9 src/external/gpl3/gcc/lib/libasan/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl3/gcc/dist/gcc/config/riscv/sync.md
diff -u src/external/gpl3/gcc/dist/gcc/config/riscv/sync.md:1.1 src/external/gpl3/gcc/dist/gcc/config/riscv/sync.md:1.2
--- src/external/gpl3/gcc/dist/gcc/config/riscv/sync.md:1.1	Fri Sep 19 17:20:29 2014
+++ src/external/gpl3/gcc/dist/gcc/config/riscv/sync.md	Mon Dec 22 21:15:48 2014
@@ -166,7 +166,7 @@
   rtx result = operands[0];
   rtx mem = operands[1];
   rtx model = operands[2];
-  rtx addr = XEXP (mem, 0);
+  rtx addr = force_reg (Pmode, XEXP (mem, 0));
 
   rtx aligned_addr = gen_reg_rtx (Pmode);
   emit_move_insn (aligned_addr, gen_rtx_AND (Pmode, addr, GEN_INT (-4)));

Index: src/external/gpl3/gcc/lib/libasan/Makefile
diff -u src/external/gpl3/gcc/lib/libasan/Makefile:1.8 src/external/gpl3/gcc/lib/libasan/Makefile:1.9
--- src/external/gpl3/gcc/lib/libasan/Makefile:1.8	Tue Dec  2 03:20:39 2014
+++ src/external/gpl3/gcc/lib/libasan/Makefile	Mon Dec 22 21:15:48 2014
@@ -56,10 +56,4 @@ CPPFLAGS.sanitizer_netbsd.cc+=-I${GCCDIS
 LIBDPLIBS+=    stdc++ ${.CURDIR}/../libstdc++-v3
 LIBDPLIBS+=    pthread ${.CURDIR}/../../../../../lib/libpthread
 
-# Work around riscv compiler bugs in (at least) gcc 4.8.3
-.if ${MACHINE_ARCH} == "riscv64"
-COPTS.asan_allocator2.cc += -O0
-COPTS.sanitizer_netbsd.cc += -O0
-.endif
-
 .include <bsd.lib.mk>

Reply via email to