github-actions[bot] wrote:
@keith-packard Congratulations on having your first Pull Request (PR) merged
into the LLVM Project!
Your changes will be combined with recent changes from other authors, then
tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a
problem with a
https://github.com/topperc closed
https://github.com/llvm/llvm-project/pull/108942
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
keith-packard wrote:
> LGTM. I assume you need someone to push it?
Yes please! The PowerPC one is waiting in the wings :-)
https://github.com/llvm/llvm-project/pull/108942
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/
https://github.com/topperc approved this pull request.
LGTM. I assume you need someone to push it?
https://github.com/llvm/llvm-project/pull/108942
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/
keith-packard wrote:
I've retitled the commit messages to match llvm conventions and added a
clean-up to replace another instance of `getParent()->getParent()` with
`getModule()`.
https://github.com/llvm/llvm-project/pull/108942
___
cfe-commits maili
https://github.com/keith-packard updated
https://github.com/llvm/llvm-project/pull/108942
>From f91cf985d10a07af617b6098f50d023108d060a4 Mon Sep 17 00:00:00 2001
From: Keith Packard
Date: Wed, 2 Oct 2024 12:37:30 -0700
Subject: [PATCH 1/5] [RISCV][ISelLowering] Use getModule() instead of
getPa
https://github.com/keith-packard updated
https://github.com/llvm/llvm-project/pull/108942
>From 1ca3c96bc0e07a2fdae982736017f1d31147e4e4 Mon Sep 17 00:00:00 2001
From: Keith Packard
Date: Mon, 16 Sep 2024 15:41:38 +0200
Subject: [PATCH 1/4] riscv: Support -mstack-protector-guard=tls
Add suppor
@@ -0,0 +1,47 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
UTC_ARGS: --version 5
+; RUN: llc -mtriple=riscv64-unknown-elf -verify-machineinstrs < %s \
+; RUN: | FileCheck %s
+
+define void @foo(i64 %t) sspstrong {
keith-pa
https://github.com/keith-packard updated
https://github.com/llvm/llvm-project/pull/108942
>From 156b989feea26694b291cde9be637947be9aca67 Mon Sep 17 00:00:00 2001
From: Keith Packard
Date: Mon, 16 Sep 2024 15:41:38 +0200
Subject: [PATCH 1/4] riscv: Support -mstack-protector-guard=tls
Add suppor
https://github.com/keith-packard updated
https://github.com/llvm/llvm-project/pull/108942
>From 156b989feea26694b291cde9be637947be9aca67 Mon Sep 17 00:00:00 2001
From: Keith Packard
Date: Mon, 16 Sep 2024 15:41:38 +0200
Subject: [PATCH 1/4] riscv: Support -mstack-protector-guard=tls
Add suppor
@@ -0,0 +1,47 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
UTC_ARGS: --version 5
+; RUN: llc -mtriple=riscv64-unknown-elf -verify-machineinstrs < %s \
+; RUN: | FileCheck %s
+
+define void @foo(i64 %t) sspstrong {
jrtc27 w
@@ -0,0 +1,47 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
UTC_ARGS: --version 5
+; RUN: llc -mtriple=riscv64-unknown-elf -verify-machineinstrs < %s \
+; RUN: | FileCheck %s
+
+define void @foo(i64 %t) sspstrong {
keith-pa
@@ -0,0 +1,47 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
UTC_ARGS: --version 5
+; RUN: llc -mtriple=riscv64-unknown-elf -verify-machineinstrs < %s \
keith-packard wrote:
I kinda wondered -- the existing tests are all over t
keith-packard wrote:
yup, all fixes mirrored over there. Thanks for your careful review!
https://github.com/llvm/llvm-project/pull/108942
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/
@@ -0,0 +1,50 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
UTC_ARGS: --version 5
+; RUN: llc -verify-machineinstrs < %s | \
+; RUN: FileCheck %s
+
+target triple = "riscv64-unknown-linux-gnu"
+
+define dso_local void @foo(i64 %t) local_unnamed
https://github.com/keith-packard updated
https://github.com/llvm/llvm-project/pull/108942
>From 156b989feea26694b291cde9be637947be9aca67 Mon Sep 17 00:00:00 2001
From: Keith Packard
Date: Mon, 16 Sep 2024 15:41:38 +0200
Subject: [PATCH 1/4] riscv: Support -mstack-protector-guard=tls
Add suppor
@@ -0,0 +1,50 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
UTC_ARGS: --version 5
+; RUN: llc -verify-machineinstrs < %s | \
+; RUN: FileCheck %s
+
+target triple = "riscv64-unknown-linux-gnu"
+
+define dso_local void @foo(i64 %t) local_unnamed
@@ -0,0 +1,47 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
UTC_ARGS: --version 5
+; RUN: llc -mtriple=riscv64-unknown-elf -verify-machineinstrs < %s \
+; RUN: | FileCheck %s
+
+define void @foo(i64 %t) sspstrong {
jrtc27 w
@@ -0,0 +1,47 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
UTC_ARGS: --version 5
+; RUN: llc -mtriple=riscv64-unknown-elf -verify-machineinstrs < %s \
jrtc27 wrote:
This was previously linux-gnu not elf. If it works fine with
@@ -23,3 +26,9 @@ void bar(int x) {
// AARCH64: [[ATTR1]] = !{i32 1, !"stack-protector-guard", !"sysreg"}
// AARCH64: [[ATTR2]] = !{i32 1, !"stack-protector-guard-reg", !"sp_el0"}
// AARCH64: [[ATTR3]] = !{i32 1, !"stack-protector-guard-offset", i32 1024}
+
+// RISCV: !llvm.mod
@@ -0,0 +1,50 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
UTC_ARGS: --version 5
+; RUN: llc -verify-machineinstrs < %s | \
+; RUN: FileCheck %s
keith-packard wrote:
Thanks. After moving the triple into the RUN line, it's lon
https://github.com/keith-packard updated
https://github.com/llvm/llvm-project/pull/108942
>From 156b989feea26694b291cde9be637947be9aca67 Mon Sep 17 00:00:00 2001
From: Keith Packard
Date: Mon, 16 Sep 2024 15:41:38 +0200
Subject: [PATCH 1/4] riscv: Support -mstack-protector-guard=tls
Add suppor
https://github.com/keith-packard updated
https://github.com/llvm/llvm-project/pull/108942
>From 156b989feea26694b291cde9be637947be9aca67 Mon Sep 17 00:00:00 2001
From: Keith Packard
Date: Mon, 16 Sep 2024 15:41:38 +0200
Subject: [PATCH 1/4] riscv: Support -mstack-protector-guard=tls
Add suppor
@@ -0,0 +1,50 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
UTC_ARGS: --version 5
+; RUN: llc -verify-machineinstrs < %s | \
+; RUN: FileCheck %s
+
+target triple = "riscv64-unknown-linux-gnu"
+
+define dso_local void @foo(i64 %t) local_unnamed
@@ -0,0 +1,50 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
UTC_ARGS: --version 5
+; RUN: llc -verify-machineinstrs < %s | \
+; RUN: FileCheck %s
+
+target triple = "riscv64-unknown-linux-gnu"
keith-packard wrote:
sorry, copie
jrtc27 wrote:
Same comments as -global
https://github.com/llvm/llvm-project/pull/108942
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,50 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
UTC_ARGS: --version 5
+; RUN: llc -verify-machineinstrs < %s | \
+; RUN: FileCheck %s
+
+target triple = "riscv64-unknown-linux-gnu"
+
+define dso_local void @foo(i64 %t) local_unnamed
@@ -0,0 +1,50 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
UTC_ARGS: --version 5
+; RUN: llc -verify-machineinstrs < %s | \
+; RUN: FileCheck %s
+
+target triple = "riscv64-unknown-linux-gnu"
+
+define dso_local void @foo(i64 %t) local_unnamed
@@ -0,0 +1,50 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
UTC_ARGS: --version 5
+; RUN: llc -verify-machineinstrs < %s | \
+; RUN: FileCheck %s
jrtc27 wrote:
The line above isn't (currently) long enough to warrant wrapping,
@@ -0,0 +1,50 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
UTC_ARGS: --version 5
+; RUN: llc -verify-machineinstrs < %s | \
+; RUN: FileCheck %s
+
+target triple = "riscv64-unknown-linux-gnu"
+
+define dso_local void @foo(i64 %t) local_unnamed
@@ -0,0 +1,50 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
UTC_ARGS: --version 5
+; RUN: llc -verify-machineinstrs < %s | \
+; RUN: FileCheck %s
+
+target triple = "riscv64-unknown-linux-gnu"
jrtc27 wrote:
Convention is to pu
keith-packard wrote:
> LGTM
Thanks so much for all the review and help here; really appreciate it.
https://github.com/llvm/llvm-project/pull/108942
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo
@@ -3644,13 +3645,28 @@ static void RenderSSPOptions(const Driver &D, const
ToolChain &TC,
<< A->getOption().getName() << Value << "sysreg global";
return;
}
+if (EffectiveTriple.isRISCV()) {
+ if (Value != "tls" && Value != "global") {
---
https://github.com/keith-packard updated
https://github.com/llvm/llvm-project/pull/108942
>From 156b989feea26694b291cde9be637947be9aca67 Mon Sep 17 00:00:00 2001
From: Keith Packard
Date: Mon, 16 Sep 2024 15:41:38 +0200
Subject: [PATCH 1/4] riscv: Support -mstack-protector-guard=tls
Add suppor
https://github.com/topperc approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/108942
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -21228,6 +21228,14 @@ Value
*RISCVTargetLowering::getIRStackGuard(IRBuilderBase &IRB) const {
if (Subtarget.isTargetAndroid())
return useTpOffset(IRB, -0x18);
+ Module *M = IRB.GetInsertBlock()->getParent()->getParent();
keith-packard wrote:
Yup, g
https://github.com/keith-packard updated
https://github.com/llvm/llvm-project/pull/108942
>From 156b989feea26694b291cde9be637947be9aca67 Mon Sep 17 00:00:00 2001
From: Keith Packard
Date: Mon, 16 Sep 2024 15:41:38 +0200
Subject: [PATCH 1/3] riscv: Support -mstack-protector-guard=tls
Add suppor
@@ -21228,6 +21228,14 @@ Value
*RISCVTargetLowering::getIRStackGuard(IRBuilderBase &IRB) const {
if (Subtarget.isTargetAndroid())
return useTpOffset(IRB, -0x18);
+ Module *M = IRB.GetInsertBlock()->getParent()->getParent();
keith-packard wrote:
Thanks
https://github.com/keith-packard edited
https://github.com/llvm/llvm-project/pull/108942
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -21228,6 +21228,14 @@ Value
*RISCVTargetLowering::getIRStackGuard(IRBuilderBase &IRB) const {
if (Subtarget.isTargetAndroid())
return useTpOffset(IRB, -0x18);
+ Module *M = IRB.GetInsertBlock()->getParent()->getParent();
topperc wrote:
I think `get
https://github.com/keith-packard updated
https://github.com/llvm/llvm-project/pull/108942
>From 60ad4f7793701bc50d1c65db4fe665558678fd7b Mon Sep 17 00:00:00 2001
From: Keith Packard
Date: Mon, 16 Sep 2024 15:41:38 +0200
Subject: [PATCH 1/3] riscv: Support -mstack-protector-guard=tls
Add suppor
@@ -3644,13 +3645,28 @@ static void RenderSSPOptions(const Driver &D, const
ToolChain &TC,
<< A->getOption().getName() << Value << "sysreg global";
return;
}
+if (EffectiveTriple.isRISCV()) {
+ if (Value != "tls" && Value != "global") {
---
@@ -3681,6 +3698,11 @@ static void RenderSSPOptions(const Driver &D, const
ToolChain &TC,
D.Diag(diag::err_drv_invalid_value) << A->getOption().getName() << Value;
return;
}
+if (EffectiveTriple.isRISCV() && Value != "tp") {
+ D.Diag(diag::err_drv_inva
https://github.com/keith-packard updated
https://github.com/llvm/llvm-project/pull/108942
>From a295c6d8057ddd712097e3bf659cdbe3bb4ec869 Mon Sep 17 00:00:00 2001
From: Keith Packard
Date: Mon, 16 Sep 2024 15:41:38 +0200
Subject: [PATCH 1/3] riscv: Support -mstack-protector-guard=tls
Add suppor
@@ -0,0 +1,19 @@
+; RUN: llc -mtriple=riscv64-unknown-elf < %s | \
keith-packard wrote:
Thanks. I wondered how that was supposed to work.
https://github.com/llvm/llvm-project/pull/108942
___
cfe-commits mailing list
cf
@@ -3644,13 +3645,28 @@ static void RenderSSPOptions(const Driver &D, const
ToolChain &TC,
<< A->getOption().getName() << Value << "sysreg global";
return;
}
+if (EffectiveTriple.isRISCV()) {
+ if (Value != "tls" && Value != "global") {
---
https://github.com/arichardson edited
https://github.com/llvm/llvm-project/pull/108942
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/arichardson edited
https://github.com/llvm/llvm-project/pull/108942
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -3644,13 +3645,28 @@ static void RenderSSPOptions(const Driver &D, const
ToolChain &TC,
<< A->getOption().getName() << Value << "sysreg global";
return;
}
+if (EffectiveTriple.isRISCV()) {
+ if (Value != "tls" && Value != "global") {
---
@@ -3681,6 +3698,11 @@ static void RenderSSPOptions(const Driver &D, const
ToolChain &TC,
D.Diag(diag::err_drv_invalid_value) << A->getOption().getName() << Value;
return;
}
+if (EffectiveTriple.isRISCV() && Value != "tp") {
+ D.Diag(diag::err_drv_inva
@@ -0,0 +1,19 @@
+; RUN: llc -mtriple=riscv64-unknown-elf < %s | \
topperc wrote:
Use `llvm/utils/update_llc_test_checks.py` to generate the checks.
https://github.com/llvm/llvm-project/pull/108942
___
cfe-commits mail
@@ -3664,12 +3680,18 @@ static void RenderSSPOptions(const Driver &D, const
ToolChain &TC,
<< A->getOption().getName() << Value;
return;
}
+if (EffectiveTriple.isRISCV() && (Offset <= -2048 || Offset >= 2048)) {
keith-packard wrote:
Do
@@ -3644,13 +3645,28 @@ static void RenderSSPOptions(const Driver &D, const
ToolChain &TC,
<< A->getOption().getName() << Value << "sysreg global";
return;
}
+if (EffectiveTriple.isRISCV()) {
+ if (Value != "tls" && Value != "global") {
+D.
@@ -3644,13 +3645,28 @@ static void RenderSSPOptions(const Driver &D, const
ToolChain &TC,
<< A->getOption().getName() << Value << "sysreg global";
return;
}
+if (EffectiveTriple.isRISCV()) {
+ if (Value != "tls" && Value != "global") {
---
@@ -3664,12 +3680,18 @@ static void RenderSSPOptions(const Driver &D, const
ToolChain &TC,
<< A->getOption().getName() << Value;
return;
}
+if (EffectiveTriple.isRISCV() && (Offset <= -2048 || Offset >= 2048)) {
topperc wrote:
Ok. If t
https://github.com/keith-packard updated
https://github.com/llvm/llvm-project/pull/108942
>From a295c6d8057ddd712097e3bf659cdbe3bb4ec869 Mon Sep 17 00:00:00 2001
From: Keith Packard
Date: Mon, 16 Sep 2024 15:41:38 +0200
Subject: [PATCH 1/3] riscv: Support -mstack-protector-guard=tls
Add suppor
@@ -3664,12 +3680,18 @@ static void RenderSSPOptions(const Driver &D, const
ToolChain &TC,
<< A->getOption().getName() << Value;
return;
}
+if (EffectiveTriple.isRISCV() && (Offset <= -2048 || Offset >= 2048)) {
keith-packard wrote:
Ye
https://github.com/keith-packard edited
https://github.com/llvm/llvm-project/pull/108942
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -3664,12 +3680,18 @@ static void RenderSSPOptions(const Driver &D, const
ToolChain &TC,
<< A->getOption().getName() << Value;
return;
}
+if (EffectiveTriple.isRISCV() && (Offset <= -2048 || Offset >= 2048)) {
arichardson wrote:
Shou
@@ -3644,13 +3645,28 @@ static void RenderSSPOptions(const Driver &D, const
ToolChain &TC,
<< A->getOption().getName() << Value << "sysreg global";
return;
}
+if (EffectiveTriple.isRISCV()) {
+ if (Value != "tls" && Value != "global") {
---
@@ -3644,13 +3645,28 @@ static void RenderSSPOptions(const Driver &D, const
ToolChain &TC,
<< A->getOption().getName() << Value << "sysreg global";
return;
}
+if (EffectiveTriple.isRISCV()) {
+ if (Value != "tls" && Value != "global") {
---
@@ -3664,12 +3680,18 @@ static void RenderSSPOptions(const Driver &D, const
ToolChain &TC,
<< A->getOption().getName() << Value;
return;
}
+if (EffectiveTriple.isRISCV() && (Offset <= -2048 || Offset >= 2048)) {
topperc wrote:
I don't
@@ -3644,13 +3645,28 @@ static void RenderSSPOptions(const Driver &D, const
ToolChain &TC,
<< A->getOption().getName() << Value << "sysreg global";
return;
}
+if (EffectiveTriple.isRISCV()) {
+ if (Value != "tls" && Value != "global") {
+D.
topperc wrote:
> offsetfor
offset for
https://github.com/llvm/llvm-project/pull/108942
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
llvmbot wrote:
@llvm/pr-subscribers-clang-driver
Author: Keith Packard (keith-packard)
Changes
Add support for using a thread-local variable with a specified offsetfor
holding the stack guard canary value.
---
Full diff: https://github.com/llvm/llvm-project/pull/108942.diff
5 Files Aff
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Keith Packard (keith-packard)
Changes
Add support for using a thread-local variable with a specified offsetfor
holding the stack guard canary value.
---
Full diff: https://github.com/llvm/llvm-project/pull/108942.diff
5 Files Affected:
https://github.com/keith-packard created
https://github.com/llvm/llvm-project/pull/108942
Add support for using a thread-local variable with a specified offsetfor
holding the stack guard canary value.
>From 7822a1ee2eed923a3014577668bdd8f1c8145d4c Mon Sep 17 00:00:00 2001
From: Keith Packard
67 matches
Mail list logo