This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/71033] Segmentation fault c + intel assembly, unable to use EBX
- From: "ubizjak at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 09 May 2016 20:00:32 +0000
- Subject: [Bug c/71033] Segmentation fault c + intel assembly, unable to use EBX
- Auto-submitted: auto-generated
- References: <bug-71033-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71033
--- Comment #1 from UroÅ Bizjak <ubizjak at gmail dot com> ---
x86 ABI requires that %ebx is preserved across function call. So, you need to
save it to stack in f.s and restore it before function returs. Or, you can use
%edx instead, which can be clobbered in function.