Skip to content

Commit 1d96bd4

Browse files
authored
Revert "[X86] Add support for MS inp functions. (llvm#93804)"
This reverts commit 089dfee.
1 parent 4b4aaf1 commit 1d96bd4

File tree

2 files changed

+0
-44
lines changed

2 files changed

+0
-44
lines changed

clang/lib/Headers/intrin.h

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -329,25 +329,6 @@ static __inline__ void __DEFAULT_FN_ATTRS __stosq(unsigned __int64 *__dst,
329329
static __inline__ void __DEFAULT_FN_ATTRS __halt(void) {
330330
__asm__ volatile("hlt");
331331
}
332-
333-
static inline int _inp(unsigned short port) {
334-
int ret;
335-
__asm__ volatile("inb %w1, %b0" : "=a"(ret) : "Nd"(port));
336-
return ret;
337-
}
338-
339-
static inline unsigned short _inpw(unsigned short port) {
340-
unsigned short ret;
341-
__asm__ volatile("inw %w1, %w0" : "=a"(ret) : "Nd"(port));
342-
return ret;
343-
}
344-
345-
static inline unsigned long _inpd(unsigned short port) {
346-
unsigned long ret;
347-
__asm__ volatile("inl %w1, %k0" : "=a"(ret) : "Nd"(port));
348-
return ret;
349-
}
350-
351332
#endif
352333

353334
#if defined(__i386__) || defined(__x86_64__) || defined(__aarch64__)

clang/test/CodeGen/X86/ms-x86-intrinsics.c

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -63,31 +63,6 @@ unsigned __int64 test__emulu(unsigned int a, unsigned int b) {
6363
// CHECK: [[RES:%[0-9]+]] = mul nuw i64 [[Y]], [[X]]
6464
// CHECK: ret i64 [[RES]]
6565

66-
67-
int test_inp(unsigned short port) {
68-
return _inp(port);
69-
}
70-
// CHECK-LABEL: i32 @test_inp(i16 noundef
71-
// CHECK-SAME: [[PORT:%.*]])
72-
// CHECK: [[TMP0:%.*]] = tail call i32 asm sideeffect "inb ${1:w}, ${0:b}", "={ax},N{dx},~{dirflag},~{fpsr},~{flags}"(i16 [[PORT]])
73-
// CHECK-NEXT: ret i32 [[TMP0]]
74-
75-
unsigned short test_inpw(unsigned short port) {
76-
return _inpw(port);
77-
}
78-
// CHECK-LABEL: i16 @test_inpw(i16 noundef
79-
// CHECK-SAME: [[PORT:%.*]])
80-
// CHECK: [[TMP0:%.*]] = tail call i16 asm sideeffect "inw ${1:w}, ${0:w}", "={ax},N{dx},~{dirflag},~{fpsr},~{flags}"(i16 [[PORT]])
81-
// CHECK-NEXT: ret i16 [[TMP0]]
82-
83-
unsigned long test_inpd(unsigned short port) {
84-
return _inpd(port);
85-
}
86-
// CHECK-LABEL: i32 @test_inpd(i16 noundef
87-
// CHECK-SAME: [[PORT:%.*]])
88-
// CHECK: [[TMP0:%.*]] = tail call i32 asm sideeffect "inl ${1:w}, ${0:k}", "={ax},N{dx},~{dirflag},~{fpsr},~{flags}"(i16 [[PORT]])
89-
// CHECK-NEXT: ret i32 [[TMP0]]
90-
9166
#if defined(__x86_64__)
9267

9368
char test__readgsbyte(unsigned long Offset) {

0 commit comments

Comments
 (0)