1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00
llvm-mirror/lib/MC
Anirudh Prasad 7a49f52054 [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
..
MCDisassembler
MCParser [AsmParser][SystemZ][z/OS] Implement HLASM location counter syntax ("*") for Z PC-relative instructions. 2021-05-03 14:58:24 -04:00
CMakeLists.txt
ConstantPools.cpp
ELFObjectWriter.cpp
MachObjectWriter.cpp
MCAsmBackend.cpp
MCAsmInfo.cpp
MCAsmInfoCOFF.cpp
MCAsmInfoDarwin.cpp
MCAsmInfoELF.cpp
MCAsmInfoWasm.cpp
MCAsmInfoXCOFF.cpp [XCOFF] make .file directive have directory info 2021-04-27 00:15:23 -04:00
MCAsmMacro.cpp
MCAsmStreamer.cpp
MCAssembler.cpp
MCCodeEmitter.cpp
MCCodeView.cpp
MCContext.cpp
MCDwarf.cpp
MCELFObjectTargetWriter.cpp
MCELFStreamer.cpp
MCExpr.cpp [AIX][TLS] Add ASM portion changes to support TLSGD relocations to XCOFF objects 2021-04-29 13:18:59 -05:00
MCFragment.cpp
MCInst.cpp
MCInstPrinter.cpp
MCInstrAnalysis.cpp
MCInstrDesc.cpp
MCInstrInfo.cpp
MCLabel.cpp
MCLinkerOptimizationHint.cpp
MCMachObjectTargetWriter.cpp
MCMachOStreamer.cpp
MCNullStreamer.cpp
MCObjectFileInfo.cpp
MCObjectStreamer.cpp
MCObjectWriter.cpp
MCPseudoProbe.cpp
MCRegisterInfo.cpp
MCSchedule.cpp
MCSection.cpp
MCSectionCOFF.cpp
MCSectionELF.cpp
MCSectionMachO.cpp
MCSectionWasm.cpp
MCSectionXCOFF.cpp [XCOFF][AIX] Add Global Variables Directly to TOC for 32 bit AIX 2021-04-30 14:48:02 +00:00
MCStreamer.cpp
MCSubtargetInfo.cpp AMDGPU: Add target id and code object v4 support 2021-03-24 11:54:05 -04:00
MCSymbol.cpp
MCSymbolELF.cpp
MCSymbolXCOFF.cpp
MCTargetOptions.cpp
MCTargetOptionsCommandFlags.cpp
MCValue.cpp
MCWasmObjectTargetWriter.cpp
MCWasmStreamer.cpp
MCWin64EH.cpp
MCWinCOFFStreamer.cpp
MCWinEH.cpp
MCXCOFFObjectTargetWriter.cpp
MCXCOFFStreamer.cpp
StringTableBuilder.cpp
SubtargetFeature.cpp
WasmObjectWriter.cpp [WebAssembly] Improve error messages regarding missing indirect function table. NFC 2021-04-07 07:58:43 -07:00
WinCOFFObjectWriter.cpp
XCOFFObjectWriter.cpp [XCOFF][AIX] Add Global Variables Directly to TOC for 32 bit AIX 2021-04-30 14:48:02 +00:00