CompilerWriterInfo.rst 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. ========================================================
  2. Architecture & Platform Information for Compiler Writers
  3. ========================================================
  4. .. contents::
  5. :local:
  6. .. note::
  7. This document is a work-in-progress. Additions and clarifications are
  8. welcome.
  9. Hardware
  10. ========
  11. AArch64 & ARM
  12. -------------
  13. * `ARMv8-A Architecture Reference Manual <https://developer.arm.com/docs/ddi0487/latest>`_ This document covers both AArch64 and ARM instructions
  14. * `ARMv7-A Architecture Reference Manual <https://developer.arm.com/docs/ddi0406/latest>`_ This has some useful info on what is supported by older architecture versions.
  15. * `ARMv7-M Architecture Reference Manual <https://developer.arm.com/docs/ddi0403/latest>`_ This covers the Thumb2-only microcontrollers
  16. * `ARMv6-M Architecture Reference Manual <https://developer.arm.com/docs/ddi0419/latest>`_ This covers the Thumb1-only microcontrollers
  17. * `ARM C Language Extensions <http://infocenter.arm.com/help/topic/com.arm.doc.ihi0053c/IHI0053C_acle_2_0.pdf>`_
  18. * `ARM NEON Intrinsics Reference <http://infocenter.arm.com/help/topic/com.arm.doc.ihi0073b/IHI0073B_arm_neon_intrinsics_ref.pdf>`_
  19. * AArch32 `ABI Addenda and Errata <http://infocenter.arm.com/help/topic/com.arm.doc.ihi0045d/IHI0045D_ABI_addenda.pdf>`_
  20. * `Cortex-A57 Software Optimization Guide <http://infocenter.arm.com/help/topic/com.arm.doc.uan0015b/Cortex_A57_Software_Optimization_Guide_external.pdf>`_
  21. * `Run-time ABI for the ARM Architecture <http://infocenter.arm.com/help/topic/com.arm.doc.ihi0043d/IHI0043D_rtabi.pdf>`_ This documents the __aeabi_* helper functions.
  22. Itanium (ia64)
  23. --------------
  24. * `Itanium documentation <http://developer.intel.com/design/itanium2/documentation.htm>`_
  25. Lanai
  26. -----
  27. * `Lanai Instruction Set Architecture <http://g.co/lanai/isa>`_
  28. MIPS
  29. ----
  30. * `MIPS Processor Architecture <https://www.mips.com/products/>`_
  31. * `MIPS 64-bit ELF Object File Specification <http://techpubs.sgi.com/library/manuals/4000/007-4658-001/pdf/007-4658-001.pdf>`_
  32. PowerPC
  33. -------
  34. IBM - Official manuals and docs
  35. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  36. * `Power Instruction Set Architecture, Version 3.0B <https://openpowerfoundation.org/?resource_lib=power-isa-version-3-0>`_
  37. * `POWER9 Processor User's Manual <https://openpowerfoundation.org/?resource_lib=power9-processor-users-manual>`_
  38. * `Power Instruction Set Architecture, Version 2.07B <https://openpowerfoundation.org/?resource_lib=ibm-power-isa-version-2-07-b>`_
  39. * `POWER8 Processor User's Manual <https://openpowerfoundation.org/?resource_lib=power8-processor-users-manual>`_
  40. * `Power Instruction Set Architecture, Versions 2.03 through 2.06 (Internet Archive) <https://web.archive.org/web/20121124005736/https://www.power.org/technology-introduction/standards-specifications>`_
  41. * `IBM AIX 7.2 POWER Assembly Reference <https://www.ibm.com/support/knowledgecenter/en/ssw_aix_72/assembler/alangref_kickoff.html>`_
  42. * `IBM AIX/5L for POWER Assembly Reference <http://publibn.boulder.ibm.com/doc_link/en_US/a_doc_lib/aixassem/alangref/alangreftfrm.htm>`_
  43. Other documents, collections, notes
  44. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  45. * `PowerPC Compiler Writer's Guide <http://www.ibm.com/chips/techlib/techlib.nsf/techdocs/852569B20050FF7785256996007558C6>`_
  46. * `Intro to PowerPC Architecture <http://www.ibm.com/developerworks/linux/library/l-powarch/>`_
  47. * `PowerPC Processor Manuals (embedded) <http://www.ibm.com/chips/techlib/techlib.nsf/products/PowerPC>`_
  48. * `Various IBM specifications and white papers <https://www.power.org/documentation/?document_company=105&document_category=all&publish_year=all&grid_order=DESC&grid_sort=title>`_
  49. * `PowerPC ABI documents <http://penguinppc.org/dev/#library>`_
  50. * `PowerPC64 alignment of long doubles (from GCC) <http://gcc.gnu.org/ml/gcc-patches/2003-09/msg00997.html>`_
  51. * `Long branch stubs for powerpc64-linux (from binutils) <http://sources.redhat.com/ml/binutils/2002-04/msg00573.html>`_
  52. AMDGPU
  53. ------
  54. Refer to :doc:`AMDGPUUsage` for additional documentation.
  55. RISC-V
  56. ------
  57. * `RISC-V User-Level ISA Specification <https://riscv.org/specifications/>`_
  58. SPARC
  59. -----
  60. * `SPARC standards <http://sparc.org/standards>`_
  61. * `SPARC V9 ABI <http://sparc.org/standards/64.psabi.1.35.ps.Z>`_
  62. * `SPARC V8 ABI <http://sparc.org/standards/psABI3rd.pdf>`_
  63. SystemZ
  64. -------
  65. * `z/Architecture Principles of Operation (registration required, free sign-up) <http://www-01.ibm.com/support/docview.wss?uid=isg2b9de5f05a9d57819852571c500428f9a>`_
  66. X86
  67. ---
  68. * `AMD processor manuals <http://developer.amd.com/resources/developer-guides-manuals/>`_
  69. * `Intel 64 and IA-32 manuals <http://www.intel.com/content/www/us/en/processors/architectures-software-developer-manuals.html>`_
  70. * `Intel Itanium documentation <http://www.intel.com/design/itanium/documentation.htm?iid=ipp_srvr_proc_itanium2+techdocs>`_
  71. * `X86 and X86-64 SysV psABI <https://github.com/hjl-tools/x86-psABI/wiki/X86-psABI>`_
  72. * `Calling conventions for different C++ compilers and operating systems <http://www.agner.org/optimize/calling_conventions.pdf>`_
  73. XCore
  74. -----
  75. * `The XMOS XS1 Architecture (ISA) <https://www.xmos.com/en/download/public/The-XMOS-XS1-Architecture%28X7879A%29.pdf>`_
  76. * `Tools Development Guide (includes ABI) <https://www.xmos.com/download/public/Tools-Development-Guide%28X9114A%29.pdf>`_
  77. Hexagon
  78. -------
  79. * `Hexagon Programmer's Reference Manuals and Hexagon ABI Specification (registration required, free sign-up) <https://developer.qualcomm.com/software/hexagon-dsp-sdk/tools>`_
  80. Other relevant lists
  81. --------------------
  82. * `GCC reading list <http://gcc.gnu.org/readings.html>`_
  83. ABI
  84. ===
  85. * `System V Application Binary Interface <http://www.sco.com/developers/gabi/latest/contents.html>`_
  86. * `Itanium C++ ABI <http://itanium-cxx-abi.github.io/cxx-abi/>`_ (This is used for all non-Windows targets.)
  87. Linux
  88. -----
  89. * `Linux extensions to gabi <https://github.com/hjl-tools/linux-abi/wiki/Linux-Extensions-to-gABI>`_
  90. * `64-Bit ELF V2 ABI Specification: Power Architecture <https://openpowerfoundation.org/?resource_lib=64-bit-elf-v2-abi-specification-power-architecture>`_
  91. * `OpenPOWER ELFv2 Errata: ELFv2 ABI Version 1.4 <https://openpowerfoundation.org/?resource_lib=openpower-elfv2-errata-elfv2-abi-version-1-4>`_
  92. * `PowerPC 64-bit ELF ABI Supplement <http://www.linuxbase.org/spec/ELF/ppc64/>`_
  93. * `Procedure Call Standard for the AArch64 Architecture <http://infocenter.arm.com/help/topic/com.arm.doc.ihi0055a/IHI0055A_aapcs64.pdf>`_
  94. * `Procedure Call Standard for the ARM Architecture <https://developer.arm.com/docs/ihi0042/latest>`_
  95. * `ELF for the ARM Architecture <http://infocenter.arm.com/help/topic/com.arm.doc.ihi0044e/IHI0044E_aaelf.pdf>`_
  96. * `ELF for the ARM 64-bit Architecture (AArch64) <http://infocenter.arm.com/help/topic/com.arm.doc.ihi0056a/IHI0056A_aaelf64.pdf>`_
  97. * `System z ELF ABI Supplement <http://legacy.redhat.com/pub/redhat/linux/7.1/es/os/s390x/doc/lzsabi0.pdf>`_
  98. macOS
  99. -----
  100. * `Mach-O Runtime Architecture <http://developer.apple.com/documentation/Darwin/RuntimeArchitecture-date.html>`_
  101. * `Notes on Mach-O ABI <http://www.unsanity.org/archives/000044.php>`_
  102. * `ARM64 Function Calling Conventions <https://developer.apple.com/library/archive/documentation/Xcode/Conceptual/iPhoneOSABIReference/Articles/ARM64FunctionCallingConventions.html>`_
  103. Windows
  104. -------
  105. * `Microsoft PE/COFF Specification <http://www.microsoft.com/whdc/system/platform/firmware/pecoff.mspx>`_
  106. * `ARM64 exception handling <https://docs.microsoft.com/en-us/cpp/build/arm64-exception-handling>`_
  107. * `ARM exception handling <https://docs.microsoft.com/en-us/cpp/build/arm-exception-handling>`_
  108. * `Overview of ARM64 ABI conventions <https://docs.microsoft.com/en-us/cpp/build/arm64-windows-abi-conventions>`_
  109. * `Overview of ARM32 ABI Conventions <https://docs.microsoft.com/en-us/cpp/build/overview-of-arm-abi-conventions>`_
  110. NVPTX
  111. =====
  112. * `CUDA Documentation <http://docs.nvidia.com/cuda/index.html>`_ includes the PTX
  113. ISA and Driver API documentation
  114. Miscellaneous Resources
  115. =======================
  116. * `Executable File Format library <http://www.nondot.org/sabre/os/articles/ExecutableFileFormats/>`_
  117. * `GCC prefetch project <http://gcc.gnu.org/projects/prefetch.html>`_ page has a
  118. good survey of the prefetching capabilities of a variety of modern
  119. processors.