[clang] [X86]Add support for __outbyte/word/dword and __inbyte/word/dword (PR #93774)

Phoebe Wang via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 19 23:22:59 PDT 2024


================
@@ -330,24 +330,35 @@ static __inline__ void __DEFAULT_FN_ATTRS __halt(void) {
   __asm__ volatile("hlt");
 }
 
-static inline int _inp(unsigned short port) {
-  int ret;
+static inline unsigned char __inbyte(unsigned short port) {
+  unsigned char ret;
   __asm__ volatile("inb %w1, %b0" : "=a"(ret) : "Nd"(port));
----------------
phoebewang wrote:

Seems we prefer to `__volatile__` more?

https://github.com/llvm/llvm-project/pull/93774


More information about the cfe-commits mailing list