public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "segher at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/101393] PowerPC32 inline assembly broken by commit 2d94f7dea9c73ef3c116a0ddc722724578a860fe Date: Thu, 22 Jul 2021 16:28:01 +0000 [thread overview] Message-ID: <bug-101393-4-B7Mpox9sWv@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-101393-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101393 --- Comment #14 from Segher Boessenkool <segher at gcc dot gnu.org> --- (In reply to Franz Sirl from comment #12) > The emitted .machine is easy to fix, what's not so easy to fix is the > intention behind Segher's change that caused the wrong .machine. > > Consider this source compiled with -mcpu=7400: > > void ppcaltivecfunc (void) __attribute__ ((__target__ ("cpu=7400,altivec"))); > void ppcaltivecfunc (void) > { > asm ("lvx 0,0,11"); > } > > > void ppc403func (void) __attribute__ ((__target__ ("cpu=403"))); > void ppc403func (void) > { > asm ("lvx 0,0,11"); > } "7400" and "403" are not supported target attribute values, fwiw (says the manual). > Even though the compiler emitted a .machine "403" (or currently the buggy > "ppc"), the assembler won't barf on "lvx 0,0,11" in ppc403func(), because of > the sticky altivec flag. Yeah, we should fix that. > That's why I suggested more control over the sticky flags via .machine > pseudo-ops, -mdotmachine-realcpu-resets-sticky or similar. That way the > users of pure assembly sources won't see a change in behaviour, but the > compiler still gains the full control it needs. We should just make this stuff work better / more intuitively :-) We do not need to preserve unworkable (or buggy) semantics, in general.
next prev parent reply other threads:[~2021-07-22 16:28 UTC|newest] Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-07-09 13:57 [Bug inline-asm/101393] New: " sirl at gcc dot gnu.org 2021-07-13 16:22 ` [Bug target/101393] " segher at gcc dot gnu.org 2021-07-13 16:23 ` segher at gcc dot gnu.org 2021-07-16 14:46 ` sirl at gcc dot gnu.org 2021-07-16 14:56 ` sirl at gcc dot gnu.org 2021-07-16 22:40 ` segher at gcc dot gnu.org 2021-07-16 22:48 ` segher at gcc dot gnu.org 2021-07-21 15:49 ` sirl at gcc dot gnu.org 2021-07-21 16:25 ` segher at gcc dot gnu.org 2021-07-21 17:09 ` sirl at gcc dot gnu.org 2021-07-21 21:23 ` segher at gcc dot gnu.org 2021-07-22 4:04 ` amodra at gmail dot com 2021-07-22 9:47 ` sirl at gcc dot gnu.org 2021-07-22 16:16 ` segher at gcc dot gnu.org 2021-07-22 16:28 ` segher at gcc dot gnu.org [this message] 2021-07-22 17:33 ` sirl at gcc dot gnu.org 2021-07-22 17:44 ` sirl at gcc dot gnu.org 2021-07-22 23:17 ` segher at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-101393-4-B7Mpox9sWv@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).