public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Jin Ma <jinma@linux.alibaba.com>
To: binutils@sourceware.org, nelson@rivosinc.com
Cc: christoph.muellner@vrull.eu, lifang_xia@linux.alibaba.com,
	jinma.contrib@gmail.com, Jin Ma <jinma@linux.alibaba.com>
Subject: [PATCH 08/12] RISC-V: Add fixed-point arithmetic instructions for T-Head VECTOR vendor extension
Date: Fri, 10 Nov 2023 15:31:56 +0800	[thread overview]
Message-ID: <20231110073156.1961-1-jinma@linux.alibaba.com> (raw)
In-Reply-To: <20231110071759.1640-1-jinma@linux.alibaba.com>

T-Head has a range of vendor-specific instructions. Therefore
it makes sense to group them into smaller chunks in form of
vendor extensions.

This patch adds fixed-point arithmetic instructions for the
"XTheadVector" extension. The 'th' prefix and the
"XTheadVector" extension are documented in a PR for the
RISC-V toolchain conventions ([1]).

[1] https://github.com/riscv-non-isa/riscv-toolchain-conventions/pull/19

Co-developed-by: Lifang Xia <lifang_xia@linux.alibaba.com>
Co-developed-by: Christoph Müllner <christoph.muellner@vrull.eu>

gas/ChangeLog:

	* testsuite/gas/riscv/x-thead-vector.d: Add tests for
	fixed-point arithmetic instructions.
	* testsuite/gas/riscv/x-thead-vector.s: Likewise.

include/ChangeLog:

	* opcode/riscv-opc.h (MATCH_TH_VSADDUVV): New.

opcodes/ChangeLog:

	* riscv-opc.c: Likewise.
---
 gas/testsuite/gas/riscv/x-thead-vector.d | 86 ++++++++++++++++++++++
 gas/testsuite/gas/riscv/x-thead-vector.s | 92 ++++++++++++++++++++++++
 include/opcode/riscv-opc.h               | 72 +++++++++++++++++++
 opcodes/riscv-opc.c                      | 36 ++++++++++
 4 files changed, 286 insertions(+)

diff --git a/gas/testsuite/gas/riscv/x-thead-vector.d b/gas/testsuite/gas/riscv/x-thead-vector.d
index e3a1579300b..9a199177f37 100644
--- a/gas/testsuite/gas/riscv/x-thead-vector.d
+++ b/gas/testsuite/gas/riscv/x-thead-vector.d
@@ -464,3 +464,89 @@ Disassembly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+v4,v8,v12,v0.t
+[ 	]+[0-9a-f]+:[ 	]+bc85c257[ 	]+th.vnclip.vx[ 	]+v4,v8,a1,v0.t
+[ 	]+[0-9a-f]+:[ 	]+bc80b257[ 	]+th.vnclip.vi[ 	]+v4,v8,1,v0.t
+[ 	]+[0-9a-f]+:[ 	]+bc8fb257[ 	]+th.vnclip.vi[ 	]+v4,v8,31,v0.t
diff --git a/gas/testsuite/gas/riscv/x-thead-vector.s b/gas/testsuite/gas/riscv/x-thead-vector.s
index 55887e0ce41..b2fbb0c343f 100644
--- a/gas/testsuite/gas/riscv/x-thead-vector.s
+++ b/gas/testsuite/gas/riscv/x-thead-vector.s
@@ -472,3 +472,95 @@
 	th.vmv.v.x v8, a1
 	th.vmv.v.i v8, 15
 	th.vmv.v.i v8, -16
+
+	th.vsaddu.vv v4, v8, v12
+	th.vsaddu.vx v4, v8, a1
+	th.vsaddu.vi v4, v8, 15
+	th.vsaddu.vi v4, v8, -16
+	th.vsaddu.vv v4, v8, v12, v0.t
+	th.vsaddu.vx v4, v8, a1, v0.t
+	th.vsaddu.vi v4, v8, 15, v0.t
+	th.vsaddu.vi v4, v8, -16, v0.t
+	th.vsadd.vv v4, v8, v12
+	th.vsadd.vx v4, v8, a1
+	th.vsadd.vi v4, v8, 15
+	th.vsadd.vi v4, v8, -16
+	th.vsadd.vv v4, v8, v12, v0.t
+	th.vsadd.vx v4, v8, a1, v0.t
+	th.vsadd.vi v4, v8, 15, v0.t
+	th.vsadd.vi v4, v8, -16, v0.t
+	th.vssubu.vv v4, v8, v12
+	th.vssubu.vx v4, v8, a1
+	th.vssubu.vv v4, v8, v12, v0.t
+	th.vssubu.vx v4, v8, a1, v0.t
+	th.vssub.vv v4, v8, v12
+	th.vssub.vx v4, v8, a1
+	th.vssub.vv v4, v8, v12, v0.t
+	th.vssub.vx v4, v8, a1, v0.t
+
+	th.vaadd.vv v4, v8, v12
+	th.vaadd.vx v4, v8, a1
+	th.vaadd.vi v4, v8, 15
+	th.vaadd.vi v4, v8, -16
+	th.vaadd.vv v4, v8, v12, v0.t
+	th.vaadd.vx v4, v8, a1, v0.t
+	th.vaadd.vi v4, v8, 15, v0.t
+	th.vaadd.vi v4, v8, -16, v0.t
+	th.vasub.vv v4, v8, v12
+	th.vasub.vx v4, v8, a1
+	th.vasub.vv v4, v8, v12, v0.t
+	th.vasub.vx v4, v8, a1, v0.t
+
+	th.vsmul.vv v4, v8, v12
+	th.vsmul.vx v4, v8, a1
+	th.vsmul.vv v4, v8, v12, v0.t
+	th.vsmul.vx v4, v8, a1, v0.t
+
+	th.vwsmaccu.vv v4, v12, v8
+	th.vwsmaccu.vx v4, a1, v8
+	th.vwsmacc.vv v4, v12, v8
+	th.vwsmacc.vx v4, a1, v8
+	th.vwsmaccsu.vv v4, v12, v8
+	th.vwsmaccsu.vx v4, a1, v8
+	th.vwsmaccus.vx v4, a1, v8
+	th.vwsmaccu.vv v4, v12, v8, v0.t
+	th.vwsmaccu.vx v4, a1, v8, v0.t
+	th.vwsmacc.vv v4, v12, v8, v0.t
+	th.vwsmacc.vx v4, a1, v8, v0.t
+	th.vwsmaccsu.vv v4, v12, v8, v0.t
+	th.vwsmaccsu.vx v4, a1, v8, v0.t
+	th.vwsmaccus.vx v4, a1, v8, v0.t
+
+	th.vssrl.vv v4, v8, v12
+	th.vssrl.vx v4, v8, a1
+	th.vssrl.vi v4, v8, 1
+	th.vssrl.vi v4, v8, 31
+	th.vssrl.vv v4, v8, v12, v0.t
+	th.vssrl.vx v4, v8, a1, v0.t
+	th.vssrl.vi v4, v8, 1, v0.t
+	th.vssrl.vi v4, v8, 31, v0.t
+	th.vssra.vv v4, v8, v12
+	th.vssra.vx v4, v8, a1
+	th.vssra.vi v4, v8, 1
+	th.vssra.vi v4, v8, 31
+	th.vssra.vv v4, v8, v12, v0.t
+	th.vssra.vx v4, v8, a1, v0.t
+	th.vssra.vi v4, v8, 1, v0.t
+	th.vssra.vi v4, v8, 31, v0.t
+
+	th.vnclipu.vv v4, v8, v12
+	th.vnclipu.vx v4, v8, a1
+	th.vnclipu.vi v4, v8, 1
+	th.vnclipu.vi v4, v8, 31
+	th.vnclipu.vv v4, v8, v12, v0.t
+	th.vnclipu.vx v4, v8, a1, v0.t
+	th.vnclipu.vi v4, v8, 1, v0.t
+	th.vnclipu.vi v4, v8, 31, v0.t
+	th.vnclip.vv v4, v8, v12
+	th.vnclip.vx v4, v8, a1
+	th.vnclip.vi v4, v8, 1
+	th.vnclip.vi v4, v8, 31
+	th.vnclip.vv v4, v8, v12, v0.t
+	th.vnclip.vx v4, v8, a1, v0.t
+	th.vnclip.vi v4, v8, 1, v0.t
+	th.vnclip.vi v4, v8, 31, v0.t
diff --git a/include/opcode/riscv-opc.h b/include/opcode/riscv-opc.h
index 553f3142ed8..059b2fa68bb 100644
--- a/include/opcode/riscv-opc.h
+++ b/include/opcode/riscv-opc.h
@@ -3599,6 +3599,78 @@
 #define MASK_TH_VMVVX     0xfff0707f
 #define MATCH_TH_VMVVI    0x5e003057
 #define MASK_TH_VMVVI     0xfff0707f
+#define MATCH_TH_VSADDUVV 0x80000057
+#define MASK_TH_VSADDUVV  0xfc00707f
+#define MATCH_TH_VSADDUVX 0x80004057
+#define MASK_TH_VSADDUVX  0xfc00707f
+#define MATCH_TH_VSADDUVI 0x80003057
+#define MASK_TH_VSADDUVI  0xfc00707f
+#define MATCH_TH_VSADDVV  0x84000057
+#define MASK_TH_VSADDVV   0xfc00707f
+#define MATCH_TH_VSADDVX  0x84004057
+#define MASK_TH_VSADDVX   0xfc00707f
+#define MATCH_TH_VSADDVI  0x84003057
+#define MASK_TH_VSADDVI   0xfc00707f
+#define MATCH_TH_VSSUBUVV 0x88000057
+#define MASK_TH_VSSUBUVV  0xfc00707f
+#define MATCH_TH_VSSUBUVX 0x88004057
+#define MASK_TH_VSSUBUVX  0xfc00707f
+#define MATCH_TH_VSSUBVV  0x8c000057
+#define MASK_TH_VSSUBVV   0xfc00707f
+#define MATCH_TH_VSSUBVX  0x8c004057
+#define MASK_TH_VSSUBVX   0xfc00707f
+#define MATCH_TH_VAADDVV  0x90000057
+#define MASK_TH_VAADDVV   0xfc00707f
+#define MATCH_TH_VAADDVX  0x90004057
+#define MASK_TH_VAADDVX   0xfc00707f
+#define MATCH_TH_VAADDVI  0x90003057
+#define MASK_TH_VAADDVI   0xfc00707f
+#define MATCH_TH_VASUBVV  0x98000057
+#define MASK_TH_VASUBVV   0xfc00707f
+#define MATCH_TH_VASUBVX  0x98004057
+#define MASK_TH_VASUBVX   0xfc00707f
+#define MATCH_TH_VSMULVV  0x9c000057
+#define MASK_TH_VSMULVV   0xfc00707f
+#define MATCH_TH_VSMULVX  0x9c004057
+#define MASK_TH_VSMULVX   0xfc00707f
+#define MATCH_TH_VWSMACCUVV 0xf0000057
+#define MASK_TH_VWSMACCUVV  0xfc00707f
+#define MATCH_TH_VWSMACCUVX 0xf0004057
+#define MASK_TH_VWSMACCUVX  0xfc00707f
+#define MATCH_TH_VWSMACCVV  0xf4000057
+#define MASK_TH_VWSMACCVV   0xfc00707f
+#define MATCH_TH_VWSMACCVX  0xf4004057
+#define MASK_TH_VWSMACCVX   0xfc00707f
+#define MATCH_TH_VWSMACCSUVV 0xf8000057
+#define MASK_TH_VWSMACCSUVV  0xfc00707f
+#define MATCH_TH_VWSMACCSUVX 0xf8004057
+#define MASK_TH_VWSMACCSUVX  0xfc00707f
+#define MATCH_TH_VWSMACCUSVX 0xfc004057
+#define MASK_TH_VWSMACCUSVX  0xfc00707f
+#define MATCH_TH_VSSRLVV   0xa8000057
+#define MASK_TH_VSSRLVV    0xfc00707f
+#define MATCH_TH_VSSRLVX   0xa8004057
+#define MASK_TH_VSSRLVX    0xfc00707f
+#define MATCH_TH_VSSRLVI   0xa8003057
+#define MASK_TH_VSSRLVI    0xfc00707f
+#define MATCH_TH_VSSRAVV   0xac000057
+#define MASK_TH_VSSRAVV    0xfc00707f
+#define MATCH_TH_VSSRAVX   0xac004057
+#define MASK_TH_VSSRAVX    0xfc00707f
+#define MATCH_TH_VSSRAVI   0xac003057
+#define MASK_TH_VSSRAVI    0xfc00707f
+#define MATCH_TH_VNCLIPUVV 0xb8000057
+#define MASK_TH_VNCLIPUVV  0xfc00707f
+#define MATCH_TH_VNCLIPUVX 0xb8004057
+#define MASK_TH_VNCLIPUVX  0xfc00707f
+#define MATCH_TH_VNCLIPUVI 0xb8003057
+#define MASK_TH_VNCLIPUVI  0xfc00707f
+#define MATCH_TH_VNCLIPVV  0xbc000057
+#define MASK_TH_VNCLIPVV   0xfc00707f
+#define MATCH_TH_VNCLIPVX  0xbc004057
+#define MASK_TH_VNCLIPVX   0xfc00707f
+#define MATCH_TH_VNCLIPVI  0xbc003057
+#define MASK_TH_VNCLIPVI   0xfc00707f
 /* Vendor-specific (Ventana Microsystems) XVentanaCondOps instructions */
 #define MATCH_VT_MASKC 0x607b
 #define MASK_VT_MASKC 0xfe00707f
diff --git a/opcodes/riscv-opc.c b/opcodes/riscv-opc.c
index bd7b866358f..c7d6d171902 100644
--- a/opcodes/riscv-opc.c
+++ b/opcodes/riscv-opc.c
@@ -2722,6 +2722,42 @@ const struct riscv_opcode riscv_opcodes[] =
 {"th.vmv.v.v",    0, INSN_CLASS_XTHEADVECTOR,  "Vd,Vs", MATCH_TH_VMVVV, MASK_TH_VMVVV, match_opcode, 0 },
 {"th.vmv.v.x",    0, INSN_CLASS_XTHEADVECTOR,  "Vd,s", MATCH_TH_VMVVX, MASK_TH_VMVVX, match_opcode, 0 },
 {"th.vmv.v.i",    0, INSN_CLASS_XTHEADVECTOR,  "Vd,Vi", MATCH_TH_VMVVI, MASK_TH_VMVVI, match_opcode, 0 },
+{"th.vsaddu.vv",  0, INSN_CLASS_XTHEADVECTOR,  "Vd,Vt,VsVm", MATCH_TH_VSADDUVV, MASK_TH_VSADDUVV, match_opcode, 0 },
+{"th.vsaddu.vx",  0, INSN_CLASS_XTHEADVECTOR,  "Vd,Vt,sVm", MATCH_TH_VSADDUVX, MASK_TH_VSADDUVX, match_opcode, 0 },
+{"th.vsaddu.vi",  0, INSN_CLASS_XTHEADVECTOR,  "Vd,Vt,ViVm", MATCH_TH_VSADDUVI, MASK_TH_VSADDUVI, match_opcode, 0 },
+{"th.vsadd.vv",   0, INSN_CLASS_XTHEADVECTOR,  "Vd,Vt,VsVm", MATCH_TH_VSADDVV, MASK_TH_VSADDVV, match_opcode, 0 },
+{"th.vsadd.vx",   0, INSN_CLASS_XTHEADVECTOR,  "Vd,Vt,sVm", MATCH_TH_VSADDVX, MASK_TH_VSADDVX, match_opcode, 0 },
+{"th.vsadd.vi",   0, INSN_CLASS_XTHEADVECTOR,  "Vd,Vt,ViVm", MATCH_TH_VSADDVI, MASK_TH_VSADDVI, match_opcode, 0 },
+{"th.vssubu.vv",  0, INSN_CLASS_XTHEADVECTOR,  "Vd,Vt,VsVm", MATCH_TH_VSSUBUVV, MASK_TH_VSSUBUVV, match_opcode, 0 },
+{"th.vssubu.vx",  0, INSN_CLASS_XTHEADVECTOR,  "Vd,Vt,sVm", MATCH_TH_VSSUBUVX, MASK_TH_VSSUBUVX, match_opcode, 0 },
+{"th.vssub.vv",   0, INSN_CLASS_XTHEADVECTOR,  "Vd,Vt,VsVm", MATCH_TH_VSSUBVV, MASK_TH_VSSUBVV, match_opcode, 0 },
+{"th.vssub.vx",   0, INSN_CLASS_XTHEADVECTOR,  "Vd,Vt,sVm", MATCH_TH_VSSUBVX, MASK_TH_VSSUBVX, match_opcode, 0 },
+{"th.vaadd.vv",   0, INSN_CLASS_XTHEADVECTOR,  "Vd,Vt,VsVm", MATCH_TH_VAADDVV, MASK_TH_VAADDVV, match_opcode, 0 },
+{"th.vaadd.vx",   0, INSN_CLASS_XTHEADVECTOR,  "Vd,Vt,sVm", MATCH_TH_VAADDVX, MASK_TH_VAADDVX, match_opcode, 0 },
+{"th.vaadd.vi",   0, INSN_CLASS_XTHEADVECTOR,  "Vd,Vt,ViVm", MATCH_TH_VAADDVI, MASK_TH_VAADDVI, match_opcode, 0 },
+{"th.vasub.vv",   0, INSN_CLASS_XTHEADVECTOR,  "Vd,Vt,VsVm", MATCH_TH_VASUBVV, MASK_TH_VASUBVV, match_opcode, 0 },
+{"th.vasub.vx",   0, INSN_CLASS_XTHEADVECTOR,  "Vd,Vt,sVm", MATCH_TH_VASUBVX, MASK_TH_VASUBVX, match_opcode, 0 },
+{"th.vsmul.vv",   0, INSN_CLASS_XTHEADVECTOR,  "Vd,Vt,VsVm", MATCH_TH_VSMULVV, MASK_TH_VSMULVV, match_opcode, 0 },
+{"th.vsmul.vx",   0, INSN_CLASS_XTHEADVECTOR,  "Vd,Vt,sVm", MATCH_TH_VSMULVX, MASK_TH_VSMULVX, match_opcode, 0 },
+{"th.vwsmaccu.vv", 0, INSN_CLASS_XTHEADVECTOR,  "Vd,Vs,VtVm", MATCH_TH_VWSMACCUVV, MASK_TH_VWSMACCUVV, match_opcode, 0 },
+{"th.vwsmaccu.vx", 0, INSN_CLASS_XTHEADVECTOR,  "Vd,s,VtVm", MATCH_TH_VWSMACCUVX, MASK_TH_VWSMACCUVX, match_opcode, 0 },
+{"th.vwsmacc.vv",  0, INSN_CLASS_XTHEADVECTOR,  "Vd,Vs,VtVm", MATCH_TH_VWSMACCVV, MASK_TH_VWSMACCVV, match_opcode, 0 },
+{"th.vwsmacc.vx",  0, INSN_CLASS_XTHEADVECTOR,  "Vd,s,VtVm", MATCH_TH_VWSMACCVX, MASK_TH_VWSMACCVX, match_opcode, 0 },
+{"th.vwsmaccsu.vv",0, INSN_CLASS_XTHEADVECTOR,  "Vd,Vs,VtVm", MATCH_TH_VWSMACCSUVV, MASK_TH_VWSMACCSUVV, match_opcode, 0 },
+{"th.vwsmaccsu.vx",0, INSN_CLASS_XTHEADVECTOR,  "Vd,s,VtVm", MATCH_TH_VWSMACCSUVX, MASK_TH_VWSMACCSUVX, match_opcode, 0 },
+{"th.vwsmaccus.vx",0, INSN_CLASS_XTHEADVECTOR,  "Vd,s,VtVm", MATCH_TH_VWSMACCUSVX, MASK_TH_VWSMACCUSVX, match_opcode, 0 },
+{"th.vssrl.vv",    0, INSN_CLASS_XTHEADVECTOR,  "Vd,Vt,VsVm", MATCH_TH_VSSRLVV, MASK_TH_VSSRLVV, match_opcode, 0 },
+{"th.vssrl.vx",    0, INSN_CLASS_XTHEADVECTOR,  "Vd,Vt,sVm", MATCH_TH_VSSRLVX, MASK_TH_VSSRLVX, match_opcode, 0 },
+{"th.vssrl.vi",    0, INSN_CLASS_XTHEADVECTOR,  "Vd,Vt,VjVm", MATCH_TH_VSSRLVI, MASK_TH_VSSRLVI, match_opcode, 0 },
+{"th.vssra.vv",    0, INSN_CLASS_XTHEADVECTOR,  "Vd,Vt,VsVm", MATCH_TH_VSSRAVV, MASK_TH_VSSRAVV, match_opcode, 0 },
+{"th.vssra.vx",    0, INSN_CLASS_XTHEADVECTOR,  "Vd,Vt,sVm", MATCH_TH_VSSRAVX, MASK_TH_VSSRAVX, match_opcode, 0 },
+{"th.vssra.vi",    0, INSN_CLASS_XTHEADVECTOR,  "Vd,Vt,VjVm", MATCH_TH_VSSRAVI, MASK_TH_VSSRAVI, match_opcode, 0 },
+{"th.vnclipu.vv",   0, INSN_CLASS_XTHEADVECTOR,  "Vd,Vt,VsVm", MATCH_TH_VNCLIPUVV, MASK_TH_VNCLIPUVV, match_opcode, 0 },
+{"th.vnclipu.vx",   0, INSN_CLASS_XTHEADVECTOR,  "Vd,Vt,sVm", MATCH_TH_VNCLIPUVX, MASK_TH_VNCLIPUVX, match_opcode, 0 },
+{"th.vnclipu.vi",   0, INSN_CLASS_XTHEADVECTOR,  "Vd,Vt,VjVm", MATCH_TH_VNCLIPUVI, MASK_TH_VNCLIPUVI, match_opcode, 0 },
+{"th.vnclip.vv",   0, INSN_CLASS_XTHEADVECTOR,  "Vd,Vt,VsVm", MATCH_TH_VNCLIPVV, MASK_TH_VNCLIPVV, match_opcode, 0 },
+{"th.vnclip.vx",   0, INSN_CLASS_XTHEADVECTOR,  "Vd,Vt,sVm", MATCH_TH_VNCLIPVX, MASK_TH_VNCLIPVX, match_opcode, 0 },
+{"th.vnclip.vi",   0, INSN_CLASS_XTHEADVECTOR,  "Vd,Vt,VjVm", MATCH_TH_VNCLIPVI, MASK_TH_VNCLIPVI, match_opcode, 0 },
 
 /* Vendor-specific (Ventana Microsystems) XVentanaCondOps instructions */
 {"vt.maskc",   64, INSN_CLASS_XVENTANACONDOPS, "d,s,t", MATCH_VT_MASKC, MASK_VT_MASKC, match_opcode, 0 },
-- 
2.17.1


  parent reply	other threads:[~2023-11-10  7:32 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-10  7:17 [PATCH 01/12] RISC-V: Add " Jin Ma
2023-11-10  7:20 ` [PATCH 02/12] RISC-V: Add CSRs for " Jin Ma
2023-11-10  7:22 ` [PATCH 03/12] RISC-V: Add configuration-setting instructions " Jin Ma
2023-11-17  3:18   ` Nelson Chu
2023-11-17  9:53     ` Jin Ma
2023-11-10  7:23 ` [PATCH 04/12] RISC-V: Add load/store " Jin Ma
2023-11-10  7:24 ` [PATCH 05/12] RISC-V: Add the sub-extension "XTheadZvlsseg" " Jin Ma
2023-11-10  7:25 ` [PATCH 06/12] RISC-V: Add sub-extension XTheadZvamo " Jin Ma
2023-11-10  7:31 ` [PATCH 07/12] RISC-V: Add integer arithmetic instructions " Jin Ma
2023-11-10  7:31 ` Jin Ma [this message]
2023-11-10  7:32 ` [PATCH 09/12] RISC-V: Add floating-point " Jin Ma
2023-11-10  7:33 ` [PATCH 10/12] RISC-V: Add reductions " Jin Ma
2023-11-10  7:34 ` [PATCH 11/12] RISC-V: Add vector mask " Jin Ma
2023-11-10  7:35 ` [PATCH 12/12] RISC-V: Add vector permutation " Jin Ma

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231110073156.1961-1-jinma@linux.alibaba.com \
    --to=jinma@linux.alibaba.com \
    --cc=binutils@sourceware.org \
    --cc=christoph.muellner@vrull.eu \
    --cc=jinma.contrib@gmail.com \
    --cc=lifang_xia@linux.alibaba.com \
    --cc=nelson@rivosinc.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).