llvm-project/llvm/lib/Target/RISCV/MCTargetDesc
Shiva Chen 5af037f1e9 [RISCV] Insert R_RISCV_ALIGN relocation type and Nops for code alignment when linker relaxation enabled
Linker relaxation may change code size. We need to fix up the alignment
of alignment directive in text section by inserting Nops and R_RISCV_ALIGN
relocation type. So then linker could satisfy the alignment by removing Nops.

To do this:

1. Add shouldInsertExtraNopBytesForCodeAlign target hook to calculate
   the Nops we need to insert.

2. Add shouldInsertFixupForCodeAlign target hook to insert
   R_RISCV_ALIGN fixup type.

Differential Revision: https://reviews.llvm.org/D47755

llvm-svn: 352616
2019-01-30 11:16:59 +00:00
..
CMakeLists.txt Revert "[RISCV] implement li pseudo instruction" 2018-04-18 19:02:31 +00:00
LLVMBuild.txt Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
RISCVAsmBackend.cpp [RISCV] Insert R_RISCV_ALIGN relocation type and Nops for code alignment when linker relaxation enabled 2019-01-30 11:16:59 +00:00
RISCVAsmBackend.h [RISCV] Insert R_RISCV_ALIGN relocation type and Nops for code alignment when linker relaxation enabled 2019-01-30 11:16:59 +00:00
RISCVELFObjectWriter.cpp [RISCV] Insert R_RISCV_ALIGN relocation type and Nops for code alignment when linker relaxation enabled 2019-01-30 11:16:59 +00:00
RISCVELFStreamer.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
RISCVELFStreamer.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
RISCVFixupKinds.h [RISCV] Insert R_RISCV_ALIGN relocation type and Nops for code alignment when linker relaxation enabled 2019-01-30 11:16:59 +00:00
RISCVMCAsmInfo.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
RISCVMCAsmInfo.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
RISCVMCCodeEmitter.cpp [RISCV] Add R_RISCV_RELAX relocation to all possible relax candidates. 2019-01-21 05:27:09 +00:00
RISCVMCExpr.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
RISCVMCExpr.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
RISCVMCTargetDesc.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
RISCVMCTargetDesc.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
RISCVTargetStreamer.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
RISCVTargetStreamer.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00