[llvm] d5745d0 - [docs] Adding table of object file formats

Chris Bieneman via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 17 11:40:06 PDT 2022


Author: Chris Bieneman
Date: 2022-06-17T13:37:52-05:00
New Revision: d5745d0015ac96afd08c6bed1dc283c4bdfb80c1

URL: https://github.com/llvm/llvm-project/commit/d5745d0015ac96afd08c6bed1dc283c4bdfb80c1
DIFF: https://github.com/llvm/llvm-project/commit/d5745d0015ac96afd08c6bed1dc283c4bdfb80c1.diff

LOG: [docs] Adding table of object file formats

The added section and table here list the object file formats LLVM MC
supports and which targets support each format.

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

Added: 
    

Modified: 
    llvm/docs/CodeGenerator.rst

Removed: 
    


################################################################################
diff  --git a/llvm/docs/CodeGenerator.rst b/llvm/docs/CodeGenerator.rst
index 5c22ff1cfef6..d802124aa886 100644
--- a/llvm/docs/CodeGenerator.rst
+++ b/llvm/docs/CodeGenerator.rst
@@ -702,6 +702,37 @@ MCInst is the common currency used to represent machine instructions at the MC
 layer.  It is the type used by the instruction encoder, the instruction printer,
 and the type generated by the assembly parser and disassembler.
 
+.. _ObjectFormats:
+
+Object File Format
+------------------
+
+The MC layer's object writers support a variety of object formats. Because of
+target-specific aspects of object formats each target only supports a subset of
+the formats supported by the MC layer. Most targets support emitting ELF
+objects. Other vendor-specific objects are generally supported only on targets
+that are supported by that vendor (i.e. MachO is only supported on targets
+supported by Darwin, and XCOFF is only supported on targets that support AIX).
+Additionally some targets have their own object formats (i.e. DirectX, SPIR-V
+and WebAssembly).
+
+The table below captures a snapshot of object file support in LLVM:
+
+  .. table:: Object File Formats
+
+     ================== ========================================================
+     Format              Supported Targets
+     ================== ========================================================
+     ``COFF``            AArch64, ARM, X86
+     ``DXContainer``     DirectX
+     ``ELF``             AArch64, AMDGPU, ARM, AVR, BPF, CSKY, Hexagon, Lanai, LoongArch, M86k, MSP430, MIPS, PowerPC, RISCV, SPARC, SystemZ, VE, X86
+     ``GCOFF``           SystemZ
+     ``MachO``           AArch64, ARM, X86
+     ``SPIR-V``          SPIRV
+     ``WASM``            WebAssembly
+     ``XCOFF``           PowerPC
+     ================== ========================================================
+
 .. _Target-independent algorithms:
 .. _code generation algorithm:
 


        


More information about the llvm-commits mailing list