[Bug target/99977] arm: ICE with __sync_bool_compare_and_swap and -mcpu=cortex-m23

2022-04-06 Thread acoplan at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99977 Alex Coplan changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED

[Bug target/99977] arm: ICE with __sync_bool_compare_and_swap and -mcpu=cortex-m23

2022-04-06 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
: Wed Apr 6 11:16:10 2022 +0100 arm: Fix ICEs with compare-and-swap and -march=armv8-m.base [PR99977] The PR shows two ICEs with __sync_bool_compare_and_swap and -mcpu=cortex-m23 (equivalently, -march=armv8-m.base): one in LRA and one later on, after the CAS insn is split

[Bug target/103066] __sync_val_compare_and_swap/__sync_bool_compare_and_swap aren't optimized

2021-11-06 Thread thiago at kde dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103066 --- Comment #10 from Thiago Macieira --- You're right that emitting more penalises those who have done their job and written proper code. The problem we're seeing is that such code appears to be the minority. Or, maybe put differently, the bad

[Bug target/103066] __sync_val_compare_and_swap/__sync_bool_compare_and_swap aren't optimized

2021-11-05 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103066 --- Comment #9 from Jonathan Wakely --- I don't know what the assembly code does sorry, but it's not permitted to store to the 'expected' value unless the atomic variable is not equal to it. It looks like this would update the 'expected' value

[Bug target/103066] __sync_val_compare_and_swap/__sync_bool_compare_and_swap aren't optimized

2021-11-05 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103066 --- Comment #8 from Jakub Jelinek --- (In reply to H.J. Lu from comment #7) > Instead of generating: > > movlf(%rip), %eax > .L2: > movd%eax, %xmm0 > addss .LC0(%rip), %xmm0 > movd%xmm0, %edx > lock

[Bug target/103066] __sync_val_compare_and_swap/__sync_bool_compare_and_swap aren't optimized

2021-11-05 Thread hjl.tools at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103066 --- Comment #7 from H.J. Lu --- Instead of generating: movlf(%rip), %eax .L2: movd%eax, %xmm0 addss .LC0(%rip), %xmm0 movd%xmm0, %edx lock cmpxchgl %edx, f(%rip) jne .L2

[Bug target/103066] __sync_val_compare_and_swap/__sync_bool_compare_and_swap aren't optimized

2021-11-05 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103066 --- Comment #6 from Jakub Jelinek --- E.g. the builtin is often used in a loop where the user does his own atomic load first and decides what to do based on that. Say for float f; void foo () { #pragma omp atomic f += 3.0f; } with -O2

[Bug target/103066] __sync_val_compare_and_swap/__sync_bool_compare_and_swap aren't optimized

2021-11-05 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103066 Jakub Jelinek changed: What|Removed |Added CC||redi at gcc dot gnu.org,

[Bug target/103066] __sync_val_compare_and_swap/__sync_bool_compare_and_swap aren't optimized

2021-11-05 Thread hjl.tools at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103066 --- Comment #4 from H.J. Lu --- (In reply to Jakub Jelinek from comment #3) > If by fail you mean that it doesn't update the memory if the memory isn't > equal to expected, sure, but do you mean it can fail spuriously, not update > the memory

[Bug target/103066] __sync_val_compare_and_swap/__sync_bool_compare_and_swap aren't optimized

2021-11-05 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103066 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment

[Bug target/103066] __sync_val_compare_and_swap/__sync_bool_compare_and_swap aren't optimized

2021-11-05 Thread hjl.tools at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103066 H.J. Lu changed: What|Removed |Added Status|UNCONFIRMED |NEW Ever confirmed|0

[Bug target/103066] __sync_val_compare_and_swap/__sync_bool_compare_and_swap aren't optimized

2021-11-04 Thread wwwhhhyyy333 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103066 --- Comment #1 from Hongyu Wang --- __sync_val_compare_and_swap will be expanded to atomic_compare_exchange_strong by default, should we restrict the check and return under atomic_compare_exchange_weak which is allowed to fail spuriously?

[Bug target/103066] New: __sync_val_compare_and_swap/__sync_bool_compare_and_swap aren't optimized

2021-11-03 Thread hjl.tools at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103066 Bug ID: 103066 Summary: __sync_val_compare_and_swap/__sync_bool_compare_and_sw ap aren't optimized Product: gcc Version: 12.0 Status: UNCONFIRMED Severity:

[Bug target/99977] arm: ICE with __sync_bool_compare_and_swap and -mcpu=cortex-m23

2021-05-20 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
: Tue Apr 27 14:56:15 2021 +0100 arm: Fix ICEs with compare-and-swap and -march=armv8-m.base [PR99977] The PR shows two ICEs with __sync_bool_compare_and_swap and -mcpu=cortex-m23 (equivalently, -march=armv8-m.base): one in LRA and one later on, after the CAS insn is split

[Bug target/99977] arm: ICE with __sync_bool_compare_and_swap and -mcpu=cortex-m23

2021-05-19 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99977 --- Comment #8 from CVS Commits --- The releases/gcc-11 branch has been updated by Christophe Lyon : https://gcc.gnu.org/g:c412100235ba34ae9c133fb7a77cc52c2e93fc87 commit r11-8435-gc412100235ba34ae9c133fb7a77cc52c2e93fc87 Author: Christophe

[Bug target/99977] arm: ICE with __sync_bool_compare_and_swap and -mcpu=cortex-m23

2021-05-19 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99977 --- Comment #7 from CVS Commits --- The master branch has been updated by Christophe Lyon : https://gcc.gnu.org/g:beeb01541ae845b445837b873126a7f968b8f654 commit r12-922-gbeeb01541ae845b445837b873126a7f968b8f654 Author: Christophe Lyon Date:

[Bug target/99977] arm: ICE with __sync_bool_compare_and_swap and -mcpu=cortex-m23

2021-05-17 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
: Tue Apr 27 14:56:15 2021 +0100 arm: Fix ICEs with compare-and-swap and -march=armv8-m.base [PR99977] The PR shows two ICEs with __sync_bool_compare_and_swap and -mcpu=cortex-m23 (equivalently, -march=armv8-m.base): one in LRA and one later on, after the CAS insn is split

[Bug target/99977] arm: ICE with __sync_bool_compare_and_swap and -mcpu=cortex-m23

2021-04-27 Thread acoplan at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99977 --- Comment #5 from Alex Coplan --- Fixed for trunk so far, needs backports.

[Bug target/99977] arm: ICE with __sync_bool_compare_and_swap and -mcpu=cortex-m23

2021-04-27 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
Apr 27 14:56:15 2021 +0100 arm: Fix ICEs with compare-and-swap and -march=armv8-m.base [PR99977] The PR shows two ICEs with __sync_bool_compare_and_swap and -mcpu=cortex-m23 (equivalently, -march=armv8-m.base): one in LRA and one later on, after the CAS insn is split. The LRA

[Bug target/99977] arm: ICE with __sync_bool_compare_and_swap and -mcpu=cortex-m23

2021-04-09 Thread acoplan at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99977 Alex Coplan changed: What|Removed |Added Assignee|unassigned at gcc dot gnu.org |acoplan at gcc dot gnu.org Last

[Bug target/99977] arm: ICE with __sync_bool_compare_and_swap and -mcpu=cortex-m23

2021-04-08 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99977 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment #2

[Bug target/99977] arm: ICE with __sync_bool_compare_and_swap and -mcpu=cortex-m23

2021-04-08 Thread acoplan at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99977 --- Comment #1 from Alex Coplan --- I should have mentioned the testcase was reduced from gcc.dg/ia64-sync-3.c.

[Bug target/99977] New: arm: ICE with __sync_bool_compare_and_swap and -mcpu=cortex-m23

2021-04-08 Thread acoplan at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99977 Bug ID: 99977 Summary: arm: ICE with __sync_bool_compare_and_swap and -mcpu=cortex-m23 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal

[Bug target/90724] ICE with __sync_bool_compare_and_swap with -march=armv8.2-a+sve

2020-04-22 Thread cvs-commit at gcc dot gnu.org
Vieira Date: Thu Apr 16 10:16:19 2020 +0100 re PR target/90724 (ICE with __sync_bool_compare_and_swap with -march=armv8.2-a+sve) 2020-04-16 Andre Vieira Backport from mainline 2019-08-21 Prathamesh Kulkarni PR target/90724

[PATCH 19/19][GCC-8] re PR target/90724 (ICE with __sync_bool_compare_and_swap with -march=armv8.2-a+sve)

2020-04-16 Thread Andre Vieira (lists)
2020-04-16  Andre Vieira     Backport from mainline     2019-08-21  Prathamesh Kulkarni     PR target/90724     * config/aarch64/aarch64.c (aarch64_gen_compare_reg_maybe_ze): Force y     in reg if it fails aarch64_plus_operand predicate. diff --git a/gcc/config/aarch64/aarch64.c

[Bug target/90724] ICE with __sync_bool_compare_and_swap with -march=armv8.2-a+sve

2020-02-18 Thread rsandifo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90724 rsandifo at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED

[Bug target/90724] ICE with __sync_bool_compare_and_swap with -march=armv8.2-a+sve

2020-02-18 Thread cvs-commit at gcc dot gnu.org
Kulkarni Date: Wed Aug 21 18:34:43 2019 + re PR target/90724 (ICE with __sync_bool_compare_and_swap with -march=armv8.2-a+sve) 2020-02-18 Richard Sandiford gcc/ Backport from mainline 2019-08-21 Prathamesh Kulkarni PR target/90724 * config

[Bug target/90724] ICE with __sync_bool_compare_and_swap with -march=armv8.2-a+sve

2019-11-22 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90724 Eric Gallager changed: What|Removed |Added Target Milestone|--- |9.4 --- Comment #4 from Eric Gallager

Re: PR90724 - ICE with __sync_bool_compare_and_swap with -march=armv8.2-a

2019-09-09 Thread Prathamesh Kulkarni
gt; > > > > > > > > Hi Prathamesh > > > > > > > > > > > > > > > > On 7/10/19 12:24 PM, Prathamesh Kulkarni wrote: > > > > > > > > > Hi, > > > > > > > > > For following test-ca

[Bug target/90724] ICE with __sync_bool_compare_and_swap with -march=armv8.2-a+sve

2019-08-22 Thread prathamesh3492 at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90724 --- Comment #3 from prathamesh3492 at gcc dot gnu.org --- (In reply to Eric Gallager from comment #2) > (In reply to prathamesh3492 from comment #1) > > Author: prathamesh3492 > > Date: Wed Aug 21 18:34:43 2019 > > New Revision: 274805 > > > >

[Bug target/90724] ICE with __sync_bool_compare_and_swap with -march=armv8.2-a+sve

2019-08-22 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90724 --- Comment #2 from Eric Gallager --- (In reply to prathamesh3492 from comment #1) > Author: prathamesh3492 > Date: Wed Aug 21 18:34:43 2019 > New Revision: 274805 > > URL: https://gcc.gnu.org/viewcvs?rev=274805=gcc=rev > Log: > 2019-08-21

RE: PR90724 - ICE with __sync_bool_compare_and_swap with -march=armv8.2-a

2019-08-21 Thread JiangNing OS
gt; Subject: RE: PR90724 - ICE with __sync_bool_compare_and_swap with - > march=armv8.2-a > > > -Original Message- > > From: gcc-patches-ow...@gcc.gnu.org On > > Behalf Of Prathamesh Kulkarni > > Sent: Thursday, August 22, 2019 2:36 AM > > To: James Greenhalgh >

RE: PR90724 - ICE with __sync_bool_compare_and_swap with -march=armv8.2-a

2019-08-21 Thread JiangNing OS
> -Original Message- > From: gcc-patches-ow...@gcc.gnu.org On > Behalf Of Prathamesh Kulkarni > Sent: Thursday, August 22, 2019 2:36 AM > To: James Greenhalgh > Cc: gcc Patches ; Richard Sandiford > ; Kyrill Tkachov ; > nd > Subject: Re: PR90724 - ICE with _

Re: PR90724 - ICE with __sync_bool_compare_and_swap with -march=armv8.2-a

2019-08-21 Thread Prathamesh Kulkarni
> > > > > > > > > > > On Wed, 17 Jul 2019 at 13:45, Kyrill Tkachov > > > > > > wrote: > > > > > > > > > > > > > > Hi Prathamesh > > > > > > > > > > > > > > On 7/10/19 12:24 PM, Prathamesh

[Bug target/90724] ICE with __sync_bool_compare_and_swap with -march=armv8.2-a+sve

2019-08-21 Thread prathamesh3492 at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90724 --- Comment #1 from prathamesh3492 at gcc dot gnu.org --- Author: prathamesh3492 Date: Wed Aug 21 18:34:43 2019 New Revision: 274805 URL: https://gcc.gnu.org/viewcvs?rev=274805=gcc=rev Log: 2019-08-21 Prathamesh Kulkarni PR

Re: PR90724 - ICE with __sync_bool_compare_and_swap with -march=armv8.2-a

2019-08-19 Thread James Greenhalgh
; > > > > > > > Hi Prathamesh > > > > > > > > > > > > On 7/10/19 12:24 PM, Prathamesh Kulkarni wrote: > > > > > > > Hi, > > > > > > > For following test-case, > > > > > > > stati

Re: PR90724 - ICE with __sync_bool_compare_and_swap with -march=armv8.2-a

2019-08-15 Thread Prathamesh Kulkarni
rote: > > > > > > Hi, > > > > > > For following test-case, > > > > > > static long long AL[24]; > > > > > > > > > > > > int > > > > > > check_ok (void) > > > > > > { > > >

Re: PR90724 - ICE with __sync_bool_compare_and_swap with -march=armv8.2-a

2019-08-07 Thread Prathamesh Kulkarni
v > > > wrote: > > > > > > > > Hi Prathamesh > > > > > > > > On 7/10/19 12:24 PM, Prathamesh Kulkarni wrote: > > > > > Hi, > > > > > For following test-case, > > > > > static long long AL[24]; > >

Re: PR90724 - ICE with __sync_bool_compare_and_swap with -march=armv8.2-a

2019-08-01 Thread Prathamesh Kulkarni
> On 7/10/19 12:24 PM, Prathamesh Kulkarni wrote: > > > > Hi, > > > > For following test-case, > > > > static long long AL[24]; > > > > > > > > int > > > > check_ok (void) > > > > { > > > > return (__sync_bo

Re: PR90724 - ICE with __sync_bool_compare_and_swap with -march=armv8.2-a

2019-07-25 Thread Prathamesh Kulkarni
> static long long AL[24]; > > > > > > int > > > check_ok (void) > > > { > > > return (__sync_bool_compare_and_swap (AL+1, 0x20003ll, > > > 0x1234567890ll)); > > > } > > > > > > Compilin

Re: PR90724 - ICE with __sync_bool_compare_and_swap with -march=armv8.2-a

2019-07-17 Thread Prathamesh Kulkarni
On Wed, 17 Jul 2019 at 13:45, Kyrill Tkachov wrote: > > Hi Prathamesh > > On 7/10/19 12:24 PM, Prathamesh Kulkarni wrote: > > Hi, > > For following test-case, > > static long long AL[24]; > > > > int > > check_ok (void) > > { > >

Re: PR90724 - ICE with __sync_bool_compare_and_swap with -march=armv8.2-a

2019-07-17 Thread Kyrill Tkachov
Hi Prathamesh On 7/10/19 12:24 PM, Prathamesh Kulkarni wrote: Hi, For following test-case, static long long AL[24]; int check_ok (void) {   return (__sync_bool_compare_and_swap (AL+1, 0x20003ll, 0x1234567890ll)); } Compiling with -O2 -march=armv8.2-a results in: pr90724.c: In function

Re: PR90724 - ICE with __sync_bool_compare_and_swap with -march=armv8.2-a

2019-07-17 Thread Prathamesh Kulkarni
On Wed, 10 Jul 2019 at 16:54, Prathamesh Kulkarni wrote: > > Hi, > For following test-case, > static long long AL[24]; > > int > check_ok (void) > { > return (__sync_bool_compare_and_swap (AL+1, 0x20003ll, 0x1234567890ll)); > } > > Compiling with -O2 -mar

PR90724 - ICE with __sync_bool_compare_and_swap with -march=armv8.2-a

2019-07-10 Thread Prathamesh Kulkarni
Hi, For following test-case, static long long AL[24]; int check_ok (void) { return (__sync_bool_compare_and_swap (AL+1, 0x20003ll, 0x1234567890ll)); } Compiling with -O2 -march=armv8.2-a results in: pr90724.c: In function ‘check_ok’: pr90724.c:7:1: error: unrecognizable insn: 7

[Bug target/90724] New: ICE with __sync_bool_compare_and_swap with -march=armv8.2-a+sve

2019-06-03 Thread prathamesh3492 at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90724 Bug ID: 90724 Summary: ICE with __sync_bool_compare_and_swap with -march=armv8.2-a+sve Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal

[Bug target/58490] __sync_bool_compare_and_swap sign bit failure

2018-12-20 Thread rearnsha at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58490 Richard Earnshaw changed: What|Removed |Added Status|WAITING |RESOLVED Resolution|---

[Bug target/69644] ICE with -O on __sync_bool_compare_and_swap with short in extract_insn, at recog.c:2286

2016-02-04 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69644 --- Comment #6 from Jakub Jelinek --- Author: jakub Date: Thu Feb 4 13:59:27 2016 New Revision: 233139 URL: https://gcc.gnu.org/viewcvs?rev=233139=gcc=rev Log: Backported from mainline 2016-02-03 Jakub Jelinek

[Bug target/69644] ICE with -O on __sync_bool_compare_and_swap with short in extract_insn, at recog.c:2286

2016-02-04 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69644 --- Comment #5 from Jakub Jelinek --- Author: jakub Date: Thu Feb 4 13:58:21 2016 New Revision: 233138 URL: https://gcc.gnu.org/viewcvs?rev=233138=gcc=rev Log: Backported from mainline 2016-02-03 Jakub Jelinek

[Bug target/69644] ICE with -O on __sync_bool_compare_and_swap with short in extract_insn, at recog.c:2286

2016-02-03 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69644 --- Comment #3 from Jakub Jelinek --- Author: jakub Date: Wed Feb 3 22:38:56 2016 New Revision: 233113 URL: https://gcc.gnu.org/viewcvs?rev=233113=gcc=rev Log: PR target/69644 * config/rs6000/rs6000.c

[Bug target/69644] ICE with -O on __sync_bool_compare_and_swap with short in extract_insn, at recog.c:2286

2016-02-03 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69644 Jakub Jelinek changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug target/69644] ICE with -O on __sync_bool_compare_and_swap with short in extract_insn, at recog.c:2286

2016-02-02 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69644 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment #2

[Bug target/69644] New: ICE with -O on __sync_bool_compare_and_swap with short in extract_insn, at recog.c:2286

2016-02-02 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69644 Bug ID: 69644 Summary: ICE with -O on __sync_bool_compare_and_swap with short in extract_insn, at recog.c:2286 Product: gcc Version: 6.0 Status: UNCONFIRMED

[Bug target/69644] ICE with -O on __sync_bool_compare_and_swap with short in extract_insn, at recog.c:2286

2016-02-02 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69644 Martin Sebor changed: What|Removed |Added Target||powerpc64le-*-linux-* Last

[Bug target/58490] __sync_bool_compare_and_swap sign bit failure

2013-09-27 Thread erikvanderwerf at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58490 --- Comment #3 from Erik van der Werf erikvanderwerf at gmail dot com --- I'm sorry, that patch definitely looks relevant, and I'd like to try it, but somehow I did not manage to rebuild the arm-linux-gnueabi-gcc-4.7 package. I'm not a gcc

Re: [Bug target/58490] __sync_bool_compare_and_swap sign bit failure

2013-09-25 Thread Christian Bruel
On 09/24/2013 05:53 PM, rearnsha at gcc dot gnu.org wrote: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58490 --- Comment #2 from Richard Earnshaw rearnsha at gcc dot gnu.org --- Can you let me know whether http://gcc.gnu.org/ml/gcc-patches/2013-03/msg00553.html fixes the problem? This

[Bug target/58490] __sync_bool_compare_and_swap sign bit failure

2013-09-24 Thread rearnsha at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58490 --- Comment #2 from Richard Earnshaw rearnsha at gcc dot gnu.org --- Can you let me know whether http://gcc.gnu.org/ml/gcc-patches/2013-03/msg00553.html fixes the problem?

[Bug target/58490] __sync_bool_compare_and_swap sign bit failure

2013-09-23 Thread rearnsha at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58490 Richard Earnshaw rearnsha at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |WAITING

[Bug c/58490] New: __sync_bool_compare_and_swap sign bit failure

2013-09-21 Thread erikvanderwerf at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58490 Bug ID: 58490 Summary: __sync_bool_compare_and_swap sign bit failure Product: gcc Version: 4.7.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c

[Bug target/37651] __sync_bool_compare_and_swap creates wrong code with -fPIC

2012-01-06 Thread aph at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37651 Andrew Haley aph at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED

[Bug target/46682] __sync_bool_compare_and_swap generates wrong code

2010-11-27 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46682 Jakub Jelinek jakub at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED

[Bug c++/46682] New: __sync_bool_compare_and_swap generates wrong code

2010-11-26 Thread us15 at os dot inf.tu-dresden.de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46682 Summary: __sync_bool_compare_and_swap generates wrong code Product: gcc Version: 4.5.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo

[Bug target/37651] New: __sync_bool_compare_and_swap creates wrong code with -fPIC

2008-09-25 Thread fm3 at os dot inf dot tu-dresden dot de
The following example dumps a core if compiled with -march=i586 -fPIC: #include stdint.h int main(void) { static uint64_t volatile s_u64; __sync_bool_compare_and_swap(s_u64, 0, 0); } The reason is that %ebx will be used as pointer for the memory variable. I can reproduce this bug so far

[Bug target/37651] __sync_bool_compare_and_swap creates wrong code with -fPIC

2008-09-25 Thread pinskia at gcc dot gnu dot org
--- Comment #1 from pinskia at gcc dot gnu dot org 2008-09-25 21:36 --- I get: xchgl %ebx, %edi lock ; cmpxchg8b(%esi) xchgl %ebx, %edi Which looks good. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37651

[Bug target/37651] __sync_bool_compare_and_swap creates wrong code with -fPIC

2008-09-25 Thread brian at dessent dot net
--- Comment #2 from brian at dessent dot net 2008-09-25 22:29 --- Subject: Re: __sync_bool_compare_and_swap creates wrong code with -fPIC You get that if the variable is auto, but if it's static the reference is with a GOTOFF reloc: xorl%edi, %edi pushl %ebx

__sync_bool_compare_and_swap

2007-01-05 Thread Magnus Fromreide
I got so happy when __sync_bool_compare_and_swap showed up in 4.1 but now HEAD have changed the behaviour for me. Earlier I got (gcc version 4.1.2 20061028 (prerelease) (Debian 4.1.1-19)) (Yes, vendor version, but gcc.gnu.org versions did the same) lock cmpxchgl%edx

Re: __sync_bool_compare_and_swap

2007-01-05 Thread Andrew Haley
Magnus Fromreide writes: I got so happy when __sync_bool_compare_and_swap showed up in 4.1 but now HEAD have changed the behaviour for me. Earlier I got (gcc version 4.1.2 20061028 (prerelease) (Debian 4.1.1-19)) (Yes, vendor version, but gcc.gnu.org versions did the same

Re: __sync_bool_compare_and_swap

2007-01-05 Thread Daniel Jacobowitz
On Fri, Jan 05, 2007 at 05:05:41PM +, Andrew Haley wrote: But it can't unless you use an architecture that has cmpxchgl. cmpxchgl is a 486 instruction; if you compile for 386, we have to generate the call because there is no such instruction. And the older compiler was a Debian packaged

Re: __sync_bool_compare_and_swap

2007-01-05 Thread Magnus Fromreide
On fre, 2007-01-05 at 17:05 +, Andrew Haley wrote: Magnus Fromreide writes: But it can't unless you use an architecture that has cmpxchgl. cmpxchgl is a 486 instruction; if you compile for 386, we have to generate the call because there is no such instruction. Sigh - I failed to tell

Re: __sync_bool_compare_and_swap

2007-01-05 Thread H. J. Lu
On Fri, Jan 05, 2007 at 09:27:35PM +0100, Magnus Fromreide wrote: On fre, 2007-01-05 at 17:05 +, Andrew Haley wrote: Magnus Fromreide writes: But it can't unless you use an architecture that has cmpxchgl. cmpxchgl is a 486 instruction; if you compile for 386, we have to generate

Re: __sync_bool_compare_and_swap

2007-01-05 Thread Magnus Fromreide
On fre, 2007-01-05 at 12:53 -0800, H. J. Lu wrote: On Fri, Jan 05, 2007 at 09:27:35PM +0100, Magnus Fromreide wrote: On fre, 2007-01-05 at 17:05 +, Andrew Haley wrote: Magnus Fromreide writes: But it can't unless you use an architecture that has cmpxchgl. cmpxchgl is a 486

[Bug target/21097] __sync_bool_compare_and_swap doesn't work with -m32

2005-04-19 Thread rth at gcc dot gnu dot org
--- Additional Comments From rth at gcc dot gnu dot org 2005-04-19 16:21 --- When, exactly, did you think that cmpxchg was added? Use -march=i486. Duh. -- What|Removed |Added

[Bug target/21097] __sync_bool_compare_and_swap doesn't work with -m32

2005-04-19 Thread hjl at lucon dot org
--- Additional Comments From hjl at lucon dot org 2005-04-19 16:28 --- But there is no __sync_bool_compare_and_swap_4 in source code. If it isn't available, shouldn't gcc leave __sync_bool_compare_and_swap alone. -- What|Removed |Added

[Bug target/21097] __sync_bool_compare_and_swap doesn't work with -m32

2005-04-19 Thread rth at gcc dot gnu dot org
--- Additional Comments From rth at gcc dot gnu dot org 2005-04-19 19:34 --- No, because __sync_bool_compare_and_swap is overloaded. This expansion to __sync_bool_compare_and_swap_N is documented. -- What|Removed |Added

[Bug target/21097] New: __sync_bool_compare_and_swap doesn't work with -m32

2005-04-18 Thread hjl at lucon dot org
[EMAIL PROTECTED] gcc]$ cat /tmp/x.c #include stdio.h #ifdef OLD extern int __sync_bool_compare_and_swap_di (long *, long, long); #else #define __sync_bool_compare_and_swap_di __sync_bool_compare_and_swap #endif int foo (long *x) { long address = *x; if (!__sync_bool_compare_and_swap_di (x

[Bug target/21097] __sync_bool_compare_and_swap doesn't work with -m32

2005-04-18 Thread pinskia at gcc dot gnu dot org
-- What|Removed |Added CC||rth at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21097