Changeset 3772e2c in rtems


Ignore:
Timestamp:
Nov 23, 1999, 2:54:42 PM (21 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
748cdca9
Parents:
a1bcc6e9
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libcpu/i386/cpu.h

    ra1bcc6e9 r3772e2c  
    179179
    180180#define i386_outport_byte( _port, _value ) \
    181   { register unsigned short __port  = _port; \
     181do { register unsigned short __port  = _port; \
    182182     register unsigned char  __value = _value; \
    183183     \
    184      asm volatile ( "outb %0,%1" : "=a" (__value), "=d" (__port) \
    185                                  : "0"   (__value), "1"  (__port) \
    186                   ); \
    187    }
     184     asm volatile ( "outb %0,%1" : : "a" (__value), "d" (__port) ); \
     185   } while (0)
    188186
    189187#define i386_outport_word( _port, _value ) \
    190   { register unsigned short __port  = _port; \
     188do { register unsigned short __port  = _port; \
    191189     register unsigned short __value = _value; \
    192190     \
    193      asm volatile ( "outw %0,%1" : "=a" (__value), "=d" (__port) \
    194                                  : "0"   (__value), "1"  (__port) \
    195                   ); \
    196    }
     191     asm volatile ( "outw %0,%1" : : "a" (__value), "d" (__port) ); \
     192   } while (0)
    197193
    198194#define i386_outport_long( _port, _value ) \
    199   { register unsigned short __port  = _port; \
     195do { register unsigned short __port  = _port; \
    200196     register unsigned int  __value = _value; \
    201197     \
    202      asm volatile ( "outl %0,%1" : "=a" (__value), "=d" (__port) \
    203                                  : "0"   (__value), "1"  (__port) \
    204                   ); \
    205    }
     198     asm volatile ( "outl %0,%1" : : "a" (__value), "d" (__port) ); \
     199   } while (0)
    206200
    207201#define i386_inport_byte( _port, _value ) \
    208   { register unsigned short __port  = _port; \
     202do { register unsigned short __port  = _port; \
    209203     register unsigned char  __value = 0; \
    210204     \
    211      asm volatile ( "inb %1,%0" : "=a" (__value), "=d" (__port) \
    212                                 : "0"   (__value), "1"  (__port) \
     205     asm volatile ( "inb %1,%0" : "=a" (__value) \
     206                                : "d"  (__port) \
    213207                  ); \
    214208     _value = __value; \
    215    }
     209   } while (0)
    216210
    217211#define i386_inport_word( _port, _value ) \
    218   { register unsigned short __port  = _port; \
     212do { register unsigned short __port  = _port; \
    219213     register unsigned short __value = 0; \
    220214     \
    221      asm volatile ( "inw %1,%0" : "=a" (__value), "=d" (__port) \
    222                                 : "0"   (__value), "1"  (__port) \
     215     asm volatile ( "inw %1,%0" : "=a" (__value) \
     216                                : "d"  (__port) \
    223217                  ); \
    224218     _value = __value; \
    225    }
     219   } while (0)
    226220
    227221#define i386_inport_long( _port, _value ) \
    228   { register unsigned short __port  = _port; \
     222do { register unsigned short __port  = _port; \
    229223     register unsigned int  __value = 0; \
    230224     \
    231      asm volatile ( "inl %1,%0" : "=a" (__value), "=d" (__port) \
    232                                 : "0"   (__value), "1"  (__port) \
     225     asm volatile ( "inl %1,%0" : "=a" (__value) \
     226                                : "d"  (__port) \
    233227                  ); \
    234228     _value = __value; \
    235    }
     229   } while (0)
    236230
    237231/*
Note: See TracChangeset for help on using the changeset viewer.