public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "auc42 at yahoo dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug inline-asm/56621] Misaligned stack with inline assembly Date: Thu, 14 Mar 2013 20:01:00 -0000 [thread overview] Message-ID: <bug-56621-4-qiG1zukvtu@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-56621-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56621 --- Comment #2 from auc42 at yahoo dot com 2013-03-14 20:00:56 UTC --- Ah, I had forgotten to change "tmp" back to a long in the code snippet provided. I was experimenting to see variations of the generated assembly while using different types. The failure is present with both the 8-byte long and 4-byte int, in this case. I accept your explanation about the clobbered registers, though. I apparently misunderstood how clobber declarations worked (and in re-reading the manual, either I'm still missing something or the text isn't very clear). Placing the variables directly in the S and d registers and skipping the movX instructions eliminates the problem. I suppose that the sequence only worked by happenstance in earlier versions of gcc. (As for the reason of doing it this way: the original code was avoiding use of the C standard library and/or any include files, as a personal learning exercise toward a later program.)
prev parent reply other threads:[~2013-03-14 20:01 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-03-14 18:32 [Bug inline-asm/56621] New: " auc42 at yahoo dot com 2013-03-14 18:58 ` [Bug inline-asm/56621] " jakub at gcc dot gnu.org 2013-03-14 20:01 ` auc42 at yahoo dot com [this message]
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-56621-4-qiG1zukvtu@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).