diff options
| author | Adrian Bunk <bunk@debian.org> | 2018-08-18 12:29:01 +0300 |
|---|---|---|
| committer | Adrian Bunk <bunk@debian.org> | 2018-08-18 12:29:01 +0300 |
| commit | c9b4a8423c388246fb29c49cda44717cb671bdd6 (patch) | |
| tree | 8666624d7277f0dd146ef497600a2c9f9326651e /library/compiler-builtins | |
| parent | 2fe6c43d1335ca75481ce026df2d9d88b9139dd1 (diff) | |
| download | rust-c9b4a8423c388246fb29c49cda44717cb671bdd6.tar.gz rust-c9b4a8423c388246fb29c49cda44717cb671bdd6.zip | |
Fix __sync_fetch_and_nand_* for pre-v6 ARM
gcc changed semantics for __sync_fetch_and_nand_* in gcc 4.4, and this was implementing the old semantics: https://gcc.gnu.org/onlinedocs/gcc-8.2.0/gcc/_005f_005fsync-Builtins.html
Diffstat (limited to 'library/compiler-builtins')
| -rw-r--r-- | library/compiler-builtins/src/arm_linux.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/library/compiler-builtins/src/arm_linux.rs b/library/compiler-builtins/src/arm_linux.rs index 2291edf9f14..5ed379fa1e2 100644 --- a/library/compiler-builtins/src/arm_linux.rs +++ b/library/compiler-builtins/src/arm_linux.rs @@ -125,9 +125,9 @@ atomic_rmw!(__sync_fetch_and_xor_1, u8, |a: u8, b: u8| a ^ b); atomic_rmw!(__sync_fetch_and_xor_2, u16, |a: u16, b: u16| a ^ b); atomic_rmw!(__sync_fetch_and_xor_4, u32, |a: u32, b: u32| a ^ b); -atomic_rmw!(__sync_fetch_and_nand_1, u8, |a: u8, b: u8| !a & b); -atomic_rmw!(__sync_fetch_and_nand_2, u16, |a: u16, b: u16| !a & b); -atomic_rmw!(__sync_fetch_and_nand_4, u32, |a: u32, b: u32| !a & b); +atomic_rmw!(__sync_fetch_and_nand_1, u8, |a: u8, b: u8| !(a & b)); +atomic_rmw!(__sync_fetch_and_nand_2, u16, |a: u16, b: u16| !(a & b)); +atomic_rmw!(__sync_fetch_and_nand_4, u32, |a: u32, b: u32| !(a & b)); atomic_rmw!(__sync_fetch_and_max_1, i8, |a: i8, b: i8| if a > b { a } else { b }); atomic_rmw!(__sync_fetch_and_max_2, i16, |a: i16, b: i16| if a > b { a } else { b }); |
