c++ - weird ebx register behaviour
- mjs NOSPAM.gmx.de (Mark Junker) Jun 16 2003
- roland <--rv ronetech.com> Jun 17 2003
- Heinz Saathoff <hsaat bre.ipnet.de> Jun 18 2003
- roland <--rv ronetech.com> Jun 18 2003
- Heinz Saathoff <hsaat bre.ipnet.de> Jun 18 2003
- "Walter" <walter digitalmars.com> Jun 18 2003
- Heinz Saathoff <hsaat bre.ipnet.de> Jun 19 2003
- "Walter" <walter digitalmars.com> Jun 20 2003
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
Jun 16 2003
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
Jun 17 2003
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
Jun 18 2003
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
Jun 18 2003
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
Jun 18 2003
"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.
Jun 18 2003
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
Jun 19 2003
"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
generated by the compiler for SEH stack frames.
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.
Jun 20 2003









Heinz Saathoff <hsaat bre.ipnet.de> 