Thread overview | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
June 17, 2003 weird ebx register behaviour | ||||
---|---|---|---|---|
| ||||
Hi, while I wrote a module using inline assembler, I saw that DMC assumes that EBX will never change. Are there any other registers that must not be altered while compiling with -mn? Best regards, Mark Junker |
June 17, 2003 Re: weird ebx register behaviour | ||||
---|---|---|---|---|
| ||||
Posted in reply to Mark Junker | Mark Junker wrote: > Hi, > > while I wrote a module using inline assembler, I saw that DMC assumes that EBX will never change. Are there any other registers that must not be altered while compiling with -mn? > > Best regards, > Mark Junker > > 16 bit models: must preserve si,di,bp,sp,ss,cs,ds direction flag (df) must stay forward 32 bit models: must preserve ebx,esi,edi,ebp,esp,ss,fs,gs,cs,ds direction flag (df) must stay forward direction flag (df) must stay forward roland |
June 18, 2003 Re: weird ebx register behaviour | ||||
---|---|---|---|---|
| ||||
Posted in reply to roland | roland schrieb...
> 32 bit models:
>
> must preserve ebx,esi,edi,ebp,esp,ss,fs,gs,cs,ds
> direction flag (df) must stay forward
Are fs dn gs used at all by the compiler (or RTL)?
- Heinz
|
June 18, 2003 Re: weird ebx register behaviour | ||||
---|---|---|---|---|
| ||||
Posted in reply to Heinz Saathoff |
Heinz Saathoff wrote:
> roland schrieb...
>
>>32 bit models:
>>
>>must preserve ebx,esi,edi,ebp,esp,ss,fs,gs,cs,ds
>>direction flag (df) must stay forward
>>
>
> Are fs dn gs used at all by the compiler (or RTL)?
>
> - Heinz
>
That is on my Symantec old docs. ( yes paper doc ! )
Never seen fs dn gs used when i disassembled.
May be Walter kept them at harm lenght just in case ..
by
roland
|
June 19, 2003 Re: weird ebx register behaviour | ||||
---|---|---|---|---|
| ||||
Posted in reply to roland | roland schrieb...
> Never seen fs dn gs used when i disassembled.
> May be Walter kept them at harm lenght just in case ..
That's what I also discovered. But I am not sure about the RTL where some support functions are written in assembler.
- Heinz
|
June 19, 2003 Re: weird ebx register behaviour | ||||
---|---|---|---|---|
| ||||
Posted in reply to Heinz Saathoff | "Heinz Saathoff" <hsaat@bre.ipnet.de> wrote in message news:MPG.195a519c170ac08c9896c5@news.digitalmars.com... > roland schrieb... > > 32 bit models: > > > > must preserve ebx,esi,edi,ebp,esp,ss,fs,gs,cs,ds > > direction flag (df) must stay forward > > Are fs dn gs used at all by the compiler (or RTL)? FS is used by the Win32 operating system for thread-specific data, and is generated by the compiler for SEH stack frames. DS, of course, points to the data segment. I don't know what GS is used for. |
June 20, 2003 Re: weird ebx register behaviour | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | Walter schrieb...
> FS is used by the Win32 operating system for thread-specific data, and is generated by the compiler for SEH stack frames.
What is a SEH stack frame? Has it to do with exception handlers (EH)?
- Heinz
|
June 20, 2003 Re: weird ebx register behaviour | ||||
---|---|---|---|---|
| ||||
Posted in reply to Heinz Saathoff | "Heinz Saathoff" <hsaat@bre.ipnet.de> wrote in message news:MPG.195ccc6abe340d149896c7@news.digitalmars.com... > Walter schrieb... > > FS is used by the Win32 operating system for thread-specific data, and is > > generated by the compiler for SEH stack frames. > What is a SEH stack frame? Structured Exception Handling. > Has it to do with exception handlers (EH)? Yup. Compile some code with exceptions enabled, put some classes with destructors on the stack, and OBJ2ASM it. |
Copyright © 1999-2021 by the D Language Foundation