Commit Graph
9 Commits
Author SHA1 Message Date
Karoy Lorentey eb7e1335f8 [NFC] Update copyright notices 2021-08-27 17:13:03 -07:00
Saleem Abdulrasool 67bbf646d8 build: add a CMake based build for Atomics
This adds an initial implementation of a CMake based build system.
2021-04-30 08:32:45 -07:00
Saleem Abdulrasool 7294d12edd _AtomicShims: simplify double word setup
Unify the double word path by using a bit more macro expansion.  The two
differences between 32-bit and 64-bit is:
  - `__uint128_t` vs `uint64_t`
  - 64-bit shifts vs 32-bit shifts

We can simply use a macro to expand out the underlying C type rather
than bifurcating the definitions.  For the second difference, we can
simply use the `__INTPTR_WIDTH__` for the shifts.  We explicitly use
macros for the type-definitions to hide the typedef from Swift.

Use the C11 aggregate constructor to further reduce the code.
2021-04-23 08:24:29 -07:00
Karoy Lorentey df9f811f19 [shims] Remove unnecessary #include 2020-11-18 16:41:58 -08:00
Karoy Lorentey 9ad914d118 Make double-wide atomics conditional on platform support
Linux on x86_64 unfortunately disables support for cmpxchg16 by default, making double-wide atomic operations fall back to using locks. We cannot currently override this on the package level, so stop providing double-wide atomics in this configuration by default.

To enable codegen support for double-wide atomics on Linux/x86_64, compile the package with `-Xcc -mcx16 -Xswiftc -DENABLE_DOUBLEWIDE_ATOMICS`.
2020-10-09 14:52:33 -07:00
Karoy Lorentey 6e09389a3d Revert "[shims] Make retain_n/release_n shims header-only" 2020-10-07 23:57:38 -07:00
Karoy Lorentey 40bd3bac4f [shims] Force-inline new shims 2020-10-06 18:39:11 -07:00
Karoy Lorentey 45fa32a922 [shims] Make retain_n/release_n shims header-only.
Resolves issue #8.
2020-10-06 18:00:10 -07:00
Karoy Lorentey b97750eb18 Initial commit. 2020-10-01 16:57:36 -07:00