llvm/lib/MC
Michael Zuckerman 079b067df7 [LLVM][inline-asm] Altmacro absolute expression '%' feature
In this patch, I introduce a new alt macro feature.
This feature adds meaning for the % when using it as a prefix to the calling macro arguments.

In the altmacro mode, the percent sign '%' before an absolute expression convert the expression first to a string. 
As described in the https://sourceware.org/binutils/docs-2.27/as/Altmacro.html
"Expression results as strings
You can write `%expr' to evaluate the expression expr and use the result as a string."

expression assumptions:

1. '%' can only evaluate an absolute expression.
2. Altmacro '%' must be the first character of the evaluated expression.
3. If no '%' is located before the expression, a regular module operation is expected.
4. The result of Absolute Expressions can be only integer.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301797 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-01 13:20:12 +00:00
..
MCDisassembler
MCParser [LLVM][inline-asm] Altmacro absolute expression '%' feature 2017-05-01 13:20:12 +00:00
CMakeLists.txt [WebAssembly] Add skeleton MC support for the Wasm container format 2017-02-22 01:23:18 +00:00
ConstantPools.cpp
ELFObjectWriter.cpp [MC] Fix some Clang-tidy modernize-use-using warnings; other minor fixes (NFC). 2017-04-26 22:31:39 +00:00
LLVMBuild.txt
MachObjectWriter.cpp
MCAsmBackend.cpp
MCAsmInfo.cpp
MCAsmInfoCOFF.cpp
MCAsmInfoDarwin.cpp
MCAsmInfoELF.cpp
MCAsmInfoWasm.cpp [WebAssembly] Add skeleton MC support for the Wasm container format 2017-02-22 01:23:18 +00:00
MCAsmStreamer.cpp This patch closes PR#32216: Better testing of schedule model instruction latencies/throughputs. 2017-04-14 07:44:23 +00:00
MCAssembler.cpp Add MCContext argument to MCAsmBackend::applyFixup for error reporting 2017-04-05 10:16:14 +00:00
MCCodeEmitter.cpp
MCCodeView.cpp [llvm-pdbdump] Abstract some of the YAML/Raw printing code. 2017-04-29 01:13:21 +00:00
MCContext.cpp Fix asm printing of associated sections. 2017-03-14 19:28:51 +00:00
MCDwarf.cpp Distinguish between code pointer size and DataLayout::getPointerSize() in DWARF info generation 2017-04-17 17:41:25 +00:00
MCELFObjectTargetWriter.cpp
MCELFStreamer.cpp Reland r298901 with modifications (reverted in r298932) 2017-04-03 21:50:04 +00:00
MCExpr.cpp [Assembler] Add location info to unary expressions. 2017-03-10 13:08:20 +00:00
MCFragment.cpp
MCInst.cpp
MCInstPrinter.cpp
MCInstrAnalysis.cpp
MCInstrDesc.cpp
MCLabel.cpp
MCLinkerOptimizationHint.cpp
MCMachObjectTargetWriter.cpp
MCMachOStreamer.cpp Simplify/make more explicit (by making less explicit in some ways) some function calls 2017-03-16 00:43:19 +00:00
MCNullStreamer.cpp [MC] Implement the COFF directives in MCNullStreamer. 2017-02-27 23:10:18 +00:00
MCObjectFileInfo.cpp [MC] Set SHT_MIPS_DWARF section type for all .debug_* sections on MIPS 2017-03-10 08:22:20 +00:00
MCObjectStreamer.cpp This patch closes PR#32216: Better testing of schedule model instruction latencies/throughputs. 2017-04-14 07:44:23 +00:00
MCObjectWriter.cpp MC: Remove unused virtual function MCObjectWriter::isWeak. NFC. 2017-04-08 23:35:49 +00:00
MCRegisterInfo.cpp
MCSchedule.cpp
MCSection.cpp
MCSectionCOFF.cpp
MCSectionELF.cpp Change section flag character for SHF_LINK_ORDER to "o". 2017-04-04 22:35:08 +00:00
MCSectionMachO.cpp
MCSectionWasm.cpp [WebAssembly] Add skeleton MC support for the Wasm container format 2017-02-22 01:23:18 +00:00
MCStreamer.cpp This patch closes PR#32216: Better testing of schedule model instruction latencies/throughputs. 2017-04-14 07:44:23 +00:00
MCSubtargetInfo.cpp
MCSymbol.cpp
MCSymbolELF.cpp
MCTargetOptions.cpp
MCValue.cpp
MCWasmObjectTargetWriter.cpp [WebAssembly] Add skeleton MC support for the Wasm container format 2017-02-22 01:23:18 +00:00
MCWasmStreamer.cpp MC: De-duplicate the object streamer implementations of EmitFileDirective into MCObjectStreamer. NFCI. 2017-03-03 21:22:06 +00:00
MCWin64EH.cpp
MCWinEH.cpp
StringTableBuilder.cpp [MC] Fix some Clang-tidy modernize-use-using warnings; other minor fixes (NFC). 2017-04-26 22:31:39 +00:00
SubtargetFeature.cpp
WasmObjectWriter.cpp [WebAssembly] Add size of section header to data relocation offsets. 2017-04-28 21:22:38 +00:00
WinCOFFObjectWriter.cpp [MC] Fix some Clang-tidy modernize-use-using warnings; other minor fixes (NFC). 2017-04-26 22:31:39 +00:00
WinCOFFStreamer.cpp MC: De-duplicate the object streamer implementations of EmitFileDirective into MCObjectStreamer. NFCI. 2017-03-03 21:22:06 +00:00