[llvm-branch-commits] [llvm][lld][RISCV] Support x3_reg_usage (PR #84598)

2024-03-11 Thread Paul Kirth via llvm-branch-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/84598 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm][lld][RISCV] Support x3_reg_usage (PR #84598)

2024-03-11 Thread Paul Kirth via llvm-branch-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/84598 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm][lld][RISCV] Support x3_reg_usage (PR #84598)

2024-03-11 Thread Paul Kirth via llvm-branch-commits
@@ -47,6 +48,15 @@ enum AtomicABI : unsigned { }; } // namespace RISCVAtomicAbiTag +namespace RISCVX3RegUse { +enum X3RegUsage : unsigned { + UNKNOWN = 0, + GP = 0, ilovepi wrote: ugh, you are correct. I haven't tested this properly yet, since I'm not 100%

[llvm-branch-commits] [llvm][lld][RISCV] Support x3_reg_usage (PR #84598)

2024-03-11 Thread Paul Kirth via llvm-branch-commits
ilovepi wrote: I forgot to mention that I'm still trying to figure out how to add the attribute. I know mechanically how, but AFAIK there isn't a target feature or anything we set when enabling SCS(except for Zcfiscs), so if there is an obvious way, a pointer would be welcome. I think that's

[llvm-branch-commits] [llvm][lld][RISCV] Support x3_reg_usage (PR #84598)

2024-03-11 Thread Paul Kirth via llvm-branch-commits
@@ -24,6 +24,9 @@ .attribute priv_spec_revision, 0 # CHECK: attribute 12, 0 + ilovepi wrote: Thank you. There is a good chance that is the case. https://github.com/llvm/llvm-project/pull/84598 ___

[llvm-branch-commits] [llvm][lld][RISCV] Support x3_reg_usage (PR #84598)

2024-03-11 Thread Paul Kirth via llvm-branch-commits
@@ -1136,11 +1136,35 @@ static void mergeAtomic(DenseMap , }; } +static void mergeX3RegUse(DenseMap , + const InputSectionBase *oldSection, + const InputSectionBase *newSection, + unsigned int

[llvm-branch-commits] [llvm][lld][RISCV] Support x3_reg_usage (PR #84598)

2024-03-10 Thread Wang Pengcheng via llvm-branch-commits
@@ -47,6 +48,15 @@ enum AtomicABI : unsigned { }; } // namespace RISCVAtomicAbiTag +namespace RISCVX3RegUse { +enum X3RegUsage : unsigned { + UNKNOWN = 0, + GP = 0, wangpc-pp wrote: Copy paste mistakes? Why all 0s?

[llvm-branch-commits] [llvm][lld][RISCV] Support x3_reg_usage (PR #84598)

2024-03-10 Thread Wang Pengcheng via llvm-branch-commits
@@ -24,6 +24,9 @@ .attribute priv_spec_revision, 0 # CHECK: attribute 12, 0 + wangpc-pp wrote: This blank should be added in Atomic ABI PR I think. https://github.com/llvm/llvm-project/pull/84598 ___

[llvm-branch-commits] [llvm][lld][RISCV] Support x3_reg_usage (PR #84598)

2024-03-10 Thread Wang Pengcheng via llvm-branch-commits
@@ -520,3 +520,8 @@ define i8 @atomic_load_i8_seq_cst(ptr %a) nounwind { ; A6S: .attribute 14, 2 ; A6C: .attribute 14, 1 } + wangpc-pp wrote: No CHECKs for this test or I miss something here? https://github.com/llvm/llvm-project/pull/84598

[llvm-branch-commits] [llvm][lld][RISCV] Support x3_reg_usage (PR #84598)

2024-03-10 Thread Craig Topper via llvm-branch-commits
@@ -1136,11 +1136,35 @@ static void mergeAtomic(DenseMap , }; } +static void mergeX3RegUse(DenseMap , + const InputSectionBase *oldSection, + const InputSectionBase *newSection, + unsigned int

[llvm-branch-commits] [llvm][lld][RISCV] Support x3_reg_usage (PR #84598)

2024-03-09 Thread Paul Kirth via llvm-branch-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/84598 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm][lld][RISCV] Support x3_reg_usage (PR #84598)

2024-03-09 Thread Paul Kirth via llvm-branch-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/84598 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm][lld][RISCV] Support x3_reg_usage (PR #84598)

2024-03-09 Thread Paul Kirth via llvm-branch-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/84598 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm][lld][RISCV] Support x3_reg_usage (PR #84598)

2024-03-09 Thread Paul Kirth via llvm-branch-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/84598 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm][lld][RISCV] Support x3_reg_usage (PR #84598)

2024-03-09 Thread Paul Kirth via llvm-branch-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/84598 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm][lld][RISCV] Support x3_reg_usage (PR #84598)

2024-03-09 Thread Paul Kirth via llvm-branch-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/84598 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm][lld][RISCV] Support x3_reg_usage (PR #84598)

2024-03-08 Thread Paul Kirth via llvm-branch-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/84598 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm][lld][RISCV] Support x3_reg_usage (PR #84598)

2024-03-08 Thread Paul Kirth via llvm-branch-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/84598 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm][lld][RISCV] Support x3_reg_usage (PR #84598)

2024-03-08 Thread via llvm-branch-commits
llvmbot wrote: @llvm/pr-subscribers-lld-elf @llvm/pr-subscribers-lld Author: Paul Kirth (ilovepi) Changes This patch adds basic support for the Tag_RISCV_x3_reg_usage attribute specified in:

[llvm-branch-commits] [llvm][lld][RISCV] Support x3_reg_usage (PR #84598)

2024-03-08 Thread via llvm-branch-commits
llvmbot wrote: @llvm/pr-subscribers-mc Author: Paul Kirth (ilovepi) Changes This patch adds basic support for the Tag_RISCV_x3_reg_usage attribute specified in: https://github.com/riscv-non-isa/riscv-elf-psabi-doc/blob/master/riscv-elf.adoc#tag_riscv_x3_reg_usage-16-uleb128value It adds

[llvm-branch-commits] [llvm][lld][RISCV] Support x3_reg_usage (PR #84598)

2024-03-08 Thread Paul Kirth via llvm-branch-commits
https://github.com/ilovepi created https://github.com/llvm/llvm-project/pull/84598 This patch adds basic support for the Tag_RISCV_x3_reg_usage attribute specified in: https://github.com/riscv-non-isa/riscv-elf-psabi-doc/blob/master/riscv-elf.adoc#tag_riscv_x3_reg_usage-16-uleb128value It adds