[clang] [X86]Add support for _outp{|w|d} (PR #93774)
Phoebe Wang via cfe-commits
cfe-commits at lists.llvm.org
Wed May 29 23:47:42 PDT 2024
================
@@ -329,6 +329,26 @@ static __inline__ void __DEFAULT_FN_ATTRS __stosq(unsigned __int64 *__dst,
static __inline__ void __DEFAULT_FN_ATTRS __halt(void) {
__asm__ volatile("hlt");
}
+
+static __inline__ int __DEFAULT_FN_ATTRS _outp(unsigned short port, int data) {
+ __asm__ volatile("outb %b0, %w1" : : "a"(data), "Nd"(port) : "memory");
----------------
phoebewang wrote:
Instruction doesn't clobber memory.
https://github.com/llvm/llvm-project/pull/93774
More information about the cfe-commits
mailing list