This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/35836] Wrong instruction generated for comparison with zero on PPC 64 bit
- From: "oder at eleks dot lviv dot ua" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 May 2008 16:27:39 -0000
- Subject: [Bug target/35836] Wrong instruction generated for comparison with zero on PPC 64 bit
- References: <bug-35836-12742@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #11 from oder at eleks dot lviv dot ua 2008-05-21 16:27 -------
(In reply to comment #10)
> OSAtomicIncrement32Barrier will return a 32bit signed extended value to a 64bit
> so using a 64bit compare is fine and ok according to the ABI.
Yes, but it returns value in 64-bit register with lower 32 bit being correct
and higher 32 bit being nonzero (the garbage) and using 64bit comparison for
equality with zero yields incorrect result.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35836