Date: Thu, 10 Sep 2020 16:20:02 +0000 From: bugzilla-noreply@freebsd.org To: toolchain@FreeBSD.org Subject: [Bug 230888] Missing 64 bit atomic functions for i386 (libatomic) Message-ID: <bug-230888-29464-jIQAMplMMV@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-230888-29464@https.bugs.freebsd.org/bugzilla/> References: <bug-230888-29464@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D230888 --- Comment #36 from Tijl Coosemans <tijl@FreeBSD.org> --- (In reply to Dimitry Andric from comment #35) The calls are expanded because of casts. So for instance a uint64_t* param= eter is cast to _Atomic(uint64_t)*. This is problematic because _Atomic(uint64_= t) can be an 8 byte aligned type which causes compiler_rt to use instructions = as if a given address is 8 byte aligned while it can be completely misaligned.= =20 Here's some example code where clang generates a library call because of misalignment. struct foo { char c; _Atomic(long long) ll; } __attribute__((__packed__)); long long test(struct foo *f) { return (f->ll); } --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-230888-29464-jIQAMplMMV>