From 070ab2bb0b5093e9a462d2a62885a4e5a14fad7d Mon Sep 17 00:00:00 2001 From: Xiaodong Liu Date: Fri, 11 Nov 2022 14:24:54 +0800 Subject: [PATCH] [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 --- llvm/docs/LangRef.rst | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/llvm/docs/LangRef.rst b/llvm/docs/LangRef.rst index 0006dab..e254308 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. -- 2.7.4