This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/19558] openssl speed compiled with 20051020 gcc-4.0 (HEAD) segfaults
- From: "dank at kegel dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 31 May 2005 03:41:03 -0000
- Subject: [Bug target/19558] openssl speed compiled with 20051020 gcc-4.0 (HEAD) segfaults
- References: <20050121021840.19558.gj@pointblue.com.pl>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From dank at kegel dot com 2005-05-31 03:41 -------
See also http://marc.theaimsgroup.com/?l=openssl-dev&m=111238996923252&w=2
which says
--- snip ---
gcc-4 miscompiles inline assembly bn/asm/x86_64-gcc.c so that the
functions bn_add_words and bn_sub_words are broken and segfault.
This applies only to the stable branch as in the devel branch there is
added initialization of the ret and i variables. However the
initialization is unnecessary instead the code should be modified this way:
@@ -164,7 +186,7 @@
" leaq 1(%2),%2 \n"
" loop 1b \n"
" sbbq %0,%0 \n"
- : "+a"(ret),"+c"(n),"+r"(i)
+ : "=&a"(ret),"+c"(n),"=&r"(i)
: "r"(rp),"r"(ap),"r"(bp)
: "cc"
);
@@ -187,7 +209,7 @@
" leaq 1(%2),%2 \n"
" loop 1b \n"
" sbbq %0,%0 \n"
- : "+a"(ret),"+c"(n),"+r"(i)
+ : "=&a"(ret),"+c"(n),"=&r"(i)
: "r"(rp),"r"(ap),"r"(bp)
: "cc"
);
--- snip ---
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19558