| delorie.com/archives/browse.cgi | search |
| From: | leathm AT solwarra DOT gbrmpa DOT gov DOT au (Leath Muller) |
| Message-Id: | <199712030539.PAA16554@solwarra.gbrmpa.gov.au> |
| Subject: | Re: Inline asm |
| To: | eldredge AT ap DOT net (Nate Eldredge) |
| Date: | Wed, 3 Dec 1997 15:39:10 +1000 (EST) |
| Cc: | fabrice AT trash DOT lip6 DOT fr, djgpp AT delorie DOT com |
| In-Reply-To: | <199712030228.SAA21769@adit.ap.net> from "Nate Eldredge" at Dec 2, 97 06:28:16 pm |
> > You MUST !!
> Not necessarily. In many cases you can use GCC's extended asm features to
> inform it that a certain register has been clobbered. I can't think of a
> simple realistic example, so here's an imaginary one. The `frob' instruction
> does something useful and puts undefined stuff into the given register.
> asm("frob %ebx" : /* no outputs */ : /* no inputs */ : "%ebx");
Correct me if I am wrong, but if you have a piece of assembly in its own
subroutine:
void whatever()
{
asm {
}
}
then you don't have to push/pop any registers other than the stack/stack
frame ones (like ebp if you use it) as the subroutine has its own stack
frame anyway...
Leathal.
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |