[all-commits] [llvm/llvm-project] 8c37e3: [RISCV] Only set Zca flag for EF_RISCV_RVC in ELFO...
Craig Topper via All-commits
all-commits at lists.llvm.org
Wed Feb 7 08:24:09 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 8c37e3e64bb1432f771ec4d191837e6b3be5bf0c
https://github.com/llvm/llvm-project/commit/8c37e3e64bb1432f771ec4d191837e6b3be5bf0c
Author: Craig Topper <craig.topper at sifive.com>
Date: 2024-02-07 (Wed, 07 Feb 2024)
Changed paths:
M llvm/lib/ExecutionEngine/JITLink/ELF_riscv.cpp
M llvm/lib/Object/ELFObjectFile.cpp
M llvm/test/ExecutionEngine/JITLink/RISCV/ELF_relax_align_rvc.s
M llvm/test/ExecutionEngine/JITLink/RISCV/ELF_relax_call_boundary.s
M llvm/test/ExecutionEngine/JITLink/RISCV/ELF_relax_call_rvc.s
Log Message:
-----------
[RISCV] Only set Zca flag for EF_RISCV_RVC in ELFObjectFileBase::getRISCVFeatures(). (#80928)
This code appears to be a hack to set the features to include compressed
instructions if the ELF EFLAGS flags bit is present, but the ELF
attribute for the ISA string is no present or not accurate.
We can't remove the hack because llvm-mc doesn't create ELF attributes
by default so a lot of tests fail to disassembler properly. Using clang
as the assembler does set the attributes.
This patch changes the hack to only set Zca since that is the minimum
implied by the flag. Setting anything else potentially conflicts with
the ISA string containing Zcmp or Zcmt.
JITLink also needs to be updated to recognize Zca in addition to C.
More information about the All-commits
mailing list