[clang] [X86] Add support for MS inp functions. (PR #93804)
Phoebe Wang via cfe-commits
cfe-commits at lists.llvm.org
Thu May 30 22:46:38 PDT 2024
================
@@ -329,6 +329,25 @@ static __inline__ void __DEFAULT_FN_ATTRS __stosq(unsigned __int64 *__dst,
static __inline__ void __DEFAULT_FN_ATTRS __halt(void) {
__asm__ volatile("hlt");
}
+
+static inline int _inp(unsigned short port) {
+ int ret;
+ __asm__ volatile("inb %w1, %b0" : "=a"(ret) : "Nd"(port));
----------------
phoebewang wrote:
I took a look at the Clang code, it seems these `b`, `w` modifiers are only meaningful to ARM/AArch64. We don't need them for X86 assembly.
https://github.com/llvm/llvm-project/pull/93804
More information about the cfe-commits
mailing list