This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
RE: [PATCH ARM] Enable __sync_* tests for arm-*-linux-gnueabi, and fix resulting ARM failures.
- From: "Marcus Shawcroft" <marcus dot shawcroft at arm dot com>
- To: <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 6 Aug 2010 16:02:07 +0100
- Subject: RE: [PATCH ARM] Enable __sync_* tests for arm-*-linux-gnueabi, and fix resulting ARM failures.
- References: <000a01cb3574$6ce58250$46b086f0$@shawcroft@arm.com>
Ooops, missed the ChangeLog entry for the testsuite:
2010-08-03 Marcus Shawcroft <marcus.shawcroft@arm.com>
* lib/target-supports.exp: (check_effective_target_sync_int_long):
Add arm*-*-linux-gnueabi.
(check_effective_target_sync_char_short): Add arm*-*-linux-gnueabi.
> -----Original Message-----
> From: gcc-patches-owner@gcc.gnu.org [mailto:gcc-patches-
> owner@gcc.gnu.org] On Behalf Of Marcus Shawcroft
> Sent: 06 August 2010 15:34
> To: gcc-patches@gcc.gnu.org
> Subject: [PATCH ARM] Enable __sync_* tests for arm-*-linux-gnueabi, and
> fix resulting ARM failures.
>
> This patch enables the existing __sync_* builtin test cases for
> arm-*-linux-gnueabi and fixes two issues exposed in the ARM
> implementation.
>
> The first issue was highlighted by Ramana (
> http://gcc.gnu.org/ml/gcc-patches/2010-07/msg01585.html ). The
> sync_nand_
> operation should implement *mem = ~ (*mem & new_value) but actually
> implements *mem = (~ *mem) & new_value. The second issue exposed is
> that all
> of the __sync_* builtins introduce inappropriate sign extension for 8
> and 16
> bit primitives. This behaviour is normally masked for 8 bit primitives
> because 'char' is unsigned by default on ARM.
>
> Tested on ARM QEMU no regressions.
>
> 2010-08-03 Marcus Shawcroft <marcus.shawcroft@arm.com>
>
> * config/arm/linux-atomic.c (SUBWORD_VAL_CAS): Instantiate with
> 'unsigned short' and 'unsigned char' instead of 'short' and
> 'char'.
> (SUBWORD_BOOL_CAS): Likewise.
> (SUBWORD_SYNC_OP): Likewise.
> (SUBWORD_TEST_AND_SET): Likewise.
> (FETCH_AND_OP_WORD): Parenthesise INF_OP
> (SUBWORD_SYNC_OP): Likewise.
> (OP_AND_FETCH_WORD): Likewise.
>
> /Marcus