This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
ia32 bug: cannot use (%esp) as temporary when calling functions...
- From: Etienne Lorrain <etienne_lorrain at yahoo dot fr>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 19 Mar 2003 21:35:36 +0100 (CET)
- Subject: ia32 bug: cannot use (%esp) as temporary when calling functions...
Hello,
I am not using the database now because I can not extract a small
example. I cannot use gcc-3.1+ to do a working executable of Gujin-0.7
http://sourceforge.net/projects/gujin/
first because of the two bug I submitted today, but also because (at
least) of the use of (%esp) as temporary.
To see what I am talking about, download Gujin (first increment my
couters -:)) - the source version at:
http://prdownloads.sourceforge.net/gujin/gujin-0.7.tgz?download
and patch line 511 of boot.h to replace:
: "=r" (returned) : "g" (&gujin_param.field)); \
by:
: "=q" (returned) : "g" (&gujin_param.field)); \
Then type "make dep user.o" or "make dep user.s"
Then edit user.lis, go to the function VGA_setmode:
you get:
2771 VGA_setmode:
2772 0000 6655 pushl %ebp
2773 0002 6657 pushl %edi
.......
2797 0049 66E8FCFF call VGA_getsize
2797 FFFF
2798 004f 67668904 movl %eax, (%esp) <<<<<<<<<<<<<<<<<<<<<
2798 24
2799 0054 6685C0 testl %eax, %eax
2800 0057 75D6 jne .L618 ; pop all and return
2801 0059 66E8FCFF call free_hardwin <<<<<<<<<<<<<<<<<<<<
......
2836 00d1 6609C2 orl %eax, %edx
2837 00d4 66B80002 movl $512, %eax
2837 0000
2838 00da 67668B1C movl (%esp), %ebx <<<<<<<<<<<<<<<<<<<
2838 24
2839 #APP
2840 00df CD10 int $0x10 # setcursor
2841 #NO_APP
2842 00e1 66E8FCFF call VGA_VESA_setup_color
I do not think this pattern gonna work.
Note also that I have few inline assembler in between, like "int $0x10"
and I did not see any modifier for the top of the stack in asm() rules...
Cheers,
Etienne.
___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com