[clang] [Clang][RISCV] Remove forced-sw-shadow-stack (PR #115355)

2024-11-07 Thread Jesse Huang via cfe-commits
https://github.com/jaidTw closed https://github.com/llvm/llvm-project/pull/115355 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][RISCV] Remove forced-sw-shadow-stack (PR #115355)

2024-11-07 Thread Jesse Huang via cfe-commits
https://github.com/jaidTw created https://github.com/llvm/llvm-project/pull/115355 This option was used to override the behavior of `-fsanitize=shadowcallstack` on RISC-V backend, which by default use a hardware implementation if possible, to use the software implementation instead. After htt

[clang] [Clang][RISCV] Support -fcf-protection=return for RISC-V (PR #112477)

2024-10-29 Thread Jesse Huang via cfe-commits
https://github.com/jaidTw closed https://github.com/llvm/llvm-project/pull/112477 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][RISCV] Support -fcf-protection=return for RISC-V (PR #112477)

2024-10-28 Thread Jesse Huang via cfe-commits
jaidTw wrote: @mylai-mtk could you take a look at the latest version? I'm gonna merge it if it looks good to you too https://github.com/llvm/llvm-project/pull/112477 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin

[clang] [Clang][RISCV] Support -fcf-protection=return for RISC-V (PR #112477)

2024-10-28 Thread Jesse Huang via cfe-commits
https://github.com/jaidTw updated https://github.com/llvm/llvm-project/pull/112477 >From fe4a28fb691b69d9af384f1dc2f0667761adef44 Mon Sep 17 00:00:00 2001 From: Jesse Huang Date: Sun, 13 Oct 2024 15:11:06 +0800 Subject: [PATCH 1/5] [Clang][RISCV] Support -fcf-protection=return for RISC-V ---

[clang] [Clang][RISCV] Support -fcf-protection=return for RISC-V (PR #112477)

2024-10-28 Thread Jesse Huang via cfe-commits
jaidTw wrote: After a meeting with Kito, I will change the requirement of both patches (this and 112478) to Zicfiss, and lift it in a future patch I'm encountering a problem that cc1 tests cannot recognize the option and working of a fix now https://github.com/llvm/llvm-project/pull/112477 ___

[clang] [Clang][RISCV] Support -fcf-protection=return for RISC-V (PR #112477)

2024-10-28 Thread Jesse Huang via cfe-commits
https://github.com/jaidTw updated https://github.com/llvm/llvm-project/pull/112477 >From fe4a28fb691b69d9af384f1dc2f0667761adef44 Mon Sep 17 00:00:00 2001 From: Jesse Huang Date: Sun, 13 Oct 2024 15:11:06 +0800 Subject: [PATCH 1/9] [Clang][RISCV] Support -fcf-protection=return for RISC-V ---

[clang] [Clang][RISCV] Support -fcf-protection=return for RISC-V (PR #112477)

2024-10-27 Thread Jesse Huang via cfe-commits
https://github.com/jaidTw updated https://github.com/llvm/llvm-project/pull/112477 >From fe4a28fb691b69d9af384f1dc2f0667761adef44 Mon Sep 17 00:00:00 2001 From: Jesse Huang Date: Sun, 13 Oct 2024 15:11:06 +0800 Subject: [PATCH 1/8] [Clang][RISCV] Support -fcf-protection=return for RISC-V ---

[clang] [Clang][RISCV] Support -fcf-protection=return for RISC-V (PR #112477)

2024-10-27 Thread Jesse Huang via cfe-commits
https://github.com/jaidTw updated https://github.com/llvm/llvm-project/pull/112477 >From fe4a28fb691b69d9af384f1dc2f0667761adef44 Mon Sep 17 00:00:00 2001 From: Jesse Huang Date: Sun, 13 Oct 2024 15:11:06 +0800 Subject: [PATCH 1/7] [Clang][RISCV] Support -fcf-protection=return for RISC-V ---

[clang] [Clang][RISCV] Support -fcf-protection=return for RISC-V (PR #112477)

2024-10-26 Thread Jesse Huang via cfe-commits
https://github.com/jaidTw updated https://github.com/llvm/llvm-project/pull/112477 >From fe4a28fb691b69d9af384f1dc2f0667761adef44 Mon Sep 17 00:00:00 2001 From: Jesse Huang Date: Sun, 13 Oct 2024 15:11:06 +0800 Subject: [PATCH 1/6] [Clang][RISCV] Support -fcf-protection=return for RISC-V ---

[clang] [Clang][RISCV] Support -fcf-protection=return for RISC-V (PR #112477)

2024-10-25 Thread Jesse Huang via cfe-commits
@@ -0,0 +1,9 @@ +// RUN: %clang_cc1 -triple riscv64-linux-unknown -target-feature +zimop -emit-llvm -o - %s -fcf-protection=return | FileCheck -check-prefix=NOTIGNORELISTED %s +// RUN: %clang_cc1 -triple riscv64-linux-unknown -target-feature +zimop -emit-llvm -o - %s | FileChec

[clang] [Clang][RISCV] Support -fcf-protection=return for RISC-V (PR #112477)

2024-10-25 Thread Jesse Huang via cfe-commits
@@ -0,0 +1,9 @@ +// RUN: %clang_cc1 -triple riscv64-linux-unknown -target-feature +zimop -emit-llvm -o - %s -fcf-protection=return | FileCheck -check-prefix=NOTIGNORELISTED %s +// RUN: %clang_cc1 -triple riscv64-linux-unknown -target-feature +zimop -emit-llvm -o - %s | FileChec

[clang] [Clang][RISCV] Support -fcf-protection=return for RISC-V (PR #112477)

2024-10-25 Thread Jesse Huang via cfe-commits
https://github.com/jaidTw updated https://github.com/llvm/llvm-project/pull/112477 >From fe4a28fb691b69d9af384f1dc2f0667761adef44 Mon Sep 17 00:00:00 2001 From: Jesse Huang Date: Sun, 13 Oct 2024 15:11:06 +0800 Subject: [PATCH 1/5] [Clang][RISCV] Support -fcf-protection=return for RISC-V ---

[clang] [Clang][RISCV] Support -fcf-protection=return for RISC-V (PR #112477)

2024-10-25 Thread Jesse Huang via cfe-commits
https://github.com/jaidTw updated https://github.com/llvm/llvm-project/pull/112477 >From fe4a28fb691b69d9af384f1dc2f0667761adef44 Mon Sep 17 00:00:00 2001 From: Jesse Huang Date: Sun, 13 Oct 2024 15:11:06 +0800 Subject: [PATCH 1/3] [Clang][RISCV] Support -fcf-protection=return for RISC-V ---

[clang] [Clang][RISCV] Support -fcf-protection=return for RISC-V (PR #112477)

2024-10-24 Thread Jesse Huang via cfe-commits
@@ -607,6 +607,9 @@ class RISCVTargetCodeGenInfo : public TargetCodeGenInfo { auto *Fn = cast(GV); Fn->addFnAttr("interrupt", Kind); + +if (CGM.getCodeGenOpts().CFProtectionReturn) jaidTw wrote: Fixed, thanks! https://github.com/llvm/llvm-project

[clang] [Clang][RISCV] Support -fcf-protection=return for RISC-V (PR #112477)

2024-10-24 Thread Jesse Huang via cfe-commits
jaidTw wrote: Addressed comments https://github.com/llvm/llvm-project/pull/112477 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][RISCV] Support -fcf-protection=return for RISC-V (PR #112477)

2024-10-24 Thread Jesse Huang via cfe-commits
https://github.com/jaidTw updated https://github.com/llvm/llvm-project/pull/112477 >From fe4a28fb691b69d9af384f1dc2f0667761adef44 Mon Sep 17 00:00:00 2001 From: Jesse Huang Date: Sun, 13 Oct 2024 15:11:06 +0800 Subject: [PATCH 1/4] [Clang][RISCV] Support -fcf-protection=return for RISC-V ---

[clang] [Clang][RISCV] Support -fcf-protection=return for RISC-V (PR #112477)

2024-10-24 Thread Jesse Huang via cfe-commits
https://github.com/jaidTw updated https://github.com/llvm/llvm-project/pull/112477 >From fe4a28fb691b69d9af384f1dc2f0667761adef44 Mon Sep 17 00:00:00 2001 From: Jesse Huang Date: Sun, 13 Oct 2024 15:11:06 +0800 Subject: [PATCH 1/3] [Clang][RISCV] Support -fcf-protection=return for RISC-V ---

[clang] [llvm] [Clang][RISCV] Support -fcf-protection=return for RISC-V (PR #112477)

2024-10-24 Thread Jesse Huang via cfe-commits
@@ -0,0 +1,30 @@ +; ModuleID = '/home/jhuang4/workspace/test.c' jaidTw wrote: Yeah definitely, I'll remove it https://github.com/llvm/llvm-project/pull/112477 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[clang] [llvm] [Clang][RISCV] Support -fcf-protection=return for RISC-V (PR #112477)

2024-10-24 Thread Jesse Huang via cfe-commits
@@ -607,6 +607,9 @@ class RISCVTargetCodeGenInfo : public TargetCodeGenInfo { auto *Fn = cast(GV); Fn->addFnAttr("interrupt", Kind); + +if (CGM.getCodeGenOpts().CFProtectionReturn) jaidTw wrote: I'm not quite familiar with the code here, is it saf

[clang] [Clang][RISCV] Support -fcf-protection=return for RISC-V (PR #112477)

2024-10-24 Thread Jesse Huang via cfe-commits
https://github.com/jaidTw updated https://github.com/llvm/llvm-project/pull/112477 >From fe4a28fb691b69d9af384f1dc2f0667761adef44 Mon Sep 17 00:00:00 2001 From: Jesse Huang Date: Sun, 13 Oct 2024 15:11:06 +0800 Subject: [PATCH 1/3] [Clang][RISCV] Support -fcf-protection=return for RISC-V ---

[clang] [llvm] [Clang][RISCV] Support -fcf-protection=return for RISC-V (PR #112477)

2024-10-24 Thread Jesse Huang via cfe-commits
https://github.com/jaidTw updated https://github.com/llvm/llvm-project/pull/112477 >From fe4a28fb691b69d9af384f1dc2f0667761adef44 Mon Sep 17 00:00:00 2001 From: Jesse Huang Date: Sun, 13 Oct 2024 15:11:06 +0800 Subject: [PATCH 1/3] [Clang][RISCV] Support -fcf-protection=return for RISC-V ---

[clang] [Clang][RISCV] Support -fcf-protection=return for RISC-V (PR #112477)

2024-10-24 Thread Jesse Huang via cfe-commits
https://github.com/jaidTw updated https://github.com/llvm/llvm-project/pull/112477 >From fe4a28fb691b69d9af384f1dc2f0667761adef44 Mon Sep 17 00:00:00 2001 From: Jesse Huang Date: Sun, 13 Oct 2024 15:11:06 +0800 Subject: [PATCH 1/3] [Clang][RISCV] Support -fcf-protection=return for RISC-V ---

[clang] [Clang][RISCV] Support -fcf-protection=return for RISC-V (PR #112477)

2024-10-24 Thread Jesse Huang via cfe-commits
@@ -899,6 +899,11 @@ void CodeGenFunction::StartFunction(GlobalDecl GD, QualType RetTy, if (CodeGenOpts.PointerAuth.IndirectGotos) Fn->addFnAttr("ptrauth-indirect-gotos"); + // Add return control flow integrity attributes for RISCV. + if (CodeGenOpts.CFProtectionRetur

[clang] [Clang][RISCV] Support -fcf-protection=return for RISC-V (PR #112477)

2024-10-22 Thread Jesse Huang via cfe-commits
https://github.com/jaidTw updated https://github.com/llvm/llvm-project/pull/112477 >From fe4a28fb691b69d9af384f1dc2f0667761adef44 Mon Sep 17 00:00:00 2001 From: Jesse Huang Date: Sun, 13 Oct 2024 15:11:06 +0800 Subject: [PATCH 1/2] [Clang][RISCV] Support -fcf-protection=return for RISC-V ---

[clang] [Clang][RISCV] Support -fcf-protection=return for RISC-V (PR #112477)

2024-10-22 Thread Jesse Huang via cfe-commits
https://github.com/jaidTw updated https://github.com/llvm/llvm-project/pull/112477 >From fe4a28fb691b69d9af384f1dc2f0667761adef44 Mon Sep 17 00:00:00 2001 From: Jesse Huang Date: Sun, 13 Oct 2024 15:11:06 +0800 Subject: [PATCH 1/2] [Clang][RISCV] Support -fcf-protection=return for RISC-V ---

[clang] [Clang][RISCV] Support -fcf-protection=return for RISC-V (PR #112477)

2024-10-22 Thread Jesse Huang via cfe-commits
@@ -899,6 +899,10 @@ void CodeGenFunction::StartFunction(GlobalDecl GD, QualType RetTy, if (CodeGenOpts.PointerAuth.IndirectGotos) Fn->addFnAttr("ptrauth-indirect-gotos"); + // Add return control flow integrity attributes. + if (CodeGenOpts.CFProtectionReturn) +Fn

[clang] [Clang][RISCV] Support -fcf-protection=return for RISC-V (PR #112477)

2024-10-15 Thread Jesse Huang via cfe-commits
https://github.com/jaidTw edited https://github.com/llvm/llvm-project/pull/112477 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][RISCV] Support -fcf-protection=return for RISC-V (PR #112477)

2024-10-15 Thread Jesse Huang via cfe-commits
https://github.com/jaidTw created https://github.com/llvm/llvm-project/pull/112477 This patches add a string attribute "hw-shadow-stack" to every function if `-fcf-protection=return` is set on RISC-V >From 2a7a6ef1b44f250abf840165bac4c91ca0af928b Mon Sep 17 00:00:00 2001 From: Jesse Huang Dat

[clang] [llvm] [RISCV] Bump Pointer Masking extension version (PR #96715)

2024-06-26 Thread Jesse Huang via cfe-commits
https://github.com/jaidTw approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/96715 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Support Zama16b1p0 (PR #88474)

2024-04-16 Thread Jesse Huang via cfe-commits
https://github.com/jaidTw closed https://github.com/llvm/llvm-project/pull/88474 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Support Zama16b1p0 (PR #88474)

2024-04-16 Thread Jesse Huang via cfe-commits
https://github.com/jaidTw edited https://github.com/llvm/llvm-project/pull/88474 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Support Zama16b1p0 (PR #88474)

2024-04-16 Thread Jesse Huang via cfe-commits
@@ -119,6 +119,7 @@ on support follow. ``Za128rs`` Supported (`See note <#riscv-profiles-extensions-note>`__) ``Za64rs``Supported (`See note <#riscv-profiles-extensions-note>`__) ``Zacas`` Supported (`See note <#riscv-zacas-note>`__) +

[clang] [llvm] [RISCV] Support Zama16b1p0 (PR #88474)

2024-04-16 Thread Jesse Huang via cfe-commits
https://github.com/jaidTw updated https://github.com/llvm/llvm-project/pull/88474 >From 59b52163ff321d39128006c37ee38380ef5f9eec Mon Sep 17 00:00:00 2001 From: Jesse Huang Date: Thu, 11 Apr 2024 23:05:23 -0700 Subject: [PATCH 1/4] [RISCV] Support Zama16b1p0 This patch adds the support for Zama

[clang] [llvm] [RISCV] Support Zama16b1p0 (PR #88474)

2024-04-16 Thread Jesse Huang via cfe-commits
https://github.com/jaidTw updated https://github.com/llvm/llvm-project/pull/88474 >From 59b52163ff321d39128006c37ee38380ef5f9eec Mon Sep 17 00:00:00 2001 From: Jesse Huang Date: Thu, 11 Apr 2024 23:05:23 -0700 Subject: [PATCH 1/3] [RISCV] Support Zama16b1p0 This patch adds the support for Zama

[clang] [llvm] [RISCV] Support Zama16b1p0 (PR #88474)

2024-04-12 Thread Jesse Huang via cfe-commits
https://github.com/jaidTw updated https://github.com/llvm/llvm-project/pull/88474 >From 59b52163ff321d39128006c37ee38380ef5f9eec Mon Sep 17 00:00:00 2001 From: Jesse Huang Date: Thu, 11 Apr 2024 23:05:23 -0700 Subject: [PATCH 1/2] [RISCV] Support Zama16b1p0 This patch adds the support for Zama

[clang] [llvm] [RISCV] Support Zama16b1p0 (PR #88474)

2024-04-11 Thread Jesse Huang via cfe-commits
https://github.com/jaidTw created https://github.com/llvm/llvm-project/pull/88474 This patch adds the support for Zama16b version 1.0, which has been added to RVA23U64 optional extensions recently Ref: [rva23-profile](https://github.com/riscv/riscv-profiles/blob/097819c2c668cbf693c80b8d2508546

[clang] [llvm] [RISCV] Add support for RISC-V Pointer Masking (PR #79929)

2024-02-02 Thread Jesse Huang via cfe-commits
https://github.com/jaidTw approved this pull request. https://github.com/llvm/llvm-project/pull/79929 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add support for RISC-V Pointer Masking (PR #79929)

2024-02-02 Thread Jesse Huang via cfe-commits
jaidTw wrote: > > Should you also update the riscv32-toolchain-extra.c and > > riscv64-toolchain-extra.c? > > It is not immediately obvious to me what you had in mind for changing those > tests. Could you please clarify? I found I messed up the configuration so there were some test errors on

[llvm] [clang] [RISCV] Add support for RISC-V Pointer Masking (PR #79929)

2024-02-02 Thread Jesse Huang via cfe-commits
https://github.com/jaidTw commented: Should you also update the `riscv32-toolchain-extra.c` and `riscv64-toolchain-extra.c`? LGTM otherwise https://github.com/llvm/llvm-project/pull/79929 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:/