llvm-project/llvm/test/MC
Anirudh Prasad ca02fab7e7 [AsmParser][SystemZ][z/OS] Implement HLASM location counter syntax ("*") for Z PC-relative instructions.
- This patch attempts to implement the location counter syntax (*) for the HLASM variant for PC-relative instructions.
- In the HLASM variant, for purely constant relocatable values, we expect a * token preceding it, with special support for " *" which is parsed as "<pc-rel-insn 0>"
- For combinations of absolute values and relocatable values, we don't expect the "*" preceding the token.

When you have a " * "  what’s accepted is:

```
*<space>.*{.*} -> <pc-rel-insn> 0
*[+|-][constant-value] -> <pc-rel-insn> [+|-]constant-value
```

When you don’t have a " * " what’s accepted is:

```
brasl  1,func           is allowed (MCSymbolRef type)
brasl  1,func+4         is allowed (MCBinary type)
brasl  1,4+func         is allowed (MCBinary type)
brasl  1,-4+func        is allowed (MCBinary type)
brasl  1,func-4         is allowed (MCBinary type)
brasl  1,*func          is not allowed (* cannot be used for non-MCConstantExprs)
brasl  1,*+func         is not allowed (* cannot be used for non-MCConstantExprs)
brasl  1,*+func+4       is not allowed (* cannot be used for non-MCConstantExprs)
brasl  1,*+4+func       is not allowed (* cannot be used for non-MCConstantExprs)
brasl  1,*-4+8+func     is not allowed (* cannot be used for non-MCConstantExprs)
```

Reviewed By: Kai

Differential Revision: https://reviews.llvm.org/D100987
2021-05-03 14:58:24 -04:00
..
AArch64 [AArch64] [COFF] Properly produce cross-section relative relocations 2021-04-14 12:31:26 +03:00
AMDGPU [AMDGPU][MC] Corrected parsing of carry in/out operands in VOP3 2021-04-19 13:42:31 +03:00
ARM [ARM][AArch64] Require appropriate features for crypto algorithms 2021-04-28 16:26:18 +01:00
AVR [AVR] Add register aliases XL, YH, etc 2021-03-03 15:36:05 +01:00
AsmParser [AsmParser][SystemZ][z/OS] Implement HLASM location counter syntax ("*") for Z PC-relative instructions. 2021-05-03 14:58:24 -04:00
BPF
COFF [CodeView] Fix inline sites that are missing code offsets. 2020-12-07 13:01:53 -08:00
CSKY [CSKY 6/n] Add support branch and symbol series instruction 2021-04-20 15:36:49 +08:00
Disassembler [ARM][disassembler] Fix incorrect number of MCOperands generated by the disassembler 2021-04-25 11:55:10 -07:00
ELF Fix test case in b4a8c0ebb6 2021-03-18 15:55:48 -07:00
Hexagon [Hexagon] Improve lowering of returns of i1 2021-04-22 16:47:52 -05:00
Lanai
M68k [M68k] Implement AsmParser 2021-04-13 09:25:34 +01:00
MSP430 [llvm-readobj] Update tests because of changes in llvm-readobj behavior 2020-07-20 10:39:04 +01:00
MachO [llvm-readobj] Recognize N_THUMB_DEF as a symbol flag 2021-04-30 17:39:56 -04:00
Mips ELFObjectWriter: Don't sort non-local symbols 2021-02-13 10:32:27 -08:00
PowerPC [PowerPC] Add ROP Protection Instructions for PowerPC 2021-04-15 11:38:38 -05:00
RISCV [RISCV] Have assembler check that the temp register is different than dest register for vmsgeu.vx pseudo. 2021-04-23 09:33:29 -07:00
Sparc [Sparc] Support relocatable expressions in the assembler 2021-02-10 14:52:44 +01:00
SystemZ [SystemZ] Introduce distinction between the jg/jl family of mnemonics for GNU as vs HLASM 2021-03-01 16:36:07 -05:00
VE [VE] Add missing BCR format 2020-10-29 23:30:49 +09:00
WebAssembly [WebAssembly] Test i64x2.abs encoding 2021-04-13 00:06:25 -07:00
X86 [MC][test] Fix reloc-directive-elf-*.s 2021-03-05 21:37:29 -08:00