[clang] [llvm] Add ifunc support for Windows on AArch64. (PR #111962)

2024-11-13 Thread Daniel Kiss via cfe-commits
DanielKristofKiss wrote: ping https://github.com/llvm/llvm-project/pull/111962 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Add ifunc support for Windows on AArch64. (PR #111962)

2024-11-08 Thread Daniel Kiss via cfe-commits
@@ -5796,12 +5796,18 @@ declared entity. The entity must not have weak linkage; for example, in C++, it cannot be applied to a declaration if a definition at that location would be considered inline. -Not all targets support this attribute. ELF target support depends on both

[clang] [llvm] Add ifunc support for Windows on AArch64. (PR #111962)

2024-11-08 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss updated https://github.com/llvm/llvm-project/pull/111962 >From 122864160f098392c4afd1728eb924e7e26e70d9 Mon Sep 17 00:00:00 2001 From: Daniel Kiss Date: Tue, 8 Oct 2024 22:58:37 +0200 Subject: [PATCH 1/6] Add ifuncs support for Windows. --- clang/include/c

[libunwind] [libunwind][AArch64] Protect PC within libunwind's context. (PR #113368)

2024-11-06 Thread Daniel Kiss via cfe-commits
@@ -1845,8 +1884,14 @@ class _LIBUNWIND_HIDDEN Registers_arm64 { uint64_t getSP() const { return _registers.__sp; } void setSP(uint64_t value) { _registers.__sp = value; } - uint64_t getIP() const { return _registers.__pc; } - void setIP(uint6

[libunwind] [libunwind][AArch64] Protect PC within libunwind's context. (PR #113368)

2024-10-26 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss updated https://github.com/llvm/llvm-project/pull/113368 >From 3dd2f4da57eb164e67fd54b66c09cc8b771ee24f Mon Sep 17 00:00:00 2001 From: Daniel Kiss Date: Wed, 16 Oct 2024 14:48:25 -0700 Subject: [PATCH 1/6] [libunwind][AArch64] Protect PC within libunwind's

[libunwind] [libunwind][AArch64] Protect PC within libunwind's context. (PR #113368)

2024-10-25 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss updated https://github.com/llvm/llvm-project/pull/113368 >From 3dd2f4da57eb164e67fd54b66c09cc8b771ee24f Mon Sep 17 00:00:00 2001 From: Daniel Kiss Date: Wed, 16 Oct 2024 14:48:25 -0700 Subject: [PATCH 1/5] [libunwind][AArch64] Protect PC within libunwind's

[libunwind] [libunwind][AArch64] Protect PC within libunwind's context. (PR #113368)

2024-10-25 Thread Daniel Kiss via cfe-commits
DanielKristofKiss wrote: sorry for the debug here, locally I can't reproduce the test failure( macos m1, same toolchain, same build steps ) https://github.com/llvm/llvm-project/pull/113368 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:

[libunwind] [libunwind][AArch64] Protect PC within libunwind's context. (PR #113368)

2024-10-25 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss updated https://github.com/llvm/llvm-project/pull/113368 >From 3dd2f4da57eb164e67fd54b66c09cc8b771ee24f Mon Sep 17 00:00:00 2001 From: Daniel Kiss Date: Wed, 16 Oct 2024 14:48:25 -0700 Subject: [PATCH 1/4] [libunwind][AArch64] Protect PC within libunwind's

[libunwind] [libunwind][AArch64] Protect PC within libunwind's context. (PR #113368)

2024-10-25 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss updated https://github.com/llvm/llvm-project/pull/113368 >From 3dd2f4da57eb164e67fd54b66c09cc8b771ee24f Mon Sep 17 00:00:00 2001 From: Daniel Kiss Date: Wed, 16 Oct 2024 14:48:25 -0700 Subject: [PATCH 1/3] [libunwind][AArch64] Protect PC within libunwind's

[libunwind] [libunwind][AArch64] Protect PC within libunwind's context. (PR #113368)

2024-10-24 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss updated https://github.com/llvm/llvm-project/pull/113368 >From 3dd2f4da57eb164e67fd54b66c09cc8b771ee24f Mon Sep 17 00:00:00 2001 From: Daniel Kiss Date: Wed, 16 Oct 2024 14:48:25 -0700 Subject: [PATCH 1/2] [libunwind][AArch64] Protect PC within libunwind's

[libunwind] [libunwind][AArch64] Protect PC within libunwind's context. (PR #113368)

2024-10-22 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss created https://github.com/llvm/llvm-project/pull/113368 Libunwind manages the registers/context including the program counter which is used effectively as a return address. __libunwind_Registers_arm64_jumpto can go anywhere where the given buffer 's PC poi

[clang] [llvm] Add ifunc support for Windows on AArch64. (PR #111962)

2024-10-15 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss updated https://github.com/llvm/llvm-project/pull/111962 >From 122864160f098392c4afd1728eb924e7e26e70d9 Mon Sep 17 00:00:00 2001 From: Daniel Kiss Date: Tue, 8 Oct 2024 22:58:37 +0200 Subject: [PATCH 1/4] Add ifuncs support for Windows. --- clang/include/c

[clang] [llvm] Add ifunc support for Windows on AArch64. (PR #111962)

2024-10-14 Thread Daniel Kiss via cfe-commits
@@ -0,0 +1,65 @@ +// RUN: %clang_cc1 -triple aarch64-pc-windows-msvc -emit-llvm -o - %s | FileCheck %s DanielKristofKiss wrote: So far, but other targets could be added here later without too much change to the test. https://github.com/llvm/llvm-project/pull/1

[clang] [llvm] Add ifunc support for Windows on AArch64. (PR #111962)

2024-10-14 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss edited https://github.com/llvm/llvm-project/pull/111962 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Add ifunc support for Windows on AArch64. (PR #111962)

2024-10-14 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss updated https://github.com/llvm/llvm-project/pull/111962 >From 122864160f098392c4afd1728eb924e7e26e70d9 Mon Sep 17 00:00:00 2001 From: Daniel Kiss Date: Tue, 8 Oct 2024 22:58:37 +0200 Subject: [PATCH 1/3] Add ifuncs support for Windows. --- clang/include/c

[clang] [llvm] Add ifunc support for Windows on AArch64. (PR #111962)

2024-10-11 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss created https://github.com/llvm/llvm-project/pull/111962 On Windows there is no platform support for ifunc but we could lower them to global function pointers. This also enables FMV for Windows with Clang and Compiler-rt. Depends on #111961 and #111960 >Fr

[clang] [PAC][clang] Use cc1 instead of driver in init-fini codegen test (PR #109247)

2024-09-19 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss approved this pull request. https://github.com/llvm/llvm-project/pull/109247 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AArch64] Add missing ACLE predefined macros and update __ARM_ACLE. (PR #108857)

2024-09-16 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss approved this pull request. Thanks! LGTM https://github.com/llvm/llvm-project/pull/108857 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AArch64] Add missing ACLE predefined macros and update __ARM_ACLE. (PR #108857)

2024-09-16 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss requested changes to this pull request. otherwise looks reasonable to me. https://github.com/llvm/llvm-project/pull/108857 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

[clang] [AArch64] Add missing ACLE predefined macros and update __ARM_ACLE. (PR #108857)

2024-09-16 Thread Daniel Kiss via cfe-commits
@@ -399,7 +399,14 @@ void AArch64TargetInfo::getTargetDefines(const LangOptions &Opts, Builder.defineMacro("__AARCH64_CMODEL_" + CodeModel + "__"); // ACLE predefines. Many can only have one possible value on v8 AArch64. - Builder.defineMacro("__ARM_ACLE", "200"); + Bui

[clang] [AArch64] Add missing ACLE predefined macros and update __ARM_ACLE. (PR #108857)

2024-09-16 Thread Daniel Kiss via cfe-commits
@@ -399,7 +399,14 @@ void AArch64TargetInfo::getTargetDefines(const LangOptions &Opts, Builder.defineMacro("__AARCH64_CMODEL_" + CodeModel + "__"); // ACLE predefines. Many can only have one possible value on v8 AArch64. - Builder.defineMacro("__ARM_ACLE", "200"); + Bui

[clang] [Clang][ARM] Make CRC and DSP intrinsics always available. (PR #107417)

2024-09-16 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss closed https://github.com/llvm/llvm-project/pull/107417 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][ARM] Make CRC and DSP intrinsics always available. (PR #107417)

2024-09-13 Thread Daniel Kiss via cfe-commits
DanielKristofKiss wrote: > I think this is OK but do you know if the dsp side works with cortex-m? > Target attributes are less likely to be used there, but it's worth testing if > the command line args are still all happy. This seems works fine: ```c #include int dsp() { return __smlabb(

[clang] [Clang][ARM] Make CRC and DSP intrinsics always available. (PR #107417)

2024-09-06 Thread Daniel Kiss via cfe-commits
DanielKristofKiss wrote: Clang-format failure is expected as I kept intentionally the format to match with the rest of the file. https://github.com/llvm/llvm-project/pull/107417 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llv

[clang] [Clang][ARM] Make CRC and DSP intrinsics always available. (PR #107417)

2024-09-05 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss created https://github.com/llvm/llvm-project/pull/107417 Both feature has target feature so can be checked if the usage is valid. >From 9dadc9bffc40e02dff9ef6a1d79968c8980892f4 Mon Sep 17 00:00:00 2001 From: Daniel Kiss Date: Thu, 5 Sep 2024 16:42:43 +0200

[clang] [Arm][AArch64][Clang] Respect function's branch protection attributes. (PR #101978)

2024-08-09 Thread Daniel Kiss via cfe-commits
DanielKristofKiss wrote: /cherry-pick 9e9fa00 https://github.com/llvm/llvm-project/pull/101978 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Arm][AArch64][Clang] Respect function's branch protection attributes. (PR #101978)

2024-08-09 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss closed https://github.com/llvm/llvm-project/pull/101978 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Arm][AArch64][Clang] Respect function's branch protection attributes. (PR #101978)

2024-08-09 Thread Daniel Kiss via cfe-commits
@@ -209,9 +209,28 @@ llvm::Value *TargetCodeGenInfo::createEnqueuedBlockKernel( void TargetCodeGenInfo::setBranchProtectionFnAttributes( const TargetInfo::BranchProtectionInfo &BPI, llvm::Function &F) { - llvm::AttrBuilder FuncAttrs(F.getContext()); - setBranchProtection

[clang] [Arm][AArch64][Clang] Respect function's branch protection attributes. (PR #101978)

2024-08-09 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss updated https://github.com/llvm/llvm-project/pull/101978 >From 4afadb9122c982c63f2b067661548a2c063590a5 Mon Sep 17 00:00:00 2001 From: Daniel Kiss Date: Mon, 5 Aug 2024 13:01:06 +0200 Subject: [PATCH 1/2] [Arm][AArch64][Clang] Respect function's branch prot

[clang] [llvm] [ARM][AArch64] BTI, GCS, PAC Module flag update. (PR #86212)

2024-08-08 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss updated https://github.com/llvm/llvm-project/pull/86212 >From f2f3356da08d68dab4431f49d0921515560e4927 Mon Sep 17 00:00:00 2001 From: Daniel Kiss Date: Fri, 8 Mar 2024 15:06:28 +0100 Subject: [PATCH 1/2] BTI,GCS,PAC Module flag update. Module flag is used t

[clang] [llvm] [ARM][AArch64] BTI, GCS, PAC Module flag update. (PR #86212)

2024-08-08 Thread Daniel Kiss via cfe-commits
@@ -5278,6 +5278,106 @@ void llvm::UpgradeFunctionAttributes(Function &F) { } } +// Check if the module attribute is present and set to one. +static bool isModuleAttributeOne(Module &M, const StringRef &ModAttr) { + const auto *Attr = + mdconst::extract_or_null(M.getMo

[clang] [llvm] [ARM][AArch64] BTI, GCS, PAC Module flag update. (PR #86212)

2024-08-08 Thread Daniel Kiss via cfe-commits
@@ -0,0 +1,86 @@ +;; Test verifies inlining happens cross module when module flags are upgraded. +;; `foo` and `main` are both old semantic while bar is the new semantic. +;; Regression test for #82763 + +; RUN: split-file %s %t +; RUN: opt -module-summary %t/foo.s -o %t/foo.o +;

[clang] [llvm] [ARM][AArch64] BTI, GCS, PAC Module flag update. (PR #86212)

2024-08-08 Thread Daniel Kiss via cfe-commits
@@ -0,0 +1,35 @@ +; This file contains the new semantic of the branch-target-enforcement, sign-return-address. +; Used for test mixing a mixed link case and also verify the import too in llc. + +; RUN: llc %s -o - | FileCheck %s DanielKristofKiss wrote: ack. ht

[clang] [llvm] [ARM][AArch64] BTI, GCS, PAC Module flag update. (PR #86212)

2024-08-08 Thread Daniel Kiss via cfe-commits
@@ -0,0 +1,35 @@ +; This file contains the new semantic of the branch-target-enforcement, sign-return-address. DanielKristofKiss wrote: done. https://github.com/llvm/llvm-project/pull/86212 ___ cfe-commits mailing lis

[clang] [llvm] [ARM][AArch64] BTI, GCS, PAC Module flag update. (PR #86212)

2024-08-08 Thread Daniel Kiss via cfe-commits
@@ -0,0 +1,35 @@ +; This file contains the new semantic of the branch-target-enforcement, sign-return-address. +; Used for test mixing a mixed link case and also verify the import too in llc. + +; RUN: llc %s -o - | FileCheck %s + +target datalayout = "e-m:e-i8:8:32-i16:16:32-i64

[clang] [llvm] [ARM][AArch64] BTI, GCS, PAC Module flag update. (PR #86212)

2024-08-08 Thread Daniel Kiss via cfe-commits
@@ -0,0 +1,35 @@ +; This file contains the new semantic of the branch-target-enforcement, sign-return-address. +; Used for test mixing a mixed link case and also verify the import too in llc. + +; RUN: llc %s -o - | FileCheck %s + +target datalayout = "e-m:e-i8:8:32-i16:16:32-i64

[libunwind] [libunwind] Fix problems caused by combining BTI and GCS (PR #102322)

2024-08-07 Thread Daniel Kiss via cfe-commits
@@ -680,7 +684,17 @@ DEFINE_LIBUNWIND_FUNCTION(__libunwind_Registers_arm64_jumpto) ldrx16, [x0, #0x0F8] ldpx0, x1, [x0, #0x000] // restore x0,x1 movsp,x16 // restore sp - br x30// jump to pc +#if defined(__ARM_FE

[libunwind] [libunwind] Fix problems caused by combining BTI and GCS (PR #102322)

2024-08-07 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss approved this pull request. Thanks! LGTM with a NIT. Please wait for someone from the unwind group to ack it too. https://github.com/llvm/llvm-project/pull/102322 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[libunwind] [libunwind] Fix problems caused by combining BTI and GCS (PR #102322)

2024-08-07 Thread Daniel Kiss via cfe-commits
@@ -82,7 +82,22 @@ #define PPC64_OPD2 #endif -#if defined(__aarch64__) && defined(__ARM_FEATURE_BTI_DEFAULT) +#if defined(__aarch64__) +#if defined(__ARM_FEATURE_GCS_DEFAULT) && defined(__ARM_FEATURE_BTI_DEFAULT) +// Set BTI, PAC, and GCS gnu property bits +#define GNU_PROPERT

[libunwind] [libunwind] Fix problems caused by combining BTI and GCS (PR #102322)

2024-08-07 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss edited https://github.com/llvm/llvm-project/pull/102322 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Arm][AArch64][Clang] Respect function's branch protection attributes. (PR #101978)

2024-08-07 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss updated https://github.com/llvm/llvm-project/pull/101978 >From 4afadb9122c982c63f2b067661548a2c063590a5 Mon Sep 17 00:00:00 2001 From: Daniel Kiss Date: Mon, 5 Aug 2024 13:01:06 +0200 Subject: [PATCH] [Arm][AArch64][Clang] Respect function's branch protectio

[clang] [compiler-rt] [llvm] [PAC][AArch64] Support init/fini array signing (PR #96478)

2024-08-05 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/96478 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind] Add GCS support for AArch64 (PR #99335)

2024-08-05 Thread Daniel Kiss via cfe-commits
@@ -680,7 +680,7 @@ DEFINE_LIBUNWIND_FUNCTION(__libunwind_Registers_arm64_jumpto) ldrx16, [x0, #0x0F8] ldpx0, x1, [x0, #0x000] // restore x0,x1 movsp,x16 // restore sp - retx30// jump to pc Danie

[clang] [Arm][AArch64][Clang] Respect function's branch protection attributes. (PR #101978)

2024-08-05 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss created https://github.com/llvm/llvm-project/pull/101978 Default attributes assigned to all functions according to the command line parameters. Some functions might have their own attributes and we need to set or remove attributes accordingly. Tests are upd

[libunwind] [libunwind] Undefined behaviour pointer arithmetic with null pointer (PR #98648)

2024-08-05 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss closed https://github.com/llvm/llvm-project/pull/98648 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [ARM][AArch64] BTI, GCS, PAC Module flag update. (PR #86212)

2024-07-21 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss updated https://github.com/llvm/llvm-project/pull/86212 >From f2f3356da08d68dab4431f49d0921515560e4927 Mon Sep 17 00:00:00 2001 From: Daniel Kiss Date: Fri, 8 Mar 2024 15:06:28 +0100 Subject: [PATCH] BTI,GCS,PAC Module flag update. Module flag is used to in

[libunwind] [libunwind] Undefined behaviour pointer arithmetic with null pointer (PR #98648)

2024-07-19 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss ready_for_review https://github.com/llvm/llvm-project/pull/98648 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind] Undefined behaviour pointer arithmetic with null pointer (PR #98648)

2024-07-19 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss updated https://github.com/llvm/llvm-project/pull/98648 >From 240add341b2c0a1be3d1ebf21938e70e51669126 Mon Sep 17 00:00:00 2001 From: Daniel Kiss Date: Fri, 12 Jul 2024 15:56:40 +0200 Subject: [PATCH 1/2] [libunwind] Fix ubsan issue --- libunwind/src/Unwin

[clang] [llvm] [PAC][Driver] Support `pauthtest` ABI for AArch64 Linux triples (PR #97237)

2024-07-19 Thread Daniel Kiss via cfe-commits
@@ -0,0 +1,4 @@ +// RUN: %clang --target=aarch64-linux-pauthtest --sysroot=%S/Inputs/multilib_aarch64_linux_tree -### -c %s 2>&1 | FileCheck %s DanielKristofKiss wrote: Looks this is not used: "clang/test/Driver/Inputs/multilib_aarch64_linux_tree/usr/incl

[libunwind] [libunwind] Undefined behaviour pointer arithmetic with null pointer (PR #98648)

2024-07-12 Thread Daniel Kiss via cfe-commits
@@ -230,8 +230,13 @@ void DwarfFDECache::iterateCacheEntries(void (*func)( } #endif // defined(_LIBUNWIND_SUPPORT_DWARF_UNWIND) - -#define arrayoffsetof(type, index, field) ((size_t)(&((type *)0)[index].field)) +template +__attribute__((no_sanitize("undefined"))) static inlin

[libunwind] [libunwind] Undefined behaviour pointer arithmetic with null pointer (PR #98648)

2024-07-12 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss updated https://github.com/llvm/llvm-project/pull/98648 >From 240add341b2c0a1be3d1ebf21938e70e51669126 Mon Sep 17 00:00:00 2001 From: Daniel Kiss Date: Fri, 12 Jul 2024 15:56:40 +0200 Subject: [PATCH 1/2] [libunwind] Fix ubsan issue --- libunwind/src/Unwin

[clang] [Clang][ARM][AArch64] Add branch protection attributes to the defaults. (PR #83277)

2024-07-12 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss closed https://github.com/llvm/llvm-project/pull/83277 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind] Undefined behaviour pointer arithmetic with null pointer (PR #98648)

2024-07-12 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss created https://github.com/llvm/llvm-project/pull/98648 Fixes #91144 >From 240add341b2c0a1be3d1ebf21938e70e51669126 Mon Sep 17 00:00:00 2001 From: Daniel Kiss Date: Fri, 12 Jul 2024 15:56:40 +0200 Subject: [PATCH] [libunwind] Fix ubsan issue --- libunwind

[clang] [Clang][ARM][AArch64] Add branch protection attributes to the defaults. (PR #83277)

2024-07-12 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss updated https://github.com/llvm/llvm-project/pull/83277 >From 0c3118713387246dc1c503f3792ba5af82e6b5eb Mon Sep 17 00:00:00 2001 From: Daniel Kiss Date: Wed, 28 Feb 2024 15:18:31 +0100 Subject: [PATCH 1/8] Add branch protection attributes to the defaults. Th

[clang] [NFC][Clang] Move set functions out BranchProtectionInfo. (PR #98451)

2024-07-12 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss closed https://github.com/llvm/llvm-project/pull/98451 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][Clang] Move set functions out BranchProtectionInfo. (PR #98451)

2024-07-11 Thread Daniel Kiss via cfe-commits
DanielKristofKiss wrote: #83277 needs the `setBranchProtectionFnAttributes` function but that call is from a static function so let's make it static. https://github.com/llvm/llvm-project/pull/98451 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[clang] [NFC][Clang] Move set functions out BranchProtectionInfo. (PR #98451)

2024-07-11 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss updated https://github.com/llvm/llvm-project/pull/98451 >From 2ffaf35f09be03e7374bde3d97ee798b01e7e3d1 Mon Sep 17 00:00:00 2001 From: Daniel Kiss Date: Thu, 11 Jul 2024 10:29:24 +0200 Subject: [PATCH 1/5] [NFC][Clang] Move setfunctions of BranchProtectionInf

[clang] [NFC][Clang] Move set functions out BranchProtectionInfo. (PR #98451)

2024-07-11 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss updated https://github.com/llvm/llvm-project/pull/98451 >From 2ffaf35f09be03e7374bde3d97ee798b01e7e3d1 Mon Sep 17 00:00:00 2001 From: Daniel Kiss Date: Thu, 11 Jul 2024 10:29:24 +0200 Subject: [PATCH 1/4] [NFC][Clang] Move setfunctions of BranchProtectionInf

[clang] [NFC][Clang] Move set functions out BranchProtectionInfo. (PR #98451)

2024-07-11 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss updated https://github.com/llvm/llvm-project/pull/98451 >From 2ffaf35f09be03e7374bde3d97ee798b01e7e3d1 Mon Sep 17 00:00:00 2001 From: Daniel Kiss Date: Thu, 11 Jul 2024 10:29:24 +0200 Subject: [PATCH 1/3] [NFC][Clang] Move setfunctions of BranchProtectionInf

[clang] [NFC][Clang] Move set functions out BranchProtectionInfo. (PR #98451)

2024-07-11 Thread Daniel Kiss via cfe-commits
@@ -133,7 +133,7 @@ class AArch64TargetCodeGenInfo : public TargetCodeGenInfo { } } auto *Fn = cast(GV); -BPI.setFnAttributes(*Fn); +CGM.getTargetCodeGenInfo().setFnAttributes(BPI, *Fn); DanielKristofKiss wrote: oh right. https://github.

[clang] [NFC][Clang] Move set functions out BranchProtectionInfo. (PR #98451)

2024-07-11 Thread Daniel Kiss via cfe-commits
@@ -413,6 +414,12 @@ class TargetCodeGenInfo { return nullptr; } + void setFnAttributes(const TargetInfo::BranchProtectionInfo &BPI, DanielKristofKiss wrote: agree, added. https://github.com/llvm/llvm-project/pull/98451 ___

[clang] [NFC][Clang] Move set functions out BranchProtectionInfo. (PR #98451)

2024-07-11 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss updated https://github.com/llvm/llvm-project/pull/98451 >From 2ffaf35f09be03e7374bde3d97ee798b01e7e3d1 Mon Sep 17 00:00:00 2001 From: Daniel Kiss Date: Thu, 11 Jul 2024 10:29:24 +0200 Subject: [PATCH 1/2] [NFC][Clang] Move setfunctions of BranchProtectionInf

[clang] [NFC][Clang] Move set functions out BranchProtectionInfo. (PR #98451)

2024-07-11 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss created https://github.com/llvm/llvm-project/pull/98451 To reduce build times move them to TargetCodeGenInfo. Refactor of #98329 >From 2ffaf35f09be03e7374bde3d97ee798b01e7e3d1 Mon Sep 17 00:00:00 2001 From: Daniel Kiss Date: Thu, 11 Jul 2024 10:29:24 +0200

[clang] [NFC][Clang] Move functions of BranchProtectionInfo out of line (PR #98329)

2024-07-11 Thread Daniel Kiss via cfe-commits
DanielKristofKiss wrote: > > in some build config `TargetInfo.cpp` is built without dependency to > > `LLVM-Core`. > > Okay, that means that putting this code inside Basic/ is a layering > violation. You need to move it into CodeGen/. Probably best to revert the > whole change in the meantime

[clang] [NFC][Clang] Move functions of BranchProtectionInfo out of line (PR #98329)

2024-07-11 Thread Daniel Kiss via cfe-commits
DanielKristofKiss wrote: in some build config `TargetInfo.cpp` is built without dependency to `LLVM-Core`. https://github.com/llvm/llvm-project/pull/98329 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[clang] Revert "[NFC][Clang] Move functions of BranchProtectionInfo out of line" (PR #98437)

2024-07-10 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss closed https://github.com/llvm/llvm-project/pull/98437 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "[NFC][Clang] Move functions of BranchProtectionInfo out of line" (PR #98437)

2024-07-10 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss created https://github.com/llvm/llvm-project/pull/98437 Reverts llvm/llvm-project#98329 >From 9a74d0613287e7ae86c305b0250e188e3c3de6c3 Mon Sep 17 00:00:00 2001 From: Daniel Kiss Date: Thu, 11 Jul 2024 08:37:25 +0200 Subject: [PATCH] Revert "[NFC][Clang] Mov

[clang] [NFC][Clang] Move functions of BranchProtectionInfo out of line (PR #98329)

2024-07-10 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss closed https://github.com/llvm/llvm-project/pull/98329 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][Clang] Move functions of BranchProtectionInfo out of line (PR #98329)

2024-07-10 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss updated https://github.com/llvm/llvm-project/pull/98329 >From b1e113f76b289aa8a7d4459314a0dbffb313cb51 Mon Sep 17 00:00:00 2001 From: Daniel Kiss Date: Wed, 10 Jul 2024 16:23:11 +0200 Subject: [PATCH 1/2] [NFC][Clang] Move functions of BranchProtectionInfo o

[clang] [llvm] [Clang][ARM][AArch64] Alway emit protection attributes for functions. (PR #82819)

2024-07-10 Thread Daniel Kiss via cfe-commits
DanielKristofKiss wrote: > It looks like there's still a failure related to this patch on current main > AFAICT (MSAN finds a use of uninitialized value): > https://lab.llvm.org/buildbot/#/builders/169/builds/852/steps/12/logs/stdio > Thanks, already noticed and addressed here: #98307 https

[clang] [Clang][ARM] Call constructor on BranchTargetInfo. (PR #98307)

2024-07-10 Thread Daniel Kiss via cfe-commits
@@ -1434,7 +1434,14 @@ class TargetInfo : public TransferrableTargetInfo, } public: -BranchProtectionInfo() = default; +BranchProtectionInfo() { + SignReturnAddr = LangOptions::SignReturnAddressScopeKind::None; + SignKey = LangOptions::SignReturnAddress

[clang] [Clang][ARM] Call constructor on BranchTargetInfo. (PR #98307)

2024-07-10 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss updated https://github.com/llvm/llvm-project/pull/98307 >From 4e10c95c390e519853428f424cd655379d99c61c Mon Sep 17 00:00:00 2001 From: Daniel Kiss Date: Wed, 10 Jul 2024 13:58:52 +0200 Subject: [PATCH 1/3] [Clang][ARM] Call constructor on BranchTargetInfo. O

[clang] [Clang][ARM] Call constructor on BranchTargetInfo. (PR #98307)

2024-07-10 Thread Daniel Kiss via cfe-commits
@@ -141,7 +141,7 @@ class ARMTargetCodeGenInfo : public TargetCodeGenInfo { ParsedTargetAttr Attr = CGM.getTarget().parseTargetAttr(TA->getFeaturesStr()); if (!Attr.BranchProtection.empty()) { -TargetInfo::BranchProtectionInfo BPI; +TargetI

[clang] [Clang][ARM][AArch64] Add branch protection attributes to the defaults. (PR #83277)

2024-07-10 Thread Daniel Kiss via cfe-commits
DanielKristofKiss wrote: Sorry for the force push, need to be rebased. NFC since last review round. https://github.com/llvm/llvm-project/pull/83277 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/

[clang] [Clang][ARM][AArch64] Add branch protection attributes to the defaults. (PR #83277)

2024-07-10 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss updated https://github.com/llvm/llvm-project/pull/83277 >From 0c3118713387246dc1c503f3792ba5af82e6b5eb Mon Sep 17 00:00:00 2001 From: Daniel Kiss Date: Wed, 28 Feb 2024 15:18:31 +0100 Subject: [PATCH 1/6] Add branch protection attributes to the defaults. Th

[clang] [Clang][ARM][AArch64] Add branch protection attributes to the defaults. (PR #83277)

2024-07-10 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss updated https://github.com/llvm/llvm-project/pull/83277 >From c421b6b9c167e82cedc5db2a67f47d3ba12deba9 Mon Sep 17 00:00:00 2001 From: Daniel Kiss Date: Wed, 28 Feb 2024 15:18:31 +0100 Subject: [PATCH 1/6] Add branch protection attributes to the defaults. Th

[clang] [NFC][Clang] Move functions of BranchProtectionInfo out of line (PR #98329)

2024-07-10 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss created https://github.com/llvm/llvm-project/pull/98329 Also let's add const to the setFnAttributes. >From b1e113f76b289aa8a7d4459314a0dbffb313cb51 Mon Sep 17 00:00:00 2001 From: Daniel Kiss Date: Wed, 10 Jul 2024 16:23:11 +0200 Subject: [PATCH] [NFC][Clang

[clang] [llvm] [Clang][ARM][AArch64] Alway emit protection attributes for functions. (PR #82819)

2024-07-10 Thread Daniel Kiss via cfe-commits
@@ -32,7 +32,9 @@ #include "llvm/ADT/StringRef.h" #include "llvm/ADT/StringSet.h" #include "llvm/Frontend/OpenMP/OMPGridValues.h" +#include "llvm/IR/Attributes.h" #include "llvm/IR/DerivedTypes.h" +#include "llvm/IR/Function.h" DanielKristofKiss wrote: Addres

[clang] [Clang][ARM] Call constructor on BranchTargetInfo. (PR #98307)

2024-07-10 Thread Daniel Kiss via cfe-commits
DanielKristofKiss wrote: Let's initialise everything from both of the constructors (as it was in an early version of the original patches) https://github.com/llvm/llvm-project/pull/98307 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:

[clang] [Clang][ARM] Call constructor on BranchTargetInfo. (PR #98307)

2024-07-10 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss updated https://github.com/llvm/llvm-project/pull/98307 >From 4e10c95c390e519853428f424cd655379d99c61c Mon Sep 17 00:00:00 2001 From: Daniel Kiss Date: Wed, 10 Jul 2024 13:58:52 +0200 Subject: [PATCH 1/2] [Clang][ARM] Call constructor on BranchTargetInfo. O

[clang] [Clang][ARM] Call constructor on BranchTargetInfo. (PR #98307)

2024-07-10 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss created https://github.com/llvm/llvm-project/pull/98307 Otherwise members will be uninitialised. >From 4e10c95c390e519853428f424cd655379d99c61c Mon Sep 17 00:00:00 2001 From: Daniel Kiss Date: Wed, 10 Jul 2024 13:58:52 +0200 Subject: [PATCH] [Clang][ARM] Ca

[clang] 1782810 - [Clang][ARM][AArch64] Alway emit protection attributes for functions. (#82819)

2024-07-10 Thread Daniel Kiss via cfe-commits
Author: Daniel Kiss Date: 2024-07-10T11:32:41+02:00 New Revision: 1782810b8440144a0141c24192acbaeb55a1545d URL: https://github.com/llvm/llvm-project/commit/1782810b8440144a0141c24192acbaeb55a1545d DIFF: https://github.com/llvm/llvm-project/commit/1782810b8440144a0141c24192acbaeb55a1545d.diff L

[clang] [llvm] Revert "[Clang][ARM][AArch64] Alway emit protection attributes for functions." (PR #98284)

2024-07-10 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss closed https://github.com/llvm/llvm-project/pull/98284 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Revert "[Clang][ARM][AArch64] Alway emit protection attributes for functions." (PR #98284)

2024-07-10 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss created https://github.com/llvm/llvm-project/pull/98284 Reverts llvm/llvm-project#82819 >From 74e9e20f0338824eecea0f27d9c1336676a60d3d Mon Sep 17 00:00:00 2001 From: Daniel Kiss Date: Wed, 10 Jul 2024 10:21:36 +0200 Subject: [PATCH] =?UTF-8?q?Revert=20"[Cla

[clang] [Clang][ARM][AArch64] Add branch protection attributes to the defaults. (PR #83277)

2024-07-10 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss updated https://github.com/llvm/llvm-project/pull/83277 >From c421b6b9c167e82cedc5db2a67f47d3ba12deba9 Mon Sep 17 00:00:00 2001 From: Daniel Kiss Date: Wed, 28 Feb 2024 15:18:31 +0100 Subject: [PATCH 1/5] Add branch protection attributes to the defaults. Th

[clang] [llvm] [Clang][ARM][AArch64] Alway emit protection attributes for functions. (PR #82819)

2024-07-10 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss closed https://github.com/llvm/llvm-project/pull/82819 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang][ARM][AArch64] Alway emit protection attributes for functions. (PR #82819)

2024-07-08 Thread Daniel Kiss via cfe-commits
DanielKristofKiss wrote: I'm planning to merge this and subsequent patches this week, please let me know if you any more concerns. Thanks! https://github.com/llvm/llvm-project/pull/82819 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://

[clang] [llvm] [PAC][Driver] Implement `-mbranch-protection=pauthabi` option (PR #97237)

2024-07-05 Thread Daniel Kiss via cfe-commits
@@ -1537,11 +1570,16 @@ static void CollectARMPACBTIOptions(const ToolChain &TC, const ArgList &Args, if (!isAArch64 && PBP.Key == "b_key") D.Diag(diag::warn_unsupported_branch_protection) << "b-key" << A->getAsString(Args); +if (!isAArch64 && PBP.HasPa

[clang] [llvm] [Clang][ARM][AArch64] Alway emit protection attributes for functions. (PR #82819)

2024-06-27 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss updated https://github.com/llvm/llvm-project/pull/82819 >From df64bb1a12ea2b2a89151fa034a16cd641129347 Mon Sep 17 00:00:00 2001 From: Daniel Kiss Date: Mon, 22 Jan 2024 11:33:15 +0100 Subject: [PATCH] Emit attributes for functions always. Branch protection,

[clang] [llvm] [Clang][ARM][AArch64] Alway emit protection attributes for functions. (PR #82819)

2024-06-25 Thread Daniel Kiss via cfe-commits
DanielKristofKiss wrote: > For return-address signing, each function can make its own choice about > whether to sign; the function that's doing the signing is the same function > that does the auth, so it doesn't directly impact any other function. For > branch target enforcement, though, ever

[clang] [llvm] [AArch64] Fix argument passing in reserved registers for preserve_nonecc (PR #96259)

2024-06-20 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss approved this pull request. LGTM, Thanks! https://github.com/llvm/llvm-project/pull/96259 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][AArch64][FMV] Stop emitting alias to ifunc. (PR #96221)

2024-06-20 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss approved this pull request. Second the relnote otherwise LGTM. https://github.com/llvm/llvm-project/pull/96221 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/

[clang] [clang][AArch64][FMV] Stop emitting alias to ifunc. (PR #96221)

2024-06-20 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss edited https://github.com/llvm/llvm-project/pull/96221 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][AArch64] Add validation for Global Register Variable. (PR #94271)

2024-06-16 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss closed https://github.com/llvm/llvm-project/pull/94271 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][AArch64] Add validation for Global Register Variable. (PR #94271)

2024-06-11 Thread Daniel Kiss via cfe-commits
@@ -0,0 +1,13 @@ +// Check that -ffixed register handled for globals. +// Regression test for #76426 +// RUN: %clang --target=aarch64-none-gnu -ffixed-x15 -### %s 2>&1 | FileCheck %s +// CHECK-NOT: fatal error: error in backend: Invalid register name "x15". Danie

[clang] [clang][AArch64] Add validation for Global Register Variable. (PR #94271)

2024-06-11 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss updated https://github.com/llvm/llvm-project/pull/94271 >From a8dabc508583ffb12982549d1bfb86cf6845c957 Mon Sep 17 00:00:00 2001 From: Daniel Kiss Date: Sun, 21 Apr 2024 16:14:25 +0200 Subject: [PATCH] [AArch64] Add validation for Global Register Variable. F

[clang] [AArch64] Add validation for Global Register Variable. (PR #94271)

2024-06-03 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss created https://github.com/llvm/llvm-project/pull/94271 Fixes: #76426 >From cda747d06c2d363c6c0c7f7d72825d119240ac5a Mon Sep 17 00:00:00 2001 From: Daniel Kiss Date: Sun, 21 Apr 2024 16:14:25 +0200 Subject: [PATCH] [AArch64] Add validation for Global Regist

[clang] [llvm] [AArch64] Support preserve_none calling convention (PR #91046)

2024-05-31 Thread Daniel Kiss via cfe-commits
@@ -0,0 +1,92 @@ +; RUN: sed -e "s/RETTYPE/void/;s/RETVAL//" %s | llc -mtriple=aarch64-apple-darwin | FileCheck --check-prefixes=ALL %s +; RUN: sed -e "s/RETTYPE/i32/;s/RETVAL/undef/" %s | llc -mtriple=aarch64-apple-darwin | FileCheck --check-prefixes=ALL %s +; RUN: sed -e "s/RE

[clang] [llvm] [AArch64] Support preserve_none calling convention (PR #91046)

2024-05-31 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss edited https://github.com/llvm/llvm-project/pull/91046 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64] Support preserve_none calling convention (PR #91046)

2024-05-31 Thread Daniel Kiss via cfe-commits
@@ -7949,9 +7966,10 @@ AArch64TargetLowering::LowerCall(CallLoweringInfo &CLI, ++NumTailCalls; } - if (!IsTailCall && CLI.CB && CLI.CB->isMustTailCall()) + if (!IsTailCall && CLI.CB && CLI.CB->isMustTailCall()) { DanielKristofKiss wrote: if with 1 s

  1   2   >