-
Notifications
You must be signed in to change notification settings - Fork 13.4k
[clang][ARM][AArch64] Don't require arm_acle header for universally defined intrinsics #136742
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…efined intrinsics Signed-off-by: Sarnie, Nick <nick.sarnie@intel.com>
✅ With the latest revision this PR passed the C/C++ code formatter. |
@llvm/pr-subscribers-backend-aarch64 @llvm/pr-subscribers-clang Author: Nick Sarnie (sarnex) ChangesUnfortunately the shipped Windows SDK uses Full diff: https://github.com/llvm/llvm-project/pull/136742.diff 11 Files Affected:
diff --git a/clang/include/clang/Basic/BuiltinHeaders.def b/clang/include/clang/Basic/BuiltinHeaders.def
index 22668ec7a3396..8e4a2f9bee9aa 100644
--- a/clang/include/clang/Basic/BuiltinHeaders.def
+++ b/clang/include/clang/Basic/BuiltinHeaders.def
@@ -12,7 +12,6 @@
//===----------------------------------------------------------------------===//
HEADER(NO_HEADER, nullptr)
-HEADER(ARMACLE_H, "arm_acle.h")
HEADER(BLOCKS_H, "Blocks.h")
HEADER(COMPLEX_H, "complex.h")
HEADER(CTYPE_H, "ctype.h")
diff --git a/clang/include/clang/Basic/BuiltinsAArch64.def b/clang/include/clang/Basic/BuiltinsAArch64.def
index 19fa7215b5000..b52219a9a22d8 100644
--- a/clang/include/clang/Basic/BuiltinsAArch64.def
+++ b/clang/include/clang/Basic/BuiltinsAArch64.def
@@ -50,11 +50,11 @@ BUILTIN(__builtin_arm_wfi, "v", "")
BUILTIN(__builtin_arm_sev, "v", "")
BUILTIN(__builtin_arm_sevl, "v", "")
BUILTIN(__builtin_arm_chkfeat, "WUiWUi", "")
-TARGET_HEADER_BUILTIN(__yield, "v", "h", ARMACLE_H, ALL_LANGUAGES, "")
-TARGET_HEADER_BUILTIN(__wfe, "v", "h", ARMACLE_H, ALL_LANGUAGES, "")
-TARGET_HEADER_BUILTIN(__wfi, "v", "h", ARMACLE_H, ALL_LANGUAGES, "")
-TARGET_HEADER_BUILTIN(__sev, "v", "h", ARMACLE_H, ALL_LANGUAGES, "")
-TARGET_HEADER_BUILTIN(__sevl, "v", "h", ARMACLE_H, ALL_LANGUAGES, "")
+BUILTIN(__yield, "v", "")
+BUILTIN(__wfe, "v", "")
+BUILTIN(__wfi, "v", "")
+BUILTIN(__sev, "v", "")
+BUILTIN(__sevl, "v", "")
// Like __builtin_trap but provide an 16-bit immediate reason code (which goes into `brk #N`).
BUILTIN(__builtin_arm_trap, "vUIs", "nr")
@@ -87,9 +87,9 @@ TARGET_BUILTIN(__builtin_arm_mops_memset_tag, "v*v*iz", "", "mte,mops")
BUILTIN(__builtin_arm_dmb, "vUi", "nc")
BUILTIN(__builtin_arm_dsb, "vUi", "nc")
BUILTIN(__builtin_arm_isb, "vUi", "nc")
-TARGET_HEADER_BUILTIN(__dmb, "vUi", "nch", ARMACLE_H, ALL_LANGUAGES, "")
-TARGET_HEADER_BUILTIN(__dsb, "vUi", "nch", ARMACLE_H, ALL_LANGUAGES, "")
-TARGET_HEADER_BUILTIN(__isb, "vUi", "nch", ARMACLE_H, ALL_LANGUAGES, "")
+BUILTIN(__dmb, "vUi", "nc")
+BUILTIN(__dsb, "vUi", "nc")
+BUILTIN(__isb, "vUi", "nc")
TARGET_BUILTIN(__builtin_arm_jcvt, "Zid", "nc", "v8.3a")
diff --git a/clang/include/clang/Basic/BuiltinsARM.def b/clang/include/clang/Basic/BuiltinsARM.def
index 2592e25e95c37..5059e996c28d3 100644
--- a/clang/include/clang/Basic/BuiltinsARM.def
+++ b/clang/include/clang/Basic/BuiltinsARM.def
@@ -186,19 +186,19 @@ BUILTIN(__builtin_arm_wfi, "v", "")
BUILTIN(__builtin_arm_sev, "v", "")
BUILTIN(__builtin_arm_sevl, "v", "")
BUILTIN(__builtin_arm_dbg, "vUi", "")
-TARGET_HEADER_BUILTIN(__yield, "v", "h", ARMACLE_H, ALL_LANGUAGES, "")
-TARGET_HEADER_BUILTIN(__wfe, "v", "h", ARMACLE_H, ALL_LANGUAGES, "")
-TARGET_HEADER_BUILTIN(__wfi, "v", "h", ARMACLE_H, ALL_LANGUAGES, "")
-TARGET_HEADER_BUILTIN(__sev, "v", "h", ARMACLE_H, ALL_LANGUAGES, "")
-TARGET_HEADER_BUILTIN(__sevl, "v", "h", ARMACLE_H, ALL_LANGUAGES, "")
+BUILTIN(__yield, "v", "")
+BUILTIN(__wfe, "v", "")
+BUILTIN(__wfi, "v", "")
+BUILTIN(__sev, "v", "")
+BUILTIN(__sevl, "v", "")
// Data barrier
BUILTIN(__builtin_arm_dmb, "vUi", "nc")
BUILTIN(__builtin_arm_dsb, "vUi", "nc")
BUILTIN(__builtin_arm_isb, "vUi", "nc")
-TARGET_HEADER_BUILTIN(__dmb, "vUi", "nch", ARMACLE_H, ALL_LANGUAGES, "")
-TARGET_HEADER_BUILTIN(__dsb, "vUi", "nch", ARMACLE_H, ALL_LANGUAGES, "")
-TARGET_HEADER_BUILTIN(__isb, "vUi", "nch", ARMACLE_H, ALL_LANGUAGES, "")
+BUILTIN(__dmb, "vUi", "nc")
+BUILTIN(__dsb, "vUi", "nc")
+BUILTIN(__isb, "vUi", "nc")
// Prefetch
BUILTIN(__builtin_arm_prefetch, "vvC*UiUi", "nc")
diff --git a/clang/lib/Headers/arm_acle.h b/clang/lib/Headers/arm_acle.h
index 89db5dc2d7aaa..8a139f4a0a241 100644
--- a/clang/lib/Headers/arm_acle.h
+++ b/clang/lib/Headers/arm_acle.h
@@ -29,16 +29,20 @@ extern "C" {
/* 7 SYNCHRONIZATION, BARRIER AND HINT INTRINSICS */
/* 7.3 Memory barriers */
+/*
void __dmb(unsigned int);
void __dsb(unsigned int);
void __isb(unsigned int);
+*/
/* 7.4 Hints */
+/*
void __wfi(void);
void __wfe(void);
void __sev(void);
void __sevl(void);
void __yield(void);
+*/
#if defined(__ARM_32BIT_STATE) && __ARM_32BIT_STATE
#define __dbg(t) __builtin_arm_dbg(t)
diff --git a/clang/test/CodeGen/arm-former-microsoft-intrinsics-header-warning.c b/clang/test/CodeGen/arm-former-microsoft-intrinsics-header-warning.c
deleted file mode 100644
index 8edcbbeb0375d..0000000000000
--- a/clang/test/CodeGen/arm-former-microsoft-intrinsics-header-warning.c
+++ /dev/null
@@ -1,50 +0,0 @@
-// RUN: %clang_cc1 -triple thumbv7-windows -fms-compatibility -Wno-everything -Wimplicit-function-declaration -fsyntax-only -verify %s
-// RUN: %clang_cc1 -triple armv7-eabi -Wno-everything -Wimplicit-function-declaration -fsyntax-only -verify %s
-
-void check__dmb(void) {
- // expected-warning@+2{{call to undeclared library function}}
- // expected-note@+1{{include the header <arm_acle.h> or explicitly provide a declaration for}}
- __dmb(0);
-}
-
-void check__dsb(void) {
- // expected-warning@+2{{call to undeclared library function}}
- // expected-note@+1{{include the header <arm_acle.h> or explicitly provide a declaration for}}
- __dsb(0);
-}
-
-void check__isb(void) {
- // expected-warning@+2{{call to undeclared library function}}
- // expected-note@+1{{include the header <arm_acle.h> or explicitly provide a declaration for}}
- __isb(0);
-}
-
-void check__yield(void) {
- // expected-warning@+2{{call to undeclared library function}}
- // expected-note@+1{{include the header <arm_acle.h> or explicitly provide a declaration for}}
- __yield();
-}
-
-void check__wfe(void) {
- // expected-warning@+2{{call to undeclared library function}}
- // expected-note@+1{{include the header <arm_acle.h> or explicitly provide a declaration for}}
- __wfe();
-}
-
-void check__wfi(void) {
- // expected-warning@+2{{call to undeclared library function}}
- // expected-note@+1{{include the header <arm_acle.h> or explicitly provide a declaration for}}
- __wfi();
-}
-
-void check__sev(void) {
- // expected-warning@+2{{call to undeclared library function}}
- // expected-note@+1{{include the header <arm_acle.h> or explicitly provide a declaration for}}
- __sev();
-}
-
-void check__sevl(void) {
- // expected-warning@+2{{call to undeclared library function}}
- // expected-note@+1{{include the header <arm_acle.h> or explicitly provide a declaration for}}
- __sevl();
-}
diff --git a/clang/test/CodeGen/arm-former-microsoft-intrinsics.c b/clang/test/CodeGen/arm-former-microsoft-intrinsics.c
index 8a02602dc9876..d8fc49bd10a51 100644
--- a/clang/test/CodeGen/arm-former-microsoft-intrinsics.c
+++ b/clang/test/CodeGen/arm-former-microsoft-intrinsics.c
@@ -3,7 +3,6 @@
// RUN: %clang_cc1 -triple armv7-eabi -Werror -emit-llvm -o - %s \
// RUN: | FileCheck %s
-#include <arm_acle.h>
void check__dmb(void) {
__dmb(0);
}
diff --git a/clang/test/CodeGen/arm64-former-microsoft-intrinsics-header-warning.c b/clang/test/CodeGen/arm64-former-microsoft-intrinsics-header-warning.c
deleted file mode 100644
index 52fed49db4dd2..0000000000000
--- a/clang/test/CodeGen/arm64-former-microsoft-intrinsics-header-warning.c
+++ /dev/null
@@ -1,53 +0,0 @@
-// RUN: %clang_cc1 -triple arm64-windows -Wno-everything -Wimplicit-function-declaration -fms-compatibility -fsyntax-only -verify %s
-
-// RUN: %clang_cc1 -triple arm64-linux -Wno-everything -Wimplicit-function-declaration -fsyntax-only -verify %s
-
-// RUN: %clang_cc1 -triple arm64-darwin -Wno-everything -Wimplicit-function-declaration -fms-compatibility -fsyntax-only -verify %s
-
-void check__dmb(void) {
- // expected-warning@+2{{call to undeclared library function}}
- // expected-note@+1{{include the header <arm_acle.h> or explicitly provide a declaration for}}
- __dmb(0);
-}
-
-void check__dsb(void) {
- // expected-warning@+2{{call to undeclared library function}}
- // expected-note@+1{{include the header <arm_acle.h> or explicitly provide a declaration for}}
- __dsb(0);
-}
-
-void check__isb(void) {
- // expected-warning@+2{{call to undeclared library function}}
- // expected-note@+1{{include the header <arm_acle.h> or explicitly provide a declaration for}}
- __isb(0);
-}
-
-void check__yield(void) {
- // expected-warning@+2{{call to undeclared library function}}
- // expected-note@+1{{include the header <arm_acle.h> or explicitly provide a declaration for}}
- __yield();
-}
-
-void check__wfe(void) {
- // expected-warning@+2{{call to undeclared library function}}
- // expected-note@+1{{include the header <arm_acle.h> or explicitly provide a declaration for}}
- __wfe();
-}
-
-void check__wfi(void) {
- // expected-warning@+2{{call to undeclared library function}}
- // expected-note@+1{{include the header <arm_acle.h> or explicitly provide a declaration for}}
- __wfi();
-}
-
-void check__sev(void) {
- // expected-warning@+2{{call to undeclared library function}}
- // expected-note@+1{{include the header <arm_acle.h> or explicitly provide a declaration for}}
- __sev();
-}
-
-void check__sevl(void) {
- // expected-warning@+2{{call to undeclared library function}}
- // expected-note@+1{{include the header <arm_acle.h> or explicitly provide a declaration for}}
- __sevl();
-}
diff --git a/clang/test/CodeGen/arm64-former-microsoft-intrinsics.c b/clang/test/CodeGen/arm64-former-microsoft-intrinsics.c
index f1d9af2c6d25e..9f801d9e8c4a7 100644
--- a/clang/test/CodeGen/arm64-former-microsoft-intrinsics.c
+++ b/clang/test/CodeGen/arm64-former-microsoft-intrinsics.c
@@ -7,8 +7,6 @@
// RUN: %clang_cc1 -triple arm64-darwin -Wno-implicit-function-declaration -fms-compatibility -emit-llvm -o - %s \
// RUN: | FileCheck %s
-#include <arm_acle.h>
-
void check__dmb(void) {
__dmb(0);
}
diff --git a/clang/test/CodeGen/builtins-arm-microsoft.c b/clang/test/CodeGen/builtins-arm-microsoft.c
index b2681197e33e0..5de8a71403549 100644
--- a/clang/test/CodeGen/builtins-arm-microsoft.c
+++ b/clang/test/CodeGen/builtins-arm-microsoft.c
@@ -4,8 +4,6 @@
// RUN: | FileCheck %s -check-prefix CHECK-EABI
// REQUIRES: arm-registered-target
-#include <arm_acle.h>
-
void test_yield_intrinsic() {
__yield();
}
diff --git a/clang/test/Headers/Inputs/include/stdint.h b/clang/test/Headers/Inputs/include/stdint.h
index eb09272b40c33..67b27b8dfc7b9 100644
--- a/clang/test/Headers/Inputs/include/stdint.h
+++ b/clang/test/Headers/Inputs/include/stdint.h
@@ -1,23 +1,11 @@
#ifndef STDINT_H
#define STDINT_H
-#ifdef __INT8_TYPE__
-typedef __INT8_TYPE__ int8_t;
-#endif
-typedef unsigned char uint8_t;
-
-#ifdef __INT16_TYPE__
-typedef __INT16_TYPE__ int16_t;
-typedef unsigned __INT16_TYPE__ uint16_t;
-#endif
-
#ifdef __INT32_TYPE__
-typedef __INT32_TYPE__ int32_t;
typedef unsigned __INT32_TYPE__ uint32_t;
#endif
#ifdef __INT64_TYPE__
-typedef __INT64_TYPE__ int64_t;
typedef unsigned __INT64_TYPE__ uint64_t;
#endif
diff --git a/clang/test/Headers/ms-intrin.cpp b/clang/test/Headers/ms-intrin.cpp
index 985f8577c46bf..d630883e79d6a 100644
--- a/clang/test/Headers/ms-intrin.cpp
+++ b/clang/test/Headers/ms-intrin.cpp
@@ -36,10 +36,6 @@ typedef __SIZE_TYPE__ size_t;
#include <intrin.h>
-#ifdef __ARM_ACLE
-#include <arm_acle.h>
-#endif
-
// Use some C++ to make sure we closed the extern "C" brackets.
template <typename T>
void foo(T V) {}
|
@llvm/pr-subscribers-backend-arm Author: Nick Sarnie (sarnex) ChangesUnfortunately the shipped Windows SDK uses Full diff: https://github.com/llvm/llvm-project/pull/136742.diff 11 Files Affected:
diff --git a/clang/include/clang/Basic/BuiltinHeaders.def b/clang/include/clang/Basic/BuiltinHeaders.def
index 22668ec7a3396..8e4a2f9bee9aa 100644
--- a/clang/include/clang/Basic/BuiltinHeaders.def
+++ b/clang/include/clang/Basic/BuiltinHeaders.def
@@ -12,7 +12,6 @@
//===----------------------------------------------------------------------===//
HEADER(NO_HEADER, nullptr)
-HEADER(ARMACLE_H, "arm_acle.h")
HEADER(BLOCKS_H, "Blocks.h")
HEADER(COMPLEX_H, "complex.h")
HEADER(CTYPE_H, "ctype.h")
diff --git a/clang/include/clang/Basic/BuiltinsAArch64.def b/clang/include/clang/Basic/BuiltinsAArch64.def
index 19fa7215b5000..b52219a9a22d8 100644
--- a/clang/include/clang/Basic/BuiltinsAArch64.def
+++ b/clang/include/clang/Basic/BuiltinsAArch64.def
@@ -50,11 +50,11 @@ BUILTIN(__builtin_arm_wfi, "v", "")
BUILTIN(__builtin_arm_sev, "v", "")
BUILTIN(__builtin_arm_sevl, "v", "")
BUILTIN(__builtin_arm_chkfeat, "WUiWUi", "")
-TARGET_HEADER_BUILTIN(__yield, "v", "h", ARMACLE_H, ALL_LANGUAGES, "")
-TARGET_HEADER_BUILTIN(__wfe, "v", "h", ARMACLE_H, ALL_LANGUAGES, "")
-TARGET_HEADER_BUILTIN(__wfi, "v", "h", ARMACLE_H, ALL_LANGUAGES, "")
-TARGET_HEADER_BUILTIN(__sev, "v", "h", ARMACLE_H, ALL_LANGUAGES, "")
-TARGET_HEADER_BUILTIN(__sevl, "v", "h", ARMACLE_H, ALL_LANGUAGES, "")
+BUILTIN(__yield, "v", "")
+BUILTIN(__wfe, "v", "")
+BUILTIN(__wfi, "v", "")
+BUILTIN(__sev, "v", "")
+BUILTIN(__sevl, "v", "")
// Like __builtin_trap but provide an 16-bit immediate reason code (which goes into `brk #N`).
BUILTIN(__builtin_arm_trap, "vUIs", "nr")
@@ -87,9 +87,9 @@ TARGET_BUILTIN(__builtin_arm_mops_memset_tag, "v*v*iz", "", "mte,mops")
BUILTIN(__builtin_arm_dmb, "vUi", "nc")
BUILTIN(__builtin_arm_dsb, "vUi", "nc")
BUILTIN(__builtin_arm_isb, "vUi", "nc")
-TARGET_HEADER_BUILTIN(__dmb, "vUi", "nch", ARMACLE_H, ALL_LANGUAGES, "")
-TARGET_HEADER_BUILTIN(__dsb, "vUi", "nch", ARMACLE_H, ALL_LANGUAGES, "")
-TARGET_HEADER_BUILTIN(__isb, "vUi", "nch", ARMACLE_H, ALL_LANGUAGES, "")
+BUILTIN(__dmb, "vUi", "nc")
+BUILTIN(__dsb, "vUi", "nc")
+BUILTIN(__isb, "vUi", "nc")
TARGET_BUILTIN(__builtin_arm_jcvt, "Zid", "nc", "v8.3a")
diff --git a/clang/include/clang/Basic/BuiltinsARM.def b/clang/include/clang/Basic/BuiltinsARM.def
index 2592e25e95c37..5059e996c28d3 100644
--- a/clang/include/clang/Basic/BuiltinsARM.def
+++ b/clang/include/clang/Basic/BuiltinsARM.def
@@ -186,19 +186,19 @@ BUILTIN(__builtin_arm_wfi, "v", "")
BUILTIN(__builtin_arm_sev, "v", "")
BUILTIN(__builtin_arm_sevl, "v", "")
BUILTIN(__builtin_arm_dbg, "vUi", "")
-TARGET_HEADER_BUILTIN(__yield, "v", "h", ARMACLE_H, ALL_LANGUAGES, "")
-TARGET_HEADER_BUILTIN(__wfe, "v", "h", ARMACLE_H, ALL_LANGUAGES, "")
-TARGET_HEADER_BUILTIN(__wfi, "v", "h", ARMACLE_H, ALL_LANGUAGES, "")
-TARGET_HEADER_BUILTIN(__sev, "v", "h", ARMACLE_H, ALL_LANGUAGES, "")
-TARGET_HEADER_BUILTIN(__sevl, "v", "h", ARMACLE_H, ALL_LANGUAGES, "")
+BUILTIN(__yield, "v", "")
+BUILTIN(__wfe, "v", "")
+BUILTIN(__wfi, "v", "")
+BUILTIN(__sev, "v", "")
+BUILTIN(__sevl, "v", "")
// Data barrier
BUILTIN(__builtin_arm_dmb, "vUi", "nc")
BUILTIN(__builtin_arm_dsb, "vUi", "nc")
BUILTIN(__builtin_arm_isb, "vUi", "nc")
-TARGET_HEADER_BUILTIN(__dmb, "vUi", "nch", ARMACLE_H, ALL_LANGUAGES, "")
-TARGET_HEADER_BUILTIN(__dsb, "vUi", "nch", ARMACLE_H, ALL_LANGUAGES, "")
-TARGET_HEADER_BUILTIN(__isb, "vUi", "nch", ARMACLE_H, ALL_LANGUAGES, "")
+BUILTIN(__dmb, "vUi", "nc")
+BUILTIN(__dsb, "vUi", "nc")
+BUILTIN(__isb, "vUi", "nc")
// Prefetch
BUILTIN(__builtin_arm_prefetch, "vvC*UiUi", "nc")
diff --git a/clang/lib/Headers/arm_acle.h b/clang/lib/Headers/arm_acle.h
index 89db5dc2d7aaa..8a139f4a0a241 100644
--- a/clang/lib/Headers/arm_acle.h
+++ b/clang/lib/Headers/arm_acle.h
@@ -29,16 +29,20 @@ extern "C" {
/* 7 SYNCHRONIZATION, BARRIER AND HINT INTRINSICS */
/* 7.3 Memory barriers */
+/*
void __dmb(unsigned int);
void __dsb(unsigned int);
void __isb(unsigned int);
+*/
/* 7.4 Hints */
+/*
void __wfi(void);
void __wfe(void);
void __sev(void);
void __sevl(void);
void __yield(void);
+*/
#if defined(__ARM_32BIT_STATE) && __ARM_32BIT_STATE
#define __dbg(t) __builtin_arm_dbg(t)
diff --git a/clang/test/CodeGen/arm-former-microsoft-intrinsics-header-warning.c b/clang/test/CodeGen/arm-former-microsoft-intrinsics-header-warning.c
deleted file mode 100644
index 8edcbbeb0375d..0000000000000
--- a/clang/test/CodeGen/arm-former-microsoft-intrinsics-header-warning.c
+++ /dev/null
@@ -1,50 +0,0 @@
-// RUN: %clang_cc1 -triple thumbv7-windows -fms-compatibility -Wno-everything -Wimplicit-function-declaration -fsyntax-only -verify %s
-// RUN: %clang_cc1 -triple armv7-eabi -Wno-everything -Wimplicit-function-declaration -fsyntax-only -verify %s
-
-void check__dmb(void) {
- // expected-warning@+2{{call to undeclared library function}}
- // expected-note@+1{{include the header <arm_acle.h> or explicitly provide a declaration for}}
- __dmb(0);
-}
-
-void check__dsb(void) {
- // expected-warning@+2{{call to undeclared library function}}
- // expected-note@+1{{include the header <arm_acle.h> or explicitly provide a declaration for}}
- __dsb(0);
-}
-
-void check__isb(void) {
- // expected-warning@+2{{call to undeclared library function}}
- // expected-note@+1{{include the header <arm_acle.h> or explicitly provide a declaration for}}
- __isb(0);
-}
-
-void check__yield(void) {
- // expected-warning@+2{{call to undeclared library function}}
- // expected-note@+1{{include the header <arm_acle.h> or explicitly provide a declaration for}}
- __yield();
-}
-
-void check__wfe(void) {
- // expected-warning@+2{{call to undeclared library function}}
- // expected-note@+1{{include the header <arm_acle.h> or explicitly provide a declaration for}}
- __wfe();
-}
-
-void check__wfi(void) {
- // expected-warning@+2{{call to undeclared library function}}
- // expected-note@+1{{include the header <arm_acle.h> or explicitly provide a declaration for}}
- __wfi();
-}
-
-void check__sev(void) {
- // expected-warning@+2{{call to undeclared library function}}
- // expected-note@+1{{include the header <arm_acle.h> or explicitly provide a declaration for}}
- __sev();
-}
-
-void check__sevl(void) {
- // expected-warning@+2{{call to undeclared library function}}
- // expected-note@+1{{include the header <arm_acle.h> or explicitly provide a declaration for}}
- __sevl();
-}
diff --git a/clang/test/CodeGen/arm-former-microsoft-intrinsics.c b/clang/test/CodeGen/arm-former-microsoft-intrinsics.c
index 8a02602dc9876..d8fc49bd10a51 100644
--- a/clang/test/CodeGen/arm-former-microsoft-intrinsics.c
+++ b/clang/test/CodeGen/arm-former-microsoft-intrinsics.c
@@ -3,7 +3,6 @@
// RUN: %clang_cc1 -triple armv7-eabi -Werror -emit-llvm -o - %s \
// RUN: | FileCheck %s
-#include <arm_acle.h>
void check__dmb(void) {
__dmb(0);
}
diff --git a/clang/test/CodeGen/arm64-former-microsoft-intrinsics-header-warning.c b/clang/test/CodeGen/arm64-former-microsoft-intrinsics-header-warning.c
deleted file mode 100644
index 52fed49db4dd2..0000000000000
--- a/clang/test/CodeGen/arm64-former-microsoft-intrinsics-header-warning.c
+++ /dev/null
@@ -1,53 +0,0 @@
-// RUN: %clang_cc1 -triple arm64-windows -Wno-everything -Wimplicit-function-declaration -fms-compatibility -fsyntax-only -verify %s
-
-// RUN: %clang_cc1 -triple arm64-linux -Wno-everything -Wimplicit-function-declaration -fsyntax-only -verify %s
-
-// RUN: %clang_cc1 -triple arm64-darwin -Wno-everything -Wimplicit-function-declaration -fms-compatibility -fsyntax-only -verify %s
-
-void check__dmb(void) {
- // expected-warning@+2{{call to undeclared library function}}
- // expected-note@+1{{include the header <arm_acle.h> or explicitly provide a declaration for}}
- __dmb(0);
-}
-
-void check__dsb(void) {
- // expected-warning@+2{{call to undeclared library function}}
- // expected-note@+1{{include the header <arm_acle.h> or explicitly provide a declaration for}}
- __dsb(0);
-}
-
-void check__isb(void) {
- // expected-warning@+2{{call to undeclared library function}}
- // expected-note@+1{{include the header <arm_acle.h> or explicitly provide a declaration for}}
- __isb(0);
-}
-
-void check__yield(void) {
- // expected-warning@+2{{call to undeclared library function}}
- // expected-note@+1{{include the header <arm_acle.h> or explicitly provide a declaration for}}
- __yield();
-}
-
-void check__wfe(void) {
- // expected-warning@+2{{call to undeclared library function}}
- // expected-note@+1{{include the header <arm_acle.h> or explicitly provide a declaration for}}
- __wfe();
-}
-
-void check__wfi(void) {
- // expected-warning@+2{{call to undeclared library function}}
- // expected-note@+1{{include the header <arm_acle.h> or explicitly provide a declaration for}}
- __wfi();
-}
-
-void check__sev(void) {
- // expected-warning@+2{{call to undeclared library function}}
- // expected-note@+1{{include the header <arm_acle.h> or explicitly provide a declaration for}}
- __sev();
-}
-
-void check__sevl(void) {
- // expected-warning@+2{{call to undeclared library function}}
- // expected-note@+1{{include the header <arm_acle.h> or explicitly provide a declaration for}}
- __sevl();
-}
diff --git a/clang/test/CodeGen/arm64-former-microsoft-intrinsics.c b/clang/test/CodeGen/arm64-former-microsoft-intrinsics.c
index f1d9af2c6d25e..9f801d9e8c4a7 100644
--- a/clang/test/CodeGen/arm64-former-microsoft-intrinsics.c
+++ b/clang/test/CodeGen/arm64-former-microsoft-intrinsics.c
@@ -7,8 +7,6 @@
// RUN: %clang_cc1 -triple arm64-darwin -Wno-implicit-function-declaration -fms-compatibility -emit-llvm -o - %s \
// RUN: | FileCheck %s
-#include <arm_acle.h>
-
void check__dmb(void) {
__dmb(0);
}
diff --git a/clang/test/CodeGen/builtins-arm-microsoft.c b/clang/test/CodeGen/builtins-arm-microsoft.c
index b2681197e33e0..5de8a71403549 100644
--- a/clang/test/CodeGen/builtins-arm-microsoft.c
+++ b/clang/test/CodeGen/builtins-arm-microsoft.c
@@ -4,8 +4,6 @@
// RUN: | FileCheck %s -check-prefix CHECK-EABI
// REQUIRES: arm-registered-target
-#include <arm_acle.h>
-
void test_yield_intrinsic() {
__yield();
}
diff --git a/clang/test/Headers/Inputs/include/stdint.h b/clang/test/Headers/Inputs/include/stdint.h
index eb09272b40c33..67b27b8dfc7b9 100644
--- a/clang/test/Headers/Inputs/include/stdint.h
+++ b/clang/test/Headers/Inputs/include/stdint.h
@@ -1,23 +1,11 @@
#ifndef STDINT_H
#define STDINT_H
-#ifdef __INT8_TYPE__
-typedef __INT8_TYPE__ int8_t;
-#endif
-typedef unsigned char uint8_t;
-
-#ifdef __INT16_TYPE__
-typedef __INT16_TYPE__ int16_t;
-typedef unsigned __INT16_TYPE__ uint16_t;
-#endif
-
#ifdef __INT32_TYPE__
-typedef __INT32_TYPE__ int32_t;
typedef unsigned __INT32_TYPE__ uint32_t;
#endif
#ifdef __INT64_TYPE__
-typedef __INT64_TYPE__ int64_t;
typedef unsigned __INT64_TYPE__ uint64_t;
#endif
diff --git a/clang/test/Headers/ms-intrin.cpp b/clang/test/Headers/ms-intrin.cpp
index 985f8577c46bf..d630883e79d6a 100644
--- a/clang/test/Headers/ms-intrin.cpp
+++ b/clang/test/Headers/ms-intrin.cpp
@@ -36,10 +36,6 @@ typedef __SIZE_TYPE__ size_t;
#include <intrin.h>
-#ifdef __ARM_ACLE
-#include <arm_acle.h>
-#endif
-
// Use some C++ to make sure we closed the extern "C" brackets.
template <typename T>
void foo(T V) {}
|
I think we should revert #128222 if we can't move forward with this one soon. Unfortunately I'm not sure if I'm qualified to review it. |
Sure, but winnt.h declares and uses tons of x86 intrinsics already, and we have a way to make this work. Let me go look at what we did for We want to do something similar to a default-error-warning, where system headers like winnt.h are allowed to be non-portable (use the MSVC intrinsic model), but we push users to write portable code by including the relevant portable intrinsic header (arm_acle.h). |
Thanks, let me know what you find! I'll probably revert the original patch tomorrow to fix the regression and then rework it with the fix. |
Unfortunately the shipped Windows SDK uses
__isb
without includingarm_acle.h
so we will break existing code if we require it.See #128222 for more info.