diff --git a/llvm/docs/CodeGenerator.rst b/llvm/docs/CodeGenerator.rst --- a/llvm/docs/CodeGenerator.rst +++ b/llvm/docs/CodeGenerator.rst @@ -702,6 +702,36 @@ layer. It is the type used by the instruction encoder, the instruction printer, and the type generated by the assembly parser and disassembler. +.. _ObjectFormats: + +Supported Object Formats +------------------------ + +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 + ================== ======================================================== + ``ELF`` AArch64, AMDGPU, ARM, AVR, BPF, CSKY, Hexagon, Lanai, LoongArch, M86k, MSP430, MIPS, PowerPC, RISCV, SPARC, VE, X86 + ``COFF`` AArch64, ARM, PowerPC, X86 + ``DXContainer`` DirectX + ``MachO`` AArch64, ARM, X86 + ``SPIR-V`` SPIR-V + ``WASM`` WebAssembly + ``XCOFF`` PowerPC + ================== ======================================================== + .. _Target-independent algorithms: .. _code generation algorithm: