[llvm] [RISCV][docs] GP Relaxation and Small Data Limit (PR #108592)

Sam Elliott via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 16 10:46:17 PDT 2024


================
@@ -431,3 +431,29 @@ line.  This currently applies to the following extensions:
 * ``Zvksg``
 * ``Zvksh``
 * ``Zvkt``
+
+Global Pointer (GP) Relaxation and the Small Data Limit
+=======================================================
+
+Some of the RISC-V psABI variants reserve ``gp`` (``x3``) for use as a "Global Pointer", to make generating data addresses more efficient.
+
+To use this functionality, you need to be doing all of the following:
+* Use the ``medlow`` (aka ``small``) code model;
----------------
lenary wrote:

I'm keen we just document LLVM here (LLD and Clang).

https://github.com/llvm/llvm-project/pull/108592


More information about the llvm-commits mailing list