qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 04/30] tcg/loongarch: Add generated instruction opcodes and e


From: WANG Xuerui
Subject: Re: [PATCH 04/30] tcg/loongarch: Add generated instruction opcodes and encoding helpers
Date: Tue, 21 Sep 2021 00:24:52 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:94.0) Gecko/20100101 Thunderbird/94.0a1

Hi Richard,

On 9/20/21 23:55, Richard Henderson wrote:
On 9/20/21 1:04 AM, WANG Xuerui wrote:
Signed-off-by: WANG Xuerui<git@xen0n.name>
---
  tcg/loongarch/tcg-insn-defs.c.inc | 1080 +++++++++++++++++++++++++++++
  1 file changed, 1080 insertions(+)
  create mode 100644 tcg/loongarch/tcg-insn-defs.c.inc

diff --git a/tcg/loongarch/tcg-insn-defs.c.inc b/tcg/loongarch/tcg-insn-defs.c.inc
new file mode 100644
index 0000000000..413f7ffc12
--- /dev/null
+++ b/tcg/loongarch/tcg-insn-defs.c.inc
@@ -0,0 +1,1080 @@
+/* SPDX-License-Identifier: MIT */
+/*
+ * LoongArch instruction formats, opcodes, and encoders for TCG use.
+ *
+ * Code generated by genqemutcgdefs from
+ *https://github.com/loongson-community/loongarch-opcodes,
+ * from commit bb5234081663faaefb6b921a7848b18e19519890.
+ * DO NOT EDIT.
+ */
+

Acked-by: Richard Henderson <richard.henderson@linaro.org>


+static int32_t encode_d_slot(LoongArchInsn opc, uint32_t d)
+    __attribute__((unused));
+
+static int32_t encode_d_slot(LoongArchInsn opc, uint32_t d)

Just an FYI: you can add the attribute directly to the function definition like so

static int32_t __attribute__((unused))
encode_d_slot(LoongArchInsn opc, uint32_t d)
{
   ...
}

Fine; I always struggle to remember the correct placement of attributes! I'll try to adjust that in loongarch-opcodes repo. If I can arrive at something that doesn't need prototypes and builds cleanly, I'll replace the code here and shave off maybe 100 lines (because currently we use 88 insns).

r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]