This is the mail archive of the gcc-bugs@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]
Other format: [Raw text]

[Bug target/68945] enable libcilkrts on SPARC


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68945

Rainer Orth <ro at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #38221|0                           |1
        is obsolete|                            |
  Attachment #38413|0                           |1
        is obsolete|                            |

--- Comment #10 from Rainer Orth <ro at gcc dot gnu.org> ---
Created attachment 38451
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38451&action=edit
Revised patch

Here's a version of the patch that is, I believe, ready for upstream
submission.

It's based on the upstream version as has just been merged into the gcc repo.

Compared to the previous sparcv9 support, the assertions are gone to allow for
an easier read.

I've also replaced the times(3C) based implementation of __cilkrts_getticks by
one reading %tick directly, which should work on all UltraSPARC CPUs,
independent
of O/S.

I've replaced the _GNU_SOURCE guard around runtime/sysdep-unix.c
(get_runtime_path) around the use dladdr
by the result of a configure check.  The previous version had been wrong (just
defining _GNU_SOURCE) doesn't suddently materialize dladdr), and the function 
is present in Solaris libc.

Perhaps Eric could have a look at the SPARC assembler code to double-check that
I got it right:

* In runtime/config/sparc/os-unix-sysdep.c (__cilkrts_getticks) I needed
different
  32- and 64-bit versions.  I tested the result in standalone program which
just
  printed the result.

* One thing I wonder about is runtime/config/sparc/os-fence.h: when using
  __sync_synchronize, gcc emits membar #StoreLoad, while Stefan's patch had
  membar    #LoadLoad | #LoadStore | #StoreStore | #StoreLoad.  It seems that
  all but #StoreLoad are no-ops for TSO SPARC CPUs, but I'd better get this
right.

I also believe that only so little of Stefan's code is left
(__cilkrts_short_pause mostly) to not require a separate assignement for
upstream submission.  If I'm mistaken, we'd better get that ball rolling.

  Rainer

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