Mail Archives: djgpp/1999/06/30/12:31:08
From: | "Christopher Nelson" <paradox AT gye DOT satnet DOT net>
|
To: | <djgpp AT delorie DOT com>
|
Subject: | Re: Some nice questions!! (one of them is silly!)
|
Date: | Tue, 29 Jun 1999 18:06:59 -0600
|
Message-ID: | <01bec28c$7a1a3360$LocalHost@thendren>
|
MIME-Version: | 1.0
|
X-Priority: | 3
|
X-MSMail-Priority: | Normal
|
X-Mailer: | Microsoft Outlook Express 4.71.1712.3
|
X-MimeOLE: | Produced By Microsoft MimeOLE V4.71.1712.3
|
Reply-To: | djgpp AT delorie DOT com
|
>When calling a standalone function, eax, ecx and edx are expected to be
>changed. The compiler knows this. (Ref line 490 or so of
>gcc-2.81/config/i386/i386.h (#define CALL_USED_REGISTERS)). Therefore,
>these are safe to change in a pure asm function.
thank you for the correction. that's interesting to know.
>Except that it's done implicitly by GCC. Obviously ds must be correct,
>and since GCC does generate things like `rep movsl' sometimes, es needs
>to be the same.
>I guess that could be a semantic confusion. DJGPP *requires* that they
>be the same, but it does not *make* that the case under all
>circumstances (it won't fix it if you break it).
yes... i hadn't thought about the rep* instructions. but in essence that's
what i was saying. if you change the segment registers it never explicitly
does anything with them again, whereas compilers like MSVC or any of the old
native compilers almost always insert segment fixups right before the
far-pointer access code.
-={C}=-
- Raw text -