This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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]

Re: [v3] atomics


On Mon, Apr 21, 2008 at 02:39:15PM -0500, Benjamin Kosnik wrote:
> That's possible, but certainly more work than just assuming that if the
> __sync builtins are implemented, they are implemented for the entire
> set of sizes. (This is only coming up now because libstdc++ only used
> the atomic word size up until recently. It looks like libgfortran is
> is also only checking for int in LIBGFOR_CHECK_SYNC_FETCH_AND_ADD.)

Assuming you have full set of sizes is bad.  While backends can implement
smaller sizes by using large atomics, if the hw has no support for large
sizes, it is nothing that can be worked around in the backends.
Consider e.g. i486, which supports 1/2/4 byte __sync_val_compare_and_swap,
but doesn't support 8 byte (long long), similarly ppc 32-bit.

	Jakub


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