Ignore:
Timestamp:
Apr 10, 2003, 12:26:25 PM (22 years ago)
Author:
sandervl
Message:

PF: Header updates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/os2sel.h

    r9969 r10004  
    1 /* $Id: os2sel.h,v 1.12 2003-04-02 11:02:34 sandervl Exp $ */
     1/* $Id: os2sel.h,v 1.13 2003-04-10 10:26:23 sandervl Exp $ */
    22/*
    33 *
     
    3838static inline unsigned short GetFS(void)
    3939{
    40  asm volatile (
    41     "mov %fs, %ax       \n\t"
    42  );
     40 int __res;
     41 __asm__ __volatile__("mov %%fs, %%eax" : "=a" (__res));
     42 return(__res);
    4343}
    4444
    4545static inline void SetFS(unsigned short sel)
    4646{
    47  __asm__ __volatile__("movw %%ax,%%fs" : : "a" (sel));
     47 __asm__ __volatile__("mov %%eax,%%fs" : : "a" (sel));
    4848}
    4949
    50 static inline unsigned short RestoreOS2FS(void)
     50static inline int RestoreOS2FS(void)
    5151{
    52  asm volatile (
    53         "push    $0x0150b       \n\t"
    54         "movw    %fs,%ax        \n\t"
    55         "pop     %fs"
    56  );
     52 int __res, xx = 0x0150b;
     53
     54 __asm__ __volatile__(
     55   "mov   %%fs,%0      \n\t"
     56   "mov   %1,%%fs      \n\t"
     57   : "=&r" (__res) : "r" (xx));
     58 return(__res);
    5759}
    5860
Note: See TracChangeset for help on using the changeset viewer.