[all-commits] [llvm/llvm-project] 42652c: [Sparc] Fixes for the internal assembler
LemonBoy via All-commits
all-commits at lists.llvm.org
Mon Jan 4 04:26:20 PST 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 42652c1d6e21345173f5dd971cd453520aa5a7ef
https://github.com/llvm/llvm-project/commit/42652c1d6e21345173f5dd971cd453520aa5a7ef
Author: LemonBoy <thatlemon at gmail.com>
Date: 2021-01-04 (Mon, 04 Jan 2021)
Changed paths:
M llvm/lib/Target/Sparc/AsmParser/SparcAsmParser.cpp
M llvm/lib/Target/Sparc/MCTargetDesc/SparcInstPrinter.cpp
M llvm/lib/Target/Sparc/MCTargetDesc/SparcMCCodeEmitter.cpp
M llvm/lib/Target/Sparc/MCTargetDesc/SparcMCExpr.cpp
M llvm/lib/Target/Sparc/MCTargetDesc/SparcMCExpr.h
M llvm/lib/Target/Sparc/SparcAsmPrinter.cpp
M llvm/lib/Target/Sparc/SparcISelLowering.cpp
M llvm/lib/Target/Sparc/SparcInstr64Bit.td
M llvm/lib/Target/Sparc/SparcInstrFormats.td
M llvm/lib/Target/Sparc/SparcInstrInfo.td
M llvm/test/MC/Sparc/sparc-asm-errors.s
M llvm/test/MC/Sparc/sparc-ctrl-instructions.s
M llvm/test/MC/Sparc/sparc-relocations.s
Log Message:
-----------
[Sparc] Fixes for the internal assembler
* Prevent the generation of invalid shift instructions by constraining
the immediate field. I've limited the shift field to constant values
only, adding the `R_SPARC_5`/`R_SPARC_6` relocations is trivial if
needed (but I can't really think of a use case for those).
* Fix the generation of PC-relative `call`
* Fix the transformation of `jmp sym` into `jmpl`
* Emit fixups for simm13 operands
I moved the choice of the correct relocation into the code emitter as I've
seen the other backends do, it can be definitely cleaner but the aim was
to reduce the scope of the patch as much as possible.
Fixes the problems raised by joerg in L254199
Reviewed By: dcederman
Differential Revision: https://reviews.llvm.org/D78193
More information about the All-commits
mailing list