public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "palmer at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/110722] New: FP is Saved/Restored around inline assembly Date: Tue, 18 Jul 2023 15:35:32 +0000 [thread overview] Message-ID: <bug-110722-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110722 Bug ID: 110722 Summary: FP is Saved/Restored around inline assembly Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: palmer at gcc dot gnu.org Target Milestone: --- I'm not sure if this is some ABI-related requirement that I've managed to forget about, but it looks like we're saving/restoring FP around inline assembly. long fp_asm(long arg0) { asm volatile ("addi a0, a0, 1" : "+r"(arg0)); return arg0; } produces fp_asm(long): addi sp,sp,-16 sd s0,8(sp) addi s0,sp,16 addi a0, a0, 1 ld s0,8(sp) addi sp,sp,16 jr ra We've got a ton of inline assembly in Linux these days and defconfig has `-fno-omit-frame-pointer`, so this probably manifests as a performance issue for someone somewhere -- though Clement just ran into it because he was curious, so I don't have anything concrete.
next reply other threads:[~2023-07-18 15:35 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-07-18 15:35 palmer at gcc dot gnu.org [this message] 2023-07-18 19:29 ` [Bug target/110722] " pinskia 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-110722-4@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).