llvm-project/llvm/test/MC
Roger Ferrer Ibanez 577a97e2b9 [RISCV] Add "lla" pseudo-instruction to assembler
This pseudo-instruction is similar to la but uses PC-relative addressing
unconditionally. This is, la is only different to lla when using -fPIC. This
pseudo-instruction seems often forgotten in several specs but it is definitely
mentioned in binutils opcodes/riscv-opc.c. The semantics are defined both in
page 37 of the "RISC-V Reader" book but also in function macro found in
gas/config/tc-riscv.c.

This is a very first step towards adding PIC support for Linux in the RISC-V
backend.

The lla pseudo-instruction expands to a sequence of auipc + addi with a couple
of pc-rel relocations where the second points to the first one. This is
described in
https://github.com/riscv/riscv-elf-psabi-doc/blob/master/riscv-elf.md#pc-relative-symbol-addresses

For now, this patch only introduces support of that pseudo instruction at the
assembler parser.

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

llvm-svn: 339314
2018-08-09 07:08:20 +00:00
..
AArch64 [AArch64] Add support for got relocated LDR's 2018-08-02 06:24:40 +00:00
AMDGPU [AMDGPU] Fix lit failures introduced in r335281 2018-06-21 22:30:09 +00:00
ARM ARM-MachO: don't add Thumb bit for addend to non-external relocation. 2018-08-06 11:32:44 +00:00
AVR [AVR] Implement some missing code paths 2017-12-11 11:01:27 +00:00
AsmParser [AsmParser] Fix preserve-comments-crlf.s on FreeBSD 2018-07-26 06:07:03 +00:00
BPF bpf: New disassembler testcases for 32-bit subregister support 2018-02-23 23:49:35 +00:00
COFF [MC] Add support for the .rva assembler directive for COFF targets 2018-07-26 20:11:26 +00:00
Disassembler Revert "[WebAssembly] Added default stack-only instruction mode for MC." 2018-07-27 23:19:51 +00:00
ELF [DWARF] Unclamp line table version on Darwin for v5 and later. 2018-08-08 21:16:50 +00:00
Hexagon [Hexagon] Fix the value of HexagonII::TypeCVI_FIRST 2018-06-19 18:09:54 +00:00
Lanai
MachO [MC] Error on a .zerofill directive in a non-virtual section 2018-07-02 17:29:43 +00:00
Mips [mips] Replace custom parsing logic for data directives by the `addAliasForDirective` 2018-07-25 07:07:43 +00:00
PowerPC Complete the SPE instruction set patterns 2018-07-18 04:24:57 +00:00
RISCV [RISCV] Add "lla" pseudo-instruction to assembler 2018-08-09 07:08:20 +00:00
Sparc [Sparc] Add support for 13-bit PIC 2018-06-11 05:50:08 +00:00
SystemZ [SystemZ, AsmParser] Enable the mnemonic spell corrector. 2017-07-18 09:17:00 +00:00
WebAssembly [WebAssembly] Fix debug info tests after r338437. 2018-07-31 22:24:14 +00:00
X86 [X86][AsmParser] Don't consider %eip as a valid register outside of 32-bit mode. 2018-07-03 17:40:51 +00:00