[lld] [LLD][ELF][RISCV][Zicfilp] Handle .note.gnu.property sections for Zicfilp/Zicfiss features (PR #127193)
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 1 11:49:12 PDT 2025
================
@@ -0,0 +1,233 @@
+# REQUIRES: riscv
+# RUN: rm -rf %t && split-file %s %t && cd %t
+# RUN: llvm-mc --filetype=obj --triple=riscv32 rv32-func1-zicfiss.s -o rv32-func1-zicfiss.o
+# RUN: llvm-mc --filetype=obj --triple=riscv32 func2.s -o rv32-func2.o
+# RUN: llvm-mc --filetype=obj --triple=riscv32 rv32-func2-zicfiss.s -o rv32-func2-zicfiss.o
+# RUN: llvm-mc --filetype=obj --triple=riscv32 func3.s -o rv32-func3.o
+# RUN: llvm-mc --filetype=obj --triple=riscv32 rv32-func3-zicfiss.s -o rv32-func3-zicfiss.o
+
+# RUN: llvm-mc --filetype=obj --triple=riscv64 rv64-func1-zicfiss.s -o rv64-func1-zicfiss.o
+# RUN: llvm-mc --filetype=obj --triple=riscv64 func2.s -o rv64-func2.o
+# RUN: llvm-mc --filetype=obj --triple=riscv64 rv64-func2-zicfiss.s -o rv64-func2-zicfiss.o
+# RUN: llvm-mc --filetype=obj --triple=riscv64 func3.s -o rv64-func3.o
+# RUN: llvm-mc --filetype=obj --triple=riscv64 rv64-func3-zicfiss.s -o rv64-func3-zicfiss.o
+
+## ZICFISS should be enabled when it's enabled in all inputs
+# RUN: ld.lld rv32-func1-zicfiss.o rv32-func2-zicfiss.o rv32-func3-zicfiss.o \
----------------
MaskRay wrote:
Suggest a shorter name like `f1-s.32.o`. Then delete the line wrapping. We allow very long lines in tests. If wrapping is really needed, indent the continuation lines by 2 spaces instead of 1. Prefer --fatal-warnings to check that there is no warning/error.
Many RUN lines are duplicated between 32-bit and 64-bit. Suggest that we delete all but one 32-bit RUN lines. Then just name the 64-bit ones `f1-s.o`
I've made simplification to aarch64-feature-gcs.s in ccc416312ed72e92a885425d9cb9c01f9afa58eb.
https://github.com/llvm/llvm-project/pull/127193
More information about the llvm-commits
mailing list