[all-commits] [llvm/llvm-project] 3e7eab: [RISCV] RISCVELFTargetObjectFile: use 2-byte align...
Fangrui Song via All-commits
all-commits at lists.llvm.org
Thu May 11 13:44:51 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 3e7eab099766cc92e5930a7883a014d0de8710d9
https://github.com/llvm/llvm-project/commit/3e7eab099766cc92e5930a7883a014d0de8710d9
Author: Fangrui Song <i at maskray.me>
Date: 2023-05-11 (Thu, 11 May 2023)
Changed paths:
M llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCObjectFileInfo.cpp
M llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCObjectFileInfo.h
M llvm/lib/Target/RISCV/RISCVTargetObjectFile.cpp
M llvm/lib/Target/RISCV/RISCVTargetObjectFile.h
M llvm/test/CodeGen/RISCV/align.ll
Log Message:
-----------
[RISCV] RISCVELFTargetObjectFile: use 2-byte alignment for .text if RVC
For the "C" Standard Extension/Zca, D45560 enabled 2-byte alignment for
assembly output (e.g. `clang -S a.c`) and D102052 enabled 2-byte alignment for
assembly input and object file output (e.g. `clang -c a.s`).
This patch ports the behavior for code generation and object file output by
adding RISCVELFTargetObjectFile::getTextSectionAlignment (e.g. `clang -c a.c`).
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D150240
More information about the All-commits
mailing list