Fix RISC-V build failure for go language.
authorJim Wilson <jimw@sifive.com>
Thu, 30 May 2019 20:47:12 +0000 (20:47 +0000)
committerJim Wilson <wilson@gcc.gnu.org>
Thu, 30 May 2019 20:47:12 +0000 (13:47 -0700)
gcc/go/
* go-gcc.cc (Gcc_backend::Gcc_backend): Add BUILT_IN_ATOMIC_FETCH_AND_1
and BUILT_IN_ATOMIC_FETCH_OR_1.

From-SVN: r271790

gcc/go/ChangeLog
gcc/go/go-gcc.cc

index 255d3b5df6b19f00eeca8f953341250da0da7d9d..6e8b3a297a0a55047c39c15e2c9170c692e277ac 100644 (file)
@@ -1,3 +1,8 @@
+2019-05-30  Jim Wilson  <jimw@sifive.com>
+
+       * go-gcc.cc (Gcc_backend::Gcc_backend): Add BUILT_IN_ATOMIC_FETCH_AND_1
+       and BUILT_IN_ATOMIC_FETCH_OR_1.
+
 2019-05-16  Cherry Zhang  <cherryyz@google.com>
 
        * go-gcc.cc (Gcc_backend::Gcc_backend): Define atomic builtins.
index 1b26f2bac93943f961ce9c77bc6a35561b7b4816..91043b51463e8670c33f9ae3d665349b420495c7 100644 (file)
@@ -871,6 +871,8 @@ Gcc_backend::Gcc_backend()
                                NULL_TREE);
   this->define_builtin(BUILT_IN_ATOMIC_AND_FETCH_1, "__atomic_and_fetch_1", NULL,
                        t, false, false);
+  this->define_builtin(BUILT_IN_ATOMIC_FETCH_AND_1, "__atomic_fetch_and_1", NULL,
+                       t, false, false);
 
   t = build_function_type_list(unsigned_char_type_node,
                                ptr_type_node,
@@ -879,6 +881,8 @@ Gcc_backend::Gcc_backend()
                                NULL_TREE);
   this->define_builtin(BUILT_IN_ATOMIC_OR_FETCH_1, "__atomic_or_fetch_1", NULL,
                        t, false, false);
+  this->define_builtin(BUILT_IN_ATOMIC_FETCH_OR_1, "__atomic_fetch_or_1", NULL,
+                       t, false, false);
 }
 
 // Get an unnamed integer type.