[llvm] 070ab2b - [LangRef][LoongArch] Update inline asm constraint code and operand modifier

Xiaodong Liu via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 10 22:26:27 PST 2022


Author: Xiaodong Liu
Date: 2022-11-11T14:25:29+08:00
New Revision: 070ab2bb0b5093e9a462d2a62885a4e5a14fad7d

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

LOG: [LangRef][LoongArch] Update inline asm constraint code and operand modifier

According to:
https://reviews.llvm.org/D134157
https://reviews.llvm.org/D136841
https://reviews.llvm.org/D136835

Reviewed By: SixWeining

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

Added: 
    

Modified: 
    llvm/docs/LangRef.rst

Removed: 
    


################################################################################
diff  --git a/llvm/docs/LangRef.rst b/llvm/docs/LangRef.rst
index 0006dab9b2d29..e254308f08d5e 100644
--- a/llvm/docs/LangRef.rst
+++ b/llvm/docs/LangRef.rst
@@ -4878,13 +4878,30 @@ ARM's Thumb1 mode:
 - ``x``: A 32, 64, or 128-bit floating-point/SIMD register in the ranges
   ``s0-s15``, ``d0-d7``, or ``q0-q3``, respectively.
 
-
 Hexagon:
 
 - ``o``, ``v``: A memory address operand, treated the same as constraint ``m``,
   at the moment.
 - ``r``: A 32 or 64-bit register.
 
+LoongArch:
+
+- ``f``: A floating-point register (if available).
+- ``k``: A memory operand whose address is formed by a base register and
+  (optionally scaled) index register.
+- ``l``: A signed 16-bit constant.
+- ``m``: A memory operand whose address is formed by a base register and
+  offset that is suitable for use in instructions with the same addressing
+  mode as st.w and ld.w.
+- ``I``: A signed 12-bit constant (for arithmetic instructions).
+- ``J``: An immediate integer zero.
+- ``K``: An unsigned 12-bit constant (for logic instructions).
+- ``ZB``: An address that is held in a general-purpose register. The offset
+  is zero.
+- ``ZC``: A memory operand whose address is formed by a base register and
+  offset that is suitable for use in instructions with the same addressing
+  mode as ll.w and sc.w.
+
 MSP430:
 
 - ``r``: An 8 or 16-bit register.
@@ -5109,6 +5126,10 @@ Hexagon:
 - ``I``: Print the letter 'i' if the operand is an integer constant, otherwise
   nothing. Used to print 'addi' vs 'add' instructions.
 
+LoongArch:
+
+- ``z``: Print $zero register if operand is zero, otherwise print it normally.
+
 MSP430:
 
 No additional modifiers.


        


More information about the llvm-commits mailing list