This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/35836] Wrong instruction generated for comparison with zero on PPC 64 bit



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]