@@ -64,30 +64,54 @@ unsigned __int64 test__emulu(unsigned int a, unsigned int b) {
64
64
// CHECK: ret i64 [[RES]]
65
65
66
66
67
- int test_inp (unsigned short port ) {
68
- return _inp (port );
67
+ unsigned char test_inbyte (unsigned short port ) {
68
+ return __inbyte (port );
69
69
}
70
- // CHECK-LABEL: i32 @test_inp (i16 noundef
70
+ // CHECK-LABEL: i8 @test_inbyte (i16 noundef
71
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]]
72
+ // CHECK: [[TMP0:%.*]] = tail call i8 asm sideeffect "inb ${1:w}, ${0:b}", "={ax},N{dx},~{dirflag},~{fpsr},~{flags}"(i16 [[PORT]])
73
+ // CHECK-NEXT: ret i8 [[TMP0]]
74
74
75
- unsigned short test_inpw (unsigned short port ) {
76
- return _inpw (port );
75
+ unsigned short test_inword (unsigned short port ) {
76
+ return __inword (port );
77
77
}
78
- // CHECK-LABEL: i16 @test_inpw (i16 noundef
78
+ // CHECK-LABEL: i16 @test_inword (i16 noundef
79
79
// CHECK-SAME: [[PORT:%.*]])
80
80
// CHECK: [[TMP0:%.*]] = tail call i16 asm sideeffect "inw ${1:w}, ${0:w}", "={ax},N{dx},~{dirflag},~{fpsr},~{flags}"(i16 [[PORT]])
81
81
// CHECK-NEXT: ret i16 [[TMP0]]
82
82
83
- unsigned long test_inpd (unsigned short port ) {
84
- return _inpd (port );
83
+ unsigned long test_indword (unsigned short port ) {
84
+ return __indword (port );
85
85
}
86
- // CHECK-LABEL: i32 @test_inpd (i16 noundef
86
+ // CHECK-LABEL: i32 @test_indword (i16 noundef
87
87
// CHECK-SAME: [[PORT:%.*]])
88
88
// CHECK: [[TMP0:%.*]] = tail call i32 asm sideeffect "inl ${1:w}, ${0:k}", "={ax},N{dx},~{dirflag},~{fpsr},~{flags}"(i16 [[PORT]])
89
89
// CHECK-NEXT: ret i32 [[TMP0]]
90
90
91
+ void test_outbyte (unsigned short port , unsigned char data ) {
92
+ return __outbyte (port , data );
93
+ }
94
+ // CHECK-LABEL: void @test_outbyte(
95
+ // CHECK-SAME: [[PORT:%.*]],
96
+ // CHECK-SAME: [[DATA:%.*]])
97
+ // CHECK: tail call void asm sideeffect "outb ${0:b}, ${1:w}", "{ax},N{dx},~{dirflag},~{fpsr},~{flags}"(i8 [[DATA]], i16 [[PORT]])
98
+
99
+ void test_outword (unsigned short port , unsigned short data ) {
100
+ return __outword (port , data );
101
+ }
102
+ // CHECK-LABEL: void @test_outword(
103
+ // CHECK-SAME: [[PORT:%.*]],
104
+ // CHECK-SAME: [[DATA:%.*]])
105
+ // CHECK: tail call void asm sideeffect "outw ${0:w}, ${1:w}", "{ax},N{dx},~{dirflag},~{fpsr},~{flags}"(i16 [[DATA]], i16 [[PORT]])
106
+
107
+ void test_outdword (unsigned short port , unsigned long data ) {
108
+ return __outdword (port , data );
109
+ }
110
+ // CHECK-LABEL: void @test_outdword(
111
+ // CHECK-SAME: [[PORT:%.*]],
112
+ // CHECK-SAME: [[DATA:%.*]])
113
+ // CHECK: tail call void asm sideeffect "outl ${0:k}, ${1:w}", "{ax},N{dx},~{dirflag},~{fpsr},~{flags}"(i32 [[DATA]], i16 [[PORT]])
114
+
91
115
#if defined(__x86_64__ )
92
116
93
117
char test__readgsbyte (unsigned long Offset ) {
0 commit comments