https://github.com/RKSimon commented:
Maybe add this to ReleaseNotes?
https://github.com/llvm/llvm-project/pull/93804
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/phoebewang closed
https://github.com/llvm/llvm-project/pull/93804
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/phoebewang approved this pull request.
LGTM.
https://github.com/llvm/llvm-project/pull/93804
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -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"
@@ -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"
https://github.com/MalaySanghi edited
https://github.com/llvm/llvm-project/pull/93804
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/MalaySanghi updated
https://github.com/llvm/llvm-project/pull/93804
>From de79bf75b68825440b939f030e1d659d26f3d2ea Mon Sep 17 00:00:00 2001
From: Malay Sanghi
Date: Thu, 30 May 2024 01:39:41 -0700
Subject: [PATCH 1/5] Add support for MS inp functions.
support _inp, _inpw, _i
@@ -329,6 +329,28 @@ 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"
@@ -329,6 +329,28 @@ 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"
@@ -63,6 +63,47 @@ unsigned __int64 test__emulu(unsigned int a, unsigned int b)
{
// CHECK: [[RES:%[0-9]+]] = mul nuw i64 [[Y]], [[X]]
// CHECK: ret i64 [[RES]]
+
+int test_inp(unsigned short port) {
+ return _inp(port);
+}
+// CHECK-LABEL: i32 @test_inp(i16 noundef
+// CHEC
https://github.com/MalaySanghi updated
https://github.com/llvm/llvm-project/pull/93804
>From de79bf75b68825440b939f030e1d659d26f3d2ea Mon Sep 17 00:00:00 2001
From: Malay Sanghi
Date: Thu, 30 May 2024 01:39:41 -0700
Subject: [PATCH 1/4] Add support for MS inp functions.
support _inp, _inpw, _i
@@ -63,6 +63,47 @@ unsigned __int64 test__emulu(unsigned int a, unsigned int b)
{
// CHECK: [[RES:%[0-9]+]] = mul nuw i64 [[Y]], [[X]]
// CHECK: ret i64 [[RES]]
+
+int test_inp(unsigned short port) {
+ return _inp(port);
+}
+// CHECK-LABEL: i32 @test_inp(i16 noundef
+// CHEC
@@ -329,6 +329,28 @@ 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 %b1, %b0"
https://github.com/MalaySanghi updated
https://github.com/llvm/llvm-project/pull/93804
>From de79bf75b68825440b939f030e1d659d26f3d2ea Mon Sep 17 00:00:00 2001
From: Malay Sanghi
Date: Thu, 30 May 2024 01:39:41 -0700
Subject: [PATCH 1/3] Add support for MS inp functions.
support _inp, _inpw, _i
@@ -329,6 +329,28 @@ 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 %b1, %b0"
@@ -329,6 +329,28 @@ 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 %b1, %b0"
@@ -63,6 +63,82 @@ unsigned __int64 test__emulu(unsigned int a, unsigned int b)
{
// CHECK: [[RES:%[0-9]+]] = mul nuw i64 [[Y]], [[X]]
// CHECK: ret i64 [[RES]]
+
+int test_inp(unsigned short port) {
+ return _inp(port);
+}
+// CHECK-I386-LABEL: define dso_local i32 @test_in
https://github.com/MalaySanghi updated
https://github.com/llvm/llvm-project/pull/93804
>From de79bf75b68825440b939f030e1d659d26f3d2ea Mon Sep 17 00:00:00 2001
From: Malay Sanghi
Date: Thu, 30 May 2024 01:39:41 -0700
Subject: [PATCH 1/2] Add support for MS inp functions.
support _inp, _inpw, _i
@@ -63,6 +63,82 @@ unsigned __int64 test__emulu(unsigned int a, unsigned int b)
{
// CHECK: [[RES:%[0-9]+]] = mul nuw i64 [[Y]], [[X]]
// CHECK: ret i64 [[RES]]
+
+int test_inp(unsigned short port) {
+ return _inp(port);
+}
+// CHECK-I386-LABEL: define dso_local i32 @test_in
@@ -63,6 +63,82 @@ unsigned __int64 test__emulu(unsigned int a, unsigned int b)
{
// CHECK: [[RES:%[0-9]+]] = mul nuw i64 [[Y]], [[X]]
// CHECK: ret i64 [[RES]]
+
+int test_inp(unsigned short port) {
+ return _inp(port);
+}
+// CHECK-I386-LABEL: define dso_local i32 @test_in
@@ -63,6 +63,82 @@ unsigned __int64 test__emulu(unsigned int a, unsigned int b)
{
// CHECK: [[RES:%[0-9]+]] = mul nuw i64 [[Y]], [[X]]
// CHECK: ret i64 [[RES]]
+
+int test_inp(unsigned short port) {
+ return _inp(port);
+}
+// CHECK-I386-LABEL: define dso_local i32 @test_in
@@ -63,6 +63,82 @@ unsigned __int64 test__emulu(unsigned int a, unsigned int b)
{
// CHECK: [[RES:%[0-9]+]] = mul nuw i64 [[Y]], [[X]]
// CHECK: ret i64 [[RES]]
+
+int test_inp(unsigned short port) {
+ return _inp(port);
+}
+// CHECK-I386-LABEL: define dso_local i32 @test_in
@@ -63,6 +63,82 @@ unsigned __int64 test__emulu(unsigned int a, unsigned int b)
{
// CHECK: [[RES:%[0-9]+]] = mul nuw i64 [[Y]], [[X]]
// CHECK: ret i64 [[RES]]
+
+int test_inp(unsigned short port) {
+ return _inp(port);
+}
+// CHECK-I386-LABEL: define dso_local i32 @test_in
https://github.com/MalaySanghi edited
https://github.com/llvm/llvm-project/pull/93804
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
24 matches
Mail list logo