From cb23bbe38aad594619fdde5d993e1959c1a63c1b Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Sat, 27 Nov 2010 12:36:14 +0000 Subject: [PATCH] [INTRIN] Implement _inp, _inpd, _inpw, _outp, _outpd, _outpw as intrinsics, like on MSVC svn path=/branches/cmake-bringup/; revision=49814 --- include/crt/mingw32/intrin_x86.h | 33 ++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/include/crt/mingw32/intrin_x86.h b/include/crt/mingw32/intrin_x86.h index 5b6f32d18a3..61250438145 100644 --- a/include/crt/mingw32/intrin_x86.h +++ b/include/crt/mingw32/intrin_x86.h @@ -1113,6 +1113,39 @@ __INTRIN_INLINE void __outdwordstring(unsigned short const Port, const unsigned __asm__ __volatile__("rep; outsl" : : [Port] "d" (Port), [Buffer] "S" (Buffer), "c" (Count)); } +__INTRIN_INLINE int _inp(unsigned short Port) +{ + return __inbyte(Port); +} + +__INTRIN_INLINE unsigned short _inpw(unsigned short Port) +{ + return __inword(Port); +} + +__INTRIN_INLINE unsigned long _inpd(unsigned short Port) +{ + return __indword(Port); +} + +__INTRIN_INLINE int _outp(unsigned short Port, int databyte) +{ + __outbyte(Port, databyte); + return databyte; +} + +__INTRIN_INLINE unsigned short _outpw(unsigned short Port, unsigned short dataword) +{ + __outword(Port, dataword); + return dataword; +} + +__INTRIN_INLINE unsigned long _outpd(unsigned short Port, unsigned long dataword) +{ + __outdword(Port, dataword); + return dataword; +} + /*** System information ***/ __INTRIN_INLINE void __cpuid(int CPUInfo[], const int InfoType) -- 2.17.1