This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Calling convention that gets frame pointer register clobbered
- From: Falk Hueffner <falk dot hueffner at student dot uni-tuebingen dot de>
- To: Etienne Lorrain <etienne_lorrain at yahoo dot fr>
- Cc: Jim Wilson <wilson at specifixinc dot com>, gcc at gcc dot gnu dot org
- Date: 22 Dec 2003 10:59:29 +0100
- Subject: Re: Calling convention that gets frame pointer register clobbered
- References: <20031222095402.13078.qmail@web11803.mail.yahoo.com>
Etienne Lorrain <etienne_lorrain@yahoo.fr> writes:
> The code is compiling if the structure is small enough to fit in
> a 32 bits register, not if it has to be in memory - I should have
> said it. With the compiler I have nearby, this code is only
> compiling if the line "// unsigned c, d, e, f;" is commented out:
>
> ---------------------------
> typedef struct {
> unsigned char a,b;
> // unsigned c, d, e, f;
> } ebiosinfo_t;
>
> unsigned char
> _EBIOSDISK_getparam (unsigned char disk, ebiosinfo_t *ebiosinfo,
> unsigned char *status)
> {
> unsigned char carry;
>
> asm (
> " int $0x13 # _EBIOSDISK_getparam \n"
> " mov %%ah,%1 \n"
> " setc %0 \n"
> : "=qm" (carry), "=qm" (*status)
> : "a"((unsigned short)0x4800), "d" (disk), "S" (*ebiosinfo)
> );
You've hit PR inline-asm/8788. As I mentioned there, IMHO we should
error out on this, but nobody else has commented on it yet...
--
Falk