Ignore:
Timestamp:
Sep 29, 2003, 11:19:59 PM (22 years ago)
Author:
bird
Message:

#679: FS preservation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/emx/include/os2emx.h

    • Property cvs2svn:cvs-rev changed from 1.7 to 1.8
    r752 r753  
    36603660typedef QSEXLREC qsExLrec_t;
    36613661
    3662 #pragma pack(1)
    36633662typedef struct _QSSFT
    36643663{
     
    36743673  PADSHORT;
    36753674} QSSFT;
    3676 #pragma pack()
    36773675typedef QSSFT qsSft_t;
    36783676
     
    1314613144#endif /* INCL_MOU */
    1314713145
     13146
     13147/* --------------------- FS Save/Load/Restore macros ---------------------- */
     13148
     13149#if defined(INCL_FSMACROS)
     13150
     13151#ifndef FS_DISABLED
     13152#define FS_VAR()        volatile unsigned __fs__;
     13153#define FS_SAVE()       __asm__ __volatile__ ("movl %%fs, %%eax; movl %%eax,%0;" : : "m" (__fs__) : "%eax" )
     13154#define FS_SAVE_LOAD()  __asm__ __volatile__ ("movl %%fs, %%eax; movl %%eax,%0; movl $DosTIB, %%eax; movl %%eax, %%fs" : : "m" (__fs__) : "%eax" )
     13155#define FS_RESTORE()    __asm__ __volatile__ ("movl %0, %%eax; movl %%eax,%%fs;" : : "m" (__fs__) : "%eax" )
     13156#else
     13157#define FS_VAR()
     13158#define FS_SAVE()       do { } while(0)
     13159#define FS_SAVE_LOAD()  do { } while(0)
     13160#define FS_RESTORE()    do { } while(0)
     13161#endif
     13162
     13163#endif /* INCL_FSMACROS */
     13164
    1314813165/* ------------------------------ THE END --------------------------------- */
    1314913166
    13150 #pragma pack(4)
     13167#pragma pack()
    1315113168
    1315213169#endif /* not _OS2EMX_H */
Note: See TracChangeset for help on using the changeset viewer.