public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "krzysiek-gcc dot gnu dot org at lichota dot net" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug inline-asm/24761] Missing register load before inline asm in templated function causes SIGSEGV Date: Wed, 09 Nov 2005 19:50:00 -0000 [thread overview] Message-ID: <20051109194958.14072.qmail@sourceware.org> (raw) In-Reply-To: <bug-24761-11690@http.gcc.gnu.org/bugzilla/> ------- Comment #2 from krzysiek-gcc dot gnu dot org at lichota dot net 2005-11-09 19:49 ------- Created an attachment (id=10195) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10195&action=view) Assembler code generated from testcase This is code generated from testcase. In first instantiation eax register is loaded before inline asm starts: .loc 1 25 0 movl -16(%ebp), %eax addl -20(%ebp), %eax sall $2, %eax addl 8(%ebp), %eax movl %eax, -8(%ebp) .loc 1 41 0 movl -16(%ebp), %eax addl -24(%ebp), %eax sall $2, %eax movl %eax, %edx addl -12(%ebp), %edx movl -8(%ebp), %eax #APP movq (%edx), %mm0 ; In the second instantiation, eax is not loaded: .loc 1 25 0 movl -16(%ebp), %eax addl -20(%ebp), %eax sall $2, %eax addl 8(%ebp), %eax movl %eax, -8(%ebp) .loc 1 41 0 movl -16(%ebp), %eax addl -24(%ebp), %eax sall $2, %eax movl %eax, %edx addl -12(%ebp), %edx #APP movq (%edx), %mm0 ; Then in line: pxor (%eax), %mm0 ; eax is dereferenced and segfault occurs. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24761
next prev parent reply other threads:[~2005-11-09 19:50 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2005-11-09 19:43 [Bug inline-asm/24761] New: " krzysiek-gcc dot gnu dot org at lichota dot net 2005-11-09 19:46 ` [Bug inline-asm/24761] " krzysiek-gcc dot gnu dot org at lichota dot net 2005-11-09 19:50 ` krzysiek-gcc dot gnu dot org at lichota dot net [this message] 2005-11-09 20:00 ` krzysiek-gcc dot gnu dot org at lichota dot net 2005-11-09 20:24 ` [Bug c++/24761] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org 2005-11-09 20:28 ` [Bug c++/24761] [4.0/4.1 Regression] templates and inline-asm and "+" pinskia at gcc dot gnu dot org 2005-11-10 9:03 ` jakub at gcc dot gnu dot org 2005-11-12 20:42 ` jakub at gcc dot gnu dot org 2005-11-12 20:43 ` jakub at gcc dot gnu dot org 2005-11-12 22:13 ` pinskia at gcc dot gnu dot 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=20051109194958.14072.qmail@sourceware.org \ --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).