Skip to contentSkip to conversation

Add RX archtecture support

PATCH Superseded Yoshinori Sato 2 participants 33 messages Feb 12, 2020

v30 of 32 Superseded Latest is v32 →

lore
Share & tools
lore
#0 lore raw

v30 cover Add RX archtecture support

Hello.
This patch series is added Renesas RX target emulation.

Changes for v29.
Add target description XML. It required gdb-9.1.
Follow git master changes.

Changes for v28.
Allow -m option.
With this option, 16 Mbytes or more can be specified. Add example for qemu-doc.
Fix build error on latest master.

Changes for v27.
Added RX section to qemu-doc.
Rebase for master

Changes for v26.
Rebase for 5.0
Update machine.json for 5.0

Changes for v25.
Update commit message.
Squashed qapi/machine.json changes.

Changes for v24.
Add note for qapi/machine.json.
Added Acked-by for 6/22.
git rebase master.

Changes for v23.
Follow master changes.

Changes for v22.
Added some include.

Changes for v21.
rebase latest master.
Remove unneeded hmp_info_tlb.

Chanegs for v20.
Reorderd patches.
Squashed v19 changes.

Changes for v19.
Follow tcg changes.
Cleanup cpu.c.
simplify rx_cpu_class_by_name and rx_load_image move to rx-virt.

My git repository is bellow.
git://git.pf.osdn.net/gitroot/y/ys/ysato/qemu.git tags/rx-20200212

Testing binaries bellow.
u-boot
Download - https://osdn.net/users/ysato/pf/qemu/dl/u-boot.bin.gz

starting

$ gzip -d u-boot.bin.gz
$ qemu-system-rx -bios u-boot.bin

linux and pico-root (only sash)
Download - https://osdn.net/users/ysato/pf/qemu/dl/zImage (kernel)
https://osdn.net/users/ysato/pf/qemu/dl/rx-virt.dtb (DeviceTree)

starting

$ qemu-system-rx -kernel zImage -dtb rx-virt.dtb -append "earlycon"

Philippe Mathieu-Daudé (3):
hw/registerfields.h: Add 8bit and 16bit register macros hw/rx: Restrict the RX62N microcontroller to the RX62N CPU core
BootLinuxConsoleTest: Test the RX-Virt machine

Richard Henderson (7):
target/rx: Disassemble rx_index_addr into a string target/rx: Replace operand with prt_ldmi in disassembler target/rx: Use prt_ldmi for XCHG_mr disassembly target/rx: Emit all disassembly in one prt() target/rx: Collect all bytes during disassembly target/rx: Dump bytes for each insn during disassembly hw/rx: Honor -accel qtest

Yoshinori Sato (12):
MAINTAINERS: Add RX
qemu/bitops.h: Add extract8 and extract16 target/rx: TCG translation
target/rx: TCG helper
target/rx: CPU definition
target/rx: RX disassembler
hw/intc: RX62N interrupt controller (ICUa) hw/timer: RX62N internal timer modules hw/char: RX62N serial communication interface (SCI) hw/rx: RX Target hardware definition
Add rx-softmmu
qemu-doc.texi: Add RX section.

 qemu-doc.texi                          |   44 +
 configure                              |   11 +-
 default-configs/rx-softmmu.mak         |    3 +
 qapi/machine.json                      |    3 +-
 include/disas/dis-asm.h                |    5 +
 include/exec/poison.h                  |    1 +
 include/hw/char/renesas_sci.h          |   45 +
 include/hw/intc/rx_icu.h               |   56 +
 include/hw/registerfields.h            |   32 +-
 include/hw/rx/rx.h                     |    7 +
 include/hw/rx/rx62n.h                  |   91 +
 include/hw/timer/renesas_cmt.h         |   38 +
 include/hw/timer/renesas_tmr.h         |   53 +
 include/qemu/bitops.h                  |   38 +
 include/sysemu/arch_init.h             |    1 +
 target/rx/cpu-param.h                  |   31 +
 target/rx/cpu-qom.h                    |   42 +
 target/rx/cpu.h                        |  181 ++
 target/rx/helper.h                     |   31 +
 target/rx/insns.decode                 |  621 ++++++
 arch_init.c                            |    2 +
 hw/char/renesas_sci.c                  |  342 ++++
 hw/intc/rx_icu.c                       |  379 ++++
 hw/rx/rx-virt.c                        |  142 ++
 hw/rx/rx62n.c                          |  247 +++
 hw/timer/renesas_cmt.c                 |  278 +++
 hw/timer/renesas_tmr.c                 |  458 +++++
 target/rx/cpu.c                        |  218 +++
 target/rx/disas.c                      | 1446 ++++++++++++++
 target/rx/gdbstub.c                    |  112 ++
 target/rx/helper.c                     |  149 ++
 target/rx/op_helper.c                  |  470 +++++
 target/rx/translate.c                  | 2432 ++++++++++++++++++++++++
 tests/qtest/machine-none-test.c        |    1 +
 MAINTAINERS                            |   19 +
 gdb-xml/rx-core.xml                    |   70 +
 hw/Kconfig                             |    1 +
 hw/char/Kconfig                        |    3 +
 hw/char/Makefile.objs                  |    1 +
 hw/intc/Kconfig                        |    3 +
 hw/intc/Makefile.objs                  |    1 +
 hw/rx/Kconfig                          |   14 +
 hw/rx/Makefile.objs                    |    2 +
 hw/timer/Kconfig                       |    6 +
 hw/timer/Makefile.objs                 |    3 +
 target/rx/Makefile.objs                |   11 +
 tests/acceptance/boot_linux_console.py |   46 +
 47 files changed, 8187 insertions(+), 3 deletions(-)
 create mode 100644 default-configs/rx-softmmu.mak
 create mode 100644 include/hw/char/renesas_sci.h
 create mode 100644 include/hw/intc/rx_icu.h
 create mode 100644 include/hw/rx/rx.h
 create mode 100644 include/hw/rx/rx62n.h
 create mode 100644 include/hw/timer/renesas_cmt.h
 create mode 100644 include/hw/timer/renesas_tmr.h
 create mode 100644 target/rx/cpu-param.h
 create mode 100644 target/rx/cpu-qom.h
 create mode 100644 target/rx/cpu.h
 create mode 100644 target/rx/helper.h
 create mode 100644 target/rx/insns.decode
 create mode 100644 hw/char/renesas_sci.c
 create mode 100644 hw/intc/rx_icu.c
 create mode 100644 hw/rx/rx-virt.c
 create mode 100644 hw/rx/rx62n.c
 create mode 100644 hw/timer/renesas_cmt.c
 create mode 100644 hw/timer/renesas_tmr.c
 create mode 100644 target/rx/cpu.c
 create mode 100644 target/rx/disas.c
 create mode 100644 target/rx/gdbstub.c
 create mode 100644 target/rx/helper.c
 create mode 100644 target/rx/op_helper.c
 create mode 100644 target/rx/translate.c
 create mode 100644 gdb-xml/rx-core.xml
 create mode 100644 hw/rx/Kconfig
 create mode 100644 hw/rx/Makefile.objs
 create mode 100644 target/rx/Makefile.objs
Signature · 1 line
2.20.1
#1 lore raw

PATCH v30 1/22 MAINTAINERS: Add RX

Message-Id: <[email protected]>

---
 MAINTAINERS | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
MAINTAINERS +19 -0
index c7717df720..41498dbab5 100644
@@ -274,6 +274,13 @@ F: include/hw/riscv/
 F: linux-user/host/riscv32/
 F: linux-user/host/riscv64/
 
+RENESAS RX CPUs
+M: Yoshinori Sato <[email protected]>
+S: Maintained
+F: target/rx/
+F: hw/rx/
+F: include/hw/rx/
+
 S390 TCG CPUs
 M: Richard Henderson <[email protected]>
 M: David Hildenbrand <[email protected]>
@@ -1159,6 +1166,18 @@ F: pc-bios/canyonlands.dt[sb]
 F: pc-bios/u-boot-sam460ex-20100605.bin
 F: roms/u-boot-sam460ex
 
+RX Machines
+-----------
+rx-virt
+M: Yoshinori Sato <[email protected]>
+S: Maintained
+F: hw/rx/rxqemu.c
+F: hw/intc/rx_icu.c
+F: hw/timer/renesas_*.c
+F: hw/char/renesas_sci.c
+F: include/hw/timer/renesas_*.h
+F: include/hw/char/renesas_sci.h
+
 SH4 Machines
 ------------
 R2D
Signature · 1 line
2.20.1
#2 lore raw

PATCH v30 2/22 qemu/bitops.h: Add extract8 and extract16

In reply to Yoshinori Sato

Message-Id: <[email protected]>

---
 include/qemu/bitops.h | 38 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)
include/qemu/bitops.h +38 -0
index 02c1ce6a5d..f55ce8b320 100644
@@ -301,6 +301,44 @@ static inline uint32_t extract32(uint32_t value, int start, int length)
     return (value >> start) & (~0U >> (32 - length));
 }
 
+/**
+ * extract8:
+ * @value: the value to extract the bit field from
+ * @start: the lowest bit in the bit field (numbered from 0)
+ * @length: the length of the bit field
+ *
+ * Extract from the 8 bit input @value the bit field specified by the
+ * @start and @length parameters, and return it. The bit field must
+ * lie entirely within the 8 bit word. It is valid to request that
+ * all 8 bits are returned (ie @length 8 and @start 0).
+ *
+ * Returns: the value of the bit field extracted from the input value.
+ */
+static inline uint8_t extract8(uint8_t value, int start, int length)
+{
+    assert(start >= 0 && length > 0 && length <= 8 - start);
+    return extract32(value, start, length);
+}
+
+/**
+ * extract16:
+ * @value: the value to extract the bit field from
+ * @start: the lowest bit in the bit field (numbered from 0)
+ * @length: the length of the bit field
+ *
+ * Extract from the 16 bit input @value the bit field specified by the
+ * @start and @length parameters, and return it. The bit field must
+ * lie entirely within the 16 bit word. It is valid to request that
+ * all 16 bits are returned (ie @length 16 and @start 0).
+ *
+ * Returns: the value of the bit field extracted from the input value.
+ */
+static inline uint16_t extract16(uint16_t value, int start, int length)
+{
+    assert(start >= 0 && length > 0 && length <= 16 - start);
+    return extract32(value, start, length);
+}
+
 /**
  * extract64:
  * @value: the value to extract the bit field from
Signature · 1 line
2.20.1
#3 lore raw

PATCH v30 3/22 hw/registerfields.h: Add 8bit and 16bit register macros

In reply to Yoshinori Sato

From: Philippe Mathieu-Daudé <[email protected]>

Some RX peripheral using 8bit and 16bit registers. Added 8bit and 16bit APIs.

Message-Id: <[email protected]>

---
 include/hw/registerfields.h | 32 +++++++++++++++++++++++++++++++-
 1 file changed, 31 insertions(+), 1 deletion(-)
include/hw/registerfields.h +31 -1
index 2659a58737..a0bb0654d6 100644
@@ -22,6 +22,14 @@
     enum { A_ ## reg = (addr) };                                          \
     enum { R_ ## reg = (addr) / 4 };
 
+#define REG8(reg, addr)                                                  \
+    enum { A_ ## reg = (addr) };                                          \
+    enum { R_ ## reg = (addr) };
+
+#define REG16(reg, addr)                                                  \
+    enum { A_ ## reg = (addr) };                                          \
+    enum { R_ ## reg = (addr) / 2 };
+
 /* Define SHIFT, LENGTH and MASK constants for a field within a register */
 
 /* This macro will define R_FOO_BAR_MASK, R_FOO_BAR_SHIFT and R_FOO_BAR_LENGTH
@@ -34,6 +42,12 @@
                                         MAKE_64BIT_MASK(shift, length)};
 
 /* Extract a field from a register */
+#define FIELD_EX8(storage, reg, field)                                    \
+    extract8((storage), R_ ## reg ## _ ## field ## _SHIFT,                \
+              R_ ## reg ## _ ## field ## _LENGTH)
+#define FIELD_EX16(storage, reg, field)                                   \
+    extract16((storage), R_ ## reg ## _ ## field ## _SHIFT,               \
+              R_ ## reg ## _ ## field ## _LENGTH)
 #define FIELD_EX32(storage, reg, field)                                   \
     extract32((storage), R_ ## reg ## _ ## field ## _SHIFT,               \
               R_ ## reg ## _ ## field ## _LENGTH)
@@ -49,6 +63,22 @@
  * Assigning values larger then the target field will result in
  * compilation warnings.
  */
+#define FIELD_DP8(storage, reg, field, val) ({                            \
+    struct {                                                              \
+        unsigned int v:R_ ## reg ## _ ## field ## _LENGTH;                \
+    } v = { .v = val };                                                   \
+    uint8_t d;                                                            \
+    d = deposit32((storage), R_ ## reg ## _ ## field ## _SHIFT,           \
+                  R_ ## reg ## _ ## field ## _LENGTH, v.v);               \
+    d; })
+#define FIELD_DP16(storage, reg, field, val) ({                           \
+    struct {                                                              \
+        unsigned int v:R_ ## reg ## _ ## field ## _LENGTH;                \
+    } v = { .v = val };                                                   \
+    uint16_t d;                                                           \
+    d = deposit32((storage), R_ ## reg ## _ ## field ## _SHIFT,           \
+                  R_ ## reg ## _ ## field ## _LENGTH, v.v);               \
+    d; })
 #define FIELD_DP32(storage, reg, field, val) ({                           \
     struct {                                                              \
         unsigned int v:R_ ## reg ## _ ## field ## _LENGTH;                \
@@ -57,7 +87,7 @@
     d = deposit32((storage), R_ ## reg ## _ ## field ## _SHIFT,           \
                   R_ ## reg ## _ ## field ## _LENGTH, v.v);               \
     d; })
-#define FIELD_DP64(storage, reg, field, val) ({                           \
+#define FIELD_DP64(storage, reg, field, val) ({                         \
     struct {                                                              \
         unsigned int v:R_ ## reg ## _ ## field ## _LENGTH;                \
     } v = { .v = val };                                                   \
Signature · 1 line
2.20.1
#4 lore raw

PATCH v30 4/22 target/rx: TCG translation

In reply to Yoshinori Sato

This part only supported RXv1 instructions.
Instruction manual.
https://www.renesas.com/us/en/doc/products/mpumcu/doc/rx_family/r01us0032ej0120_rxsm.pdf

Message-Id: <[email protected]>

---
 target/rx/insns.decode  |  621 ++++++++++
 target/rx/translate.c   | 2432 +++++++++++++++++++++++++++++++++++++++
 target/rx/Makefile.objs |   12 +
 3 files changed, 3065 insertions(+)
 create mode 100644 target/rx/insns.decode
 create mode 100644 target/rx/translate.c
 create mode 100644 target/rx/Makefile.objs
target/rx/insns.decode new file +621 -0
new file mode 100644
index 0000000000..232a61fc8e
@@ -0,0 +1,621 @@
+#
+# Renesas RX instruction decode definitions.
+#
+# Copyright (c) 2019 Richard Henderson <[email protected]>
+# Copyright (c) 2019 Yoshinori Sato <[email protected]>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, see <http://www.gnu.org/licenses/>.
+#
+
+&bcnd		cd dsp sz
+&jdsp		dsp sz
+&jreg		rs
+&rr		rd rs
+&ri		rd imm
+&rrr		rd rs rs2
+&rri		rd imm rs2
+&rm		rd rs ld mi
+&mi		rs ld mi imm
+&mr		rs ld mi rs2
+&mcnd		ld sz rd cd
+########
+%b1_bdsp	24:3 !function=bdsp_s
+
+@b1_bcnd_s	.... cd:1 ...			&bcnd dsp=%b1_bdsp sz=1
+@b1_bra_s	.... ....			&jdsp dsp=%b1_bdsp sz=1
+
+%b2_r_0		16:4
+%b2_li_2	18:2 !function=li
+%b2_li_8	24:2 !function=li
+%b2_dsp5_3	23:4 19:1
+
+@b2_rds		.... .... .... rd:4		&rr rs=%b2_r_0
+@b2_rds_li	.... .... .... rd:4		&rri rs2=%b2_r_0 imm=%b2_li_8
+@b2_rds_uimm4	.... .... imm:4 rd:4		&rri rs2=%b2_r_0
+@b2_rs2_uimm4	.... .... imm:4 rs2:4		&rri rd=0
+@b2_rds_imm5	.... ... imm:5 rd:4		&rri rs2=%b2_r_0
+@b2_rd_rs_li	.... .... rs2:4 rd:4		&rri imm=%b2_li_8
+@b2_rd_ld_ub	.... .. ld:2 rs:4 rd:4		&rm mi=4
+@b2_ld_imm3	.... .. ld:2 rs:4 . imm:3	&mi mi=4
+@b2_bcnd_b	.... cd:4 dsp:s8		&bcnd sz=2
+@b2_bra_b	.... .... dsp:s8		&jdsp sz=2
+
+########
+
+%b3_r_0		8:4
+%b3_li_10	18:2 !function=li
+%b3_dsp5_8	23:1 16:4
+%b3_bdsp	8:s8 16:8
+
+@b3_rd_rs	.... .... .... .... rs:4 rd:4		&rr
+@b3_rs_rd	.... .... .... .... rd:4 rs:4		&rr
+@b3_rd_li	.... .... .... .... .... rd:4 \
+		&rri rs2=%b3_r_0 imm=%b3_li_10
+@b3_rd_ld	.... .... mi:2 .... ld:2 rs:4 rd:4	&rm
+@b3_rd_ld_ub	.... .... .... .. ld:2 rs:4 rd:4	&rm mi=4
+@b3_rd_ld_ul	.... .... .... .. ld:2 rs:4 rd:4	&rm mi=2
+@b3_rd_rs_rs2	.... .... .... rd:4 rs:4 rs2:4		&rrr
+@b3_rds_imm5	.... .... ....... imm:5 rd:4		&rri rs2=%b3_r_0
+@b3_rd_rs_imm5	.... .... ... imm:5 rs2:4 rd:4		&rri
+@b3_bcnd_w	.... ... cd:1 .... .... .... ....	&bcnd dsp=%b3_bdsp sz=3
+@b3_bra_w	.... .... .... .... .... ....		&jdsp dsp=%b3_bdsp sz=3
+@b3_ld_rd_rs	.... .... .... .. ld:2 rs:4 rd:4	&rm mi=0
+@b3_sz_ld_rd_cd	.... .... .... sz:2 ld:2 rd:4 cd:4	&mcnd
+
+########
+
+%b4_li_18	18:2 !function=li
+%b4_dsp_16	0:s8 8:8
+%b4_bdsp	0:s8 8:8 16:8
+
+@b4_rd_ldmi	.... .... mi:2 .... ld:2 .... .... rs:4 rd:4	&rm
+@b4_bra_a	.... .... .... .... .... .... .... ....	\
+		&jdsp dsp=%b4_bdsp sz=4
+########
+# ABS rd
+ABS_rr		0111 1110 0010 ....			@b2_rds
+# ABS rs, rd
+ABS_rr		1111 1100 0000 1111 .... ....		@b3_rd_rs
+
+# ADC #imm, rd
+ADC_ir		1111 1101 0111 ..00 0010 ....		@b3_rd_li
+# ADC rs, rd
+ADC_rr		1111 1100 0000 1011 .... ....		@b3_rd_rs
+# ADC dsp[rs].l, rd
+# Note only mi==2 allowed.
+ADC_mr		0000 0110 ..10 00.. 0000 0010 .... ....	@b4_rd_ldmi
+
+# ADD #uimm4, rd
+ADD_irr		0110 0010 .... ....			@b2_rds_uimm4
+# ADD #imm, rs, rd
+ADD_irr		0111 00.. .... ....			@b2_rd_rs_li
+# ADD dsp[rs].ub, rd
+# ADD rs, rd
+ADD_mr		0100 10.. .... ....			@b2_rd_ld_ub
+# ADD dsp[rs], rd
+ADD_mr		0000 0110 ..00 10.. .... ....		@b3_rd_ld
+# ADD rs, rs2, rd
+ADD_rrr		1111 1111 0010 .... .... ....		@b3_rd_rs_rs2
+
+# AND #uimm4, rd
+AND_ir		0110 0100 .... ....			@b2_rds_uimm4
+# AND #imm, rd
+AND_ir		0111 01.. 0010 ....			@b2_rds_li
+# AND dsp[rs].ub, rd
+# AND rs, rd
+AND_mr		0101 00.. .... ....			@b2_rd_ld_ub
+# AND dsp[rs], rd
+AND_mr		0000 0110 ..01 00.. .... ....		@b3_rd_ld
+# AND rs, rs2, rd
+AND_rrr		1111 1111 0100 .... .... ....		@b3_rd_rs_rs2
+
+# BCLR #imm, dsp[rd]
+BCLR_im		1111 00.. .... 1...			@b2_ld_imm3
+# BCLR #imm, rs
+BCLR_ir		0111 101. .... ....			@b2_rds_imm5
+# BCLR rs, rd
+# BCLR rs, dsp[rd]
+{
+  BCLR_rr	1111 1100 0110 0111 .... ....		@b3_rs_rd
+  BCLR_rm	1111 1100 0110 01.. .... ....		@b3_rd_ld_ub
+}
+
+# BCnd.s dsp
+BCnd		0001 ....				@b1_bcnd_s
+# BRA.b dsp
+# BCnd.b dsp
+{
+  BRA		0010 1110 .... ....			@b2_bra_b
+  BCnd		0010 .... .... ....			@b2_bcnd_b
+}
+
+# BCnd.w dsp
+BCnd		0011 101 . .... .... .... ....		@b3_bcnd_w
+
+# BNOT #imm, dsp[rd]
+# BMCnd #imm, dsp[rd]
+{
+  BNOT_im	1111 1100 111 imm:3 ld:2 rs:4 1111
+  BMCnd_im	1111 1100 111 imm:3 ld:2 rd:4 cd:4
+}
+
+# BNOT #imm, rd
+# BMCnd #imm, rd
+{
+  BNOT_ir	1111 1101 111 imm:5 1111 rd:4
+  BMCnd_ir	1111 1101 111 imm:5 cd:4 rd:4
+}
+
+# BNOT rs, rd
+# BNOT rs, dsp[rd]
+{
+  BNOT_rr	1111 1100 0110 1111 .... ....		@b3_rs_rd
+  BNOT_rm	1111 1100 0110 11.. .... ....		@b3_rd_ld_ub
+}
+
+# BRA.s dsp
+BRA		0000 1 ...				@b1_bra_s
+# BRA.w dsp
+BRA		0011 1000 .... .... .... ....		@b3_bra_w
+# BRA.a dsp
+BRA		0000 0100 .... .... .... .... .... ....		@b4_bra_a
+# BRA.l rs
+BRA_l		0111 1111 0100 rd:4
+
+BRK		0000 0000
+
+# BSET #imm, dsp[rd]
+BSET_im		1111 00.. .... 0...			@b2_ld_imm3
+# BSET #imm, rd
+BSET_ir		0111 100. .... ....			@b2_rds_imm5
+# BSET rs, rd
+# BSET rs, dsp[rd]
+{
+  BSET_rr	1111 1100 0110 0011 .... ....		@b3_rs_rd
+  BSET_rm	1111 1100 0110 00.. .... ....		@b3_rd_ld_ub
+}
+
+# BSR.w dsp
+BSR		0011 1001 .... .... .... ....		@b3_bra_w
+# BSR.a dsp
+BSR		0000 0101 .... .... .... .... .... ....		@b4_bra_a
+# BSR.l rs
+BSR_l		0111 1111 0101 rd:4
+
+# BSET #imm, dsp[rd]
+BTST_im		1111 01.. .... 0...			@b2_ld_imm3
+# BSET #imm, rd
+BTST_ir		0111 110. .... ....			@b2_rds_imm5
+# BSET rs, rd
+# BSET rs, dsp[rd]
+{
+  BTST_rr	1111 1100 0110 1011 .... ....		@b3_rs_rd
+  BTST_rm	1111 1100 0110 10.. .... ....		@b3_rd_ld_ub
+}
+
+# CLRSPW psw
+CLRPSW		0111 1111 1011 cb:4
+
+# CMP #uimm4, rs2
+CMP_ir		0110 0001 .... ....			@b2_rs2_uimm4
+# CMP #uimm8, rs2
+CMP_ir		0111 0101 0101 rs2:4 imm:8		&rri rd=0
+# CMP #imm, rs2
+CMP_ir		0111 01.. 0000 rs2:4			&rri imm=%b2_li_8 rd=0
+# CMP dsp[rs].ub, rs2
+# CMP rs, rs2
+CMP_mr		0100 01.. .... ....			@b2_rd_ld_ub
+# CMP dsp[rs], rs2
+CMP_mr		0000 0110 ..00 01.. .... ....		@b3_rd_ld
+
+# DIV #imm, rd
+DIV_ir		1111 1101 0111 ..00 1000 ....		@b3_rd_li
+# DIV dsp[rs].ub, rd
+# DIV rs, rd
+DIV_mr		1111 1100 0010 00.. .... ....		@b3_rd_ld_ub
+# DIV dsp[rs], rd
+DIV_mr		0000 0110 ..10 00.. 0000 1000 .... ....	@b4_rd_ldmi
+
+# DIVU #imm, rd
+DIVU_ir		1111 1101 0111 ..00 1001 ....		@b3_rd_li
+# DIVU dsp[rs].ub, rd
+# DIVU rs, rd
+DIVU_mr		1111 1100 0010 01.. .... ....		@b3_rd_ld_ub
+# DIVU dsp[rs], rd
+DIVU_mr		0000 0110 ..10 00.. 0000 1001 .... ....	@b4_rd_ldmi
+
+# EMUL #imm, rd
+EMUL_ir		1111 1101 0111 ..00 0110 ....		@b3_rd_li
+# EMUL dsp[rs].ub, rd
+# EMUL rs, rd
+EMUL_mr		1111 1100 0001 10.. .... ....		@b3_rd_ld_ub
+# EMUL dsp[rs], rd
+EMUL_mr		0000 0110 ..10 00.. 0000 0110 .... ....	@b4_rd_ldmi
+
+# EMULU #imm, rd
+EMULU_ir	1111 1101 0111 ..00 0111 ....		@b3_rd_li
+# EMULU dsp[rs].ub, rd
+# EMULU rs, rd
+EMULU_mr	1111 1100 0001 11.. .... ....		@b3_rd_ld_ub
+# EMULU dsp[rs], rd
+EMULU_mr	0000 0110 ..10 00.. 0000 0111 .... ....	@b4_rd_ldmi
+
+# FADD #imm, rd
+FADD_ir		1111 1101 0111 0010 0010 rd:4
+# FADD rs, rd
+# FADD dsp[rs], rd
+FADD_mr		1111 1100 1000 10.. .... ....		@b3_rd_ld_ul
+
+# FCMP #imm, rd
+FCMP_ir		1111 1101 0111 0010 0001 rd:4
+# FCMP rs, rd
+# FCMP dsp[rs], rd
+FCMP_mr		1111 1100 1000 01.. .... ....		@b3_rd_ld_ul
+
+# FDIV #imm, rd
+FDIV_ir		1111 1101 0111 0010 0100 rd:4
+# FDIV rs, rd
+# FDIV dsp[rs], rd
+FDIV_mr		1111 1100 1001 00.. .... ....		@b3_rd_ld_ul
+
+# FMUL #imm, rd
+FMUL_ir		1111 1101 0111 0010 0011 rd:4
+# FMUL rs, rd
+# FMUL dsp[rs], rd
+FMUL_mr		1111 1100 1000 11.. .... ....		@b3_rd_ld_ul
+
+# FSUB #imm, rd
+FSUB_ir		1111 1101 0111 0010 0000 rd:4
+# FSUB rs, rd
+# FSUB dsp[rs], rd
+FSUB_mr		1111 1100 1000 00.. .... ....		@b3_rd_ld_ul
+
+# FTOI rs, rd
+# FTOI dsp[rs], rd
+FTOI		1111 1100 1001 01.. .... ....		@b3_rd_ld_ul
+
+# INT #uimm8
+INT		0111 0101 0110 0000 imm:8
+
+# ITOF dsp[rs].ub, rd
+# ITOF rs, rd
+ITOF		1111 1100 0100 01.. .... ....		@b3_rd_ld_ub
+# ITOF dsp[rs], rd
+ITOF		0000 0110 ..10 00.. 0001 0001 .... ....	@b4_rd_ldmi
+
+# JMP rs
+JMP		0111 1111 0000 rs:4			&jreg
+# JSR rs
+JSR		0111 1111 0001 rs:4			&jreg
+
+# MACHI rs, rs2
+MACHI		1111 1101 0000 0100 rs:4 rs2:4
+# MACLO rs, rs2
+MACLO		1111 1101 0000 0101 rs:4 rs2:4
+
+# MAX #imm, rd
+MAX_ir		1111 1101 0111 ..00 0100 ....		@b3_rd_li
+# MAX dsp[rs].ub, rd
+# MAX rs, rd
+MAX_mr		1111 1100 0001 00.. .... ....		@b3_rd_ld_ub
+# MAX dsp[rs], rd
+MAX_mr		0000 0110 ..10 00.. 0000 0100 .... ....	@b4_rd_ldmi
+
+# MIN #imm, rd
+MIN_ir		1111 1101 0111 ..00 0101 ....		@b3_rd_li
+# MIN dsp[rs].ub, rd
+# MIN rs, rd
+MIN_mr		1111 1100 0001 01.. .... ....		@b3_rd_ld_ub
+# MIN dsp[rs], rd
+MIN_mr		0000 0110 ..10 00.. 0000 0101 .... ....	@b4_rd_ldmi
+
+# MOV.b rs, dsp5[rd]
+MOV_rm		1000 0 .... rd:3 . rs:3			dsp=%b2_dsp5_3 sz=0
+# MOV.w rs, dsp5[rd]
+MOV_rm		1001 0 .... rd:3 . rs:3			dsp=%b2_dsp5_3 sz=1
+# MOV.l rs, dsp5[rd]
+MOV_rm		1010 0 .... rd:3 . rs:3			dsp=%b2_dsp5_3 sz=2
+# MOV.b dsp5[rs], rd
+MOV_mr		1000 1 .... rs:3 . rd:3			dsp=%b2_dsp5_3 sz=0
+# MOV.w dsp5[rs], rd
+MOV_mr		1001 1 .... rs:3 . rd:3			dsp=%b2_dsp5_3 sz=1
+# MOV.l dsp5[rs], rd
+MOV_mr		1010 1 .... rs:3 . rd:3			dsp=%b2_dsp5_3 sz=2
+# MOV.l #uimm4, rd
+MOV_ir		0110 0110 imm:4 rd:4
+# MOV.b #imm8, dsp5[rd]
+MOV_im		0011 1100 . rd:3 .... imm:8		sz=0 dsp=%b3_dsp5_8
+# MOV.w #imm8, dsp5[rd]
+MOV_im		0011 1101 . rd:3 .... imm:8		sz=1 dsp=%b3_dsp5_8
+# MOV.l #imm8, dsp5[rd]
+MOV_im		0011 1110 . rd:3 .... imm:8		sz=2 dsp=%b3_dsp5_8
+# MOV.l #imm8, rd
+MOV_ir		0111 0101 0100 rd:4 imm:8
+# MOV.l #mm8, rd
+MOV_ir		1111 1011 rd:4 .. 10			imm=%b2_li_2
+# MOV.<bwl> #imm, [rd]
+MOV_im		1111 1000 rd:4 .. sz:2			dsp=0 imm=%b2_li_2
+# MOV.<bwl> #imm, dsp8[rd]
+MOV_im		1111 1001 rd:4 .. sz:2 dsp:8		imm=%b3_li_10
+# MOV.<bwl> #imm, dsp16[rd]
+MOV_im		1111 1010 rd:4 .. sz:2 .... .... .... .... \
+		imm=%b4_li_18 dsp=%b4_dsp_16
+# MOV.<bwl> [ri,rb], rd
+MOV_ar		1111 1110 01 sz:2 ri:4 rb:4 rd:4
+# MOV.<bwl> rs, [ri,rb]
+MOV_ra		1111 1110 00 sz:2 ri:4 rb:4 rs:4
+# Note ldd=3 and lds=3 indicate register src or dst
+# MOV.b rs, rd
+# MOV.b rs, dsp[rd]
+# MOV.b dsp[rs], rd
+# MOV.b dsp[rs], dsp[rd]
+MOV_mm		1100 ldd:2 lds:2 rs:4 rd:4		sz=0
+# MOV.w rs, rd
+# MOV.w rs, dsp[rd]
+# MOV.w dsp[rs], rd
+# MOV.w dsp[rs], dsp[rd]
+MOV_mm		1101 ldd:2 lds:2 rs:4 rd:4		sz=1
+# MOV.l rs, rd
+# MOV.l rs, dsp[rd]
+# MOV.l dsp[rs], rd
+# MOV.l dsp[rs], dsp[rd]
+MOV_mm		1110 ldd:2 lds:2 rs:4 rd:4		sz=2
+# MOV.l rs, [rd+]
+# MOV.l rs, [-rd]
+MOV_rp		1111 1101 0010 0 ad:1 sz:2 rd:4 rs:4
+# MOV.l [rs+], rd
+# MOV.l [-rs], rd
+MOV_pr		1111 1101 0010 1 ad:1 sz:2 rd:4 rs:4
+
+# MOVU.<bw> dsp5[rs], rd
+MOVU_mr		1011 sz:1 ... . rs:3 . rd:3		dsp=%b2_dsp5_3
+# MOVU.<bw> [rs], rd
+MOVU_mr		0101 1 sz:1 00 rs:4 rd:4		dsp=0
+# MOVU.<bw> dsp8[rs], rd
+MOVU_mr		0101 1 sz:1 01 rs:4 rd:4 dsp:8
+# MOVU.<bw> dsp16[rs], rd
+MOVU_mr		0101 1 sz:1 10 rs:4 rd:4 .... .... .... .... dsp=%b4_dsp_16
+# MOVU.<bw> rs, rd
+MOVU_rr		0101 1 sz:1 11 rs:4 rd:4
+# MOVU.<bw> [ri, rb], rd
+MOVU_ar		1111 1110 110 sz:1 ri:4 rb:4 rd:4
+# MOVU.<bw> [rs+], rd
+MOVU_pr		1111 1101 0011 1 ad:1 0 sz:1 rd:4 rs:4
+
+# MUL #uimm4, rd
+MUL_ir		0110 0011 .... ....			@b2_rds_uimm4
+# MUL #imm4, rd
+MUL_ir		0111 01.. 0001 ....			@b2_rds_li
+# MUL dsp[rs].ub, rd
+# MUL rs, rd
+MUL_mr		0100 11.. .... ....			@b2_rd_ld_ub
+# MUL dsp[rs], rd
+MUL_mr		0000 0110 ..00 11.. .... ....		@b3_rd_ld
+# MOV rs, rs2, rd
+MUL_rrr		1111 1111 0011 .... .... ....		@b3_rd_rs_rs2
+
+# MULHI rs, rs2
+MULHI		1111 1101 0000 0000 rs:4 rs2:4
+# MULLO rs, rs2
+MULLO		1111 1101 0000 0001 rs:4 rs2:4
+
+# MVFACHI rd
+MVFACHI		1111 1101 0001 1111 0000 rd:4
+# MVFACMI rd
+MVFACMI		1111 1101 0001 1111 0010 rd:4
+
+# MVFC cr, rd
+MVFC		1111 1101 0110 1010 cr:4 rd:4
+
+# MVTACHI rs
+MVTACHI		1111 1101 0001 0111 0000 rs:4
+# MVTACLO rs
+MVTACLO		1111 1101 0001 0111 0001 rs:4
+
+# MVTC #imm, cr
+MVTC_i		1111 1101 0111 ..11 0000 cr:4		imm=%b3_li_10
+# MVTC rs, cr
+MVTC_r		1111 1101 0110 1000 rs:4 cr:4
+
+# MVTIPL #imm
+MVTIPL		0111 0101 0111 0000 0000 imm:4
+
+# NEG rd
+NEG_rr		0111 1110 0001 ....			@b2_rds
+# NEG rs, rd
+NEG_rr		1111 1100 0000 0111 .... ....		@b3_rd_rs
+
+NOP		0000 0011
+
+# NOT rd
+NOT_rr		0111 1110 0000 ....			@b2_rds
+# NOT rs, rd
+NOT_rr		1111 1100 0011 1011 .... ....		@b3_rd_rs
+
+# OR #uimm4, rd
+OR_ir		0110 0101 .... ....			@b2_rds_uimm4
+# OR #imm, rd
+OR_ir		0111 01.. 0011 ....			@b2_rds_li
+# OR dsp[rs].ub, rd
+# OR rs, rd
+OR_mr		0101 01.. .... ....			@b2_rd_ld_ub
+# OR dsp[rs], rd
+OR_mr		0000 0110 .. 0101 .. .... ....		@b3_rd_ld
+# OR rs, rs2, rd
+OR_rrr		1111 1111 0101 .... .... ....		@b3_rd_rs_rs2
+
+# POP cr
+POPC		0111 1110 1110 cr:4
+# POP rd-rd2
+POPM		0110 1111 rd:4 rd2:4
+
+# POP rd
+# PUSH.<bwl> rs
+{
+  POP		0111 1110 1011 rd:4
+  PUSH_r	0111 1110 10 sz:2 rs:4
+}
+# PUSH.<bwl> dsp[rs]
+PUSH_m		1111 01 ld:2 rs:4 10 sz:2
+# PUSH cr
+PUSHC		0111 1110 1100 cr:4
+# PUSHM rs-rs2
+PUSHM		0110 1110 rs:4 rs2:4
+
+# RACW #imm
+RACW		1111 1101 0001 1000 000 imm:1 0000
+
+# REVL rs,rd
+REVL		1111 1101 0110 0111 .... ....		@b3_rd_rs
+# REVW rs,rd
+REVW		1111 1101 0110 0101 .... ....		@b3_rd_rs
+
+# SMOVF
+# RPMA.<bwl>
+{
+  SMOVF		0111 1111 1000 1111
+  RMPA		0111 1111 1000 11 sz:2
+}
+
+# ROLC rd
+ROLC		0111 1110 0101 ....			@b2_rds
+# RORC rd
+RORC		0111 1110 0100 ....			@b2_rds
+
+# ROTL #imm, rd
+ROTL_ir		1111 1101 0110 111. .... ....		@b3_rds_imm5
+# ROTL rs, rd
+ROTL_rr		1111 1101 0110 0110 .... ....		@b3_rd_rs
+
+# ROTR #imm, rd
+ROTR_ir		1111 1101 0110 110. .... ....		@b3_rds_imm5
+# ROTR #imm, rd
+ROTR_rr		1111 1101 0110 0100 .... ....		@b3_rd_rs
+
+# ROUND rs,rd
+# ROUND dsp[rs],rd
+ROUND		1111 1100 1001 10 .. .... ....		@b3_ld_rd_rs
+
+RTE		0111 1111 1001 0101
+
+RTFI		0111 1111 1001 0100
+
+RTS		0000 0010
+
+# RTSD #imm
+RTSD_i		0110 0111 imm:8
+# RTSD #imm, rd-rd2
+RTSD_irr	0011 1111 rd:4 rd2:4 imm:8
+
+# SAT rd
+SAT		0111 1110 0011 ....			@b2_rds
+# SATR
+SATR		0111 1111 1001 0011
+
+# SBB rs, rd
+SBB_rr		1111 1100 0000 0011 .... ....		@b3_rd_rs
+# SBB dsp[rs].l, rd
+# Note only mi==2 allowed.
+SBB_mr		0000 0110 ..10 00.. 0000 0000 .... ....	@b4_rd_ldmi
+
+# SCCnd dsp[rd]
+# SCCnd rd
+SCCnd		1111 1100 1101 .... .... ....		@b3_sz_ld_rd_cd
+
+# SETPSW psw
+SETPSW		0111 1111 1010 cb:4
+
+# SHAR #imm, rd
+SHAR_irr	0110 101. .... ....			@b2_rds_imm5
+# SHAR #imm, rs, rd
+SHAR_irr	1111 1101 101. .... .... ....		@b3_rd_rs_imm5
+# SHAR rs, rd
+SHAR_rr		1111 1101 0110 0001 .... ....		@b3_rd_rs
+
+# SHLL #imm, rd
+SHLL_irr	0110 110. .... ....			@b2_rds_imm5
+# SHLL #imm, rs, rd
+SHLL_irr	1111 1101 110. .... .... ....		@b3_rd_rs_imm5
+# SHLL rs, rd
+SHLL_rr		1111 1101 0110 0010 .... ....		@b3_rd_rs
+
+# SHLR #imm, rd
+SHLR_irr	0110 100. .... ....			@b2_rds_imm5
+# SHLR #imm, rs, rd
+SHLR_irr	1111 1101 100. .... .... ....		@b3_rd_rs_imm5
+# SHLR rs, rd
+SHLR_rr		1111 1101 0110 0000 .... ....		@b3_rd_rs
+
+# SMOVB
+# SSTR.<bwl>
+{
+  SMOVB		0111 1111 1000 1011
+  SSTR		0111 1111 1000 10 sz:2
+}
+
+# STNZ #imm, rd
+STNZ		1111 1101 0111 ..00 1111 ....		@b3_rd_li
+# STZ #imm, rd
+STZ		1111 1101 0111 ..00 1110 ....		@b3_rd_li
+
+# SUB #uimm4, rd
+SUB_ir		0110 0000 .... ....			@b2_rds_uimm4
+# SUB dsp[rs].ub, rd
+# SUB rs, rd
+SUB_mr		0100 00.. .... ....			@b2_rd_ld_ub
+# SUB dsp[rs], rd
+SUB_mr		0000 0110 ..00 00.. .... ....		@b3_rd_ld
+# SUB rs, rs2, rd
+SUB_rrr		1111 1111 0000 .... .... ....		@b3_rd_rs_rs2
+
+# SCMPU
+# SUNTIL.<bwl>
+{
+  SCMPU		0111 1111 1000 0011
+  SUNTIL	0111 1111 1000 00 sz:2
+}
+
+# SMOVU
+# SWHILE.<bwl>
+{
+  SMOVU		0111 1111 1000 0111
+  SWHILE	0111 1111 1000 01 sz:2
+}
+
+# TST #imm, rd
+TST_ir		1111 1101 0111 ..00 1100 ....		@b3_rd_li
+# TST dsp[rs].ub, rd
+# TST rs, rd
+TST_mr		1111 1100 0011 00.. .... ....		@b3_rd_ld_ub
+# TST dsp[rs], rd
+TST_mr		0000 0110 ..10 00.. 0000 1100 .... .... @b4_rd_ldmi
+
+WAIT		0111 1111 1001 0110
+
+# XCHG rs, rd
+# XCHG dsp[rs].ub, rd
+{
+  XCHG_rr		1111 1100 0100 0011 .... ....		@b3_rd_rs
+  XCHG_mr		1111 1100 0100 00.. .... ....		@b3_rd_ld_ub
+}
+# XCHG dsp[rs], rd
+XCHG_mr		0000 0110 ..10 00.. 0001 0000 .... ....	@b4_rd_ldmi
+
+# XOR #imm, rd
+XOR_ir		1111 1101 0111 ..00 1101 ....		@b3_rd_li
+# XOR dsp[rs].ub, rd
+# XOR rs, rd
+XOR_mr		1111 1100 0011 01.. .... ....		@b3_rd_ld_ub
+# XOR dsp[rs], rd
+XOR_mr		0000 0110 ..10 00.. 0000 1101 .... ....	@b4_rd_ldmi
target/rx/translate.c new file +2432 -0

2,379 lines not on this page · raw message

target/rx/Makefile.objs new file +12 -0
new file mode 100644
index 0000000000..aa6f2d2d6c

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.20.1

Part of the diff is not shown here. View the raw message.

#5 lore raw

PATCH v30 5/22 target/rx: TCG helper

In reply to Yoshinori Sato

Message-Id: <[email protected]>

Message-Id: <[email protected]>

[PMD: Removed tlb_fill, extracted from patch of Yoshinori Sato
'Convert to CPUClass::tlb_fill']

---
 target/rx/helper.h    |  31 +++
 target/rx/helper.c    | 149 +++++++++++++
 target/rx/op_helper.c | 470 ++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 650 insertions(+)
 create mode 100644 target/rx/helper.h
 create mode 100644 target/rx/helper.c
 create mode 100644 target/rx/op_helper.c
target/rx/helper.h new file +31 -0
new file mode 100644
index 0000000000..f0b7ebbbf7
@@ -0,0 +1,31 @@
+DEF_HELPER_1(raise_illegal_instruction, noreturn, env)
+DEF_HELPER_1(raise_access_fault, noreturn, env)
+DEF_HELPER_1(raise_privilege_violation, noreturn, env)
+DEF_HELPER_1(wait, noreturn, env)
+DEF_HELPER_1(debug, noreturn, env)
+DEF_HELPER_2(rxint, noreturn, env, i32)
+DEF_HELPER_1(rxbrk, noreturn, env)
+DEF_HELPER_FLAGS_3(fadd, TCG_CALL_NO_WG, f32, env, f32, f32)
+DEF_HELPER_FLAGS_3(fsub, TCG_CALL_NO_WG, f32, env, f32, f32)
+DEF_HELPER_FLAGS_3(fmul, TCG_CALL_NO_WG, f32, env, f32, f32)
+DEF_HELPER_FLAGS_3(fdiv, TCG_CALL_NO_WG, f32, env, f32, f32)
+DEF_HELPER_FLAGS_3(fcmp, TCG_CALL_NO_WG, void, env, f32, f32)
+DEF_HELPER_FLAGS_2(ftoi, TCG_CALL_NO_WG, i32, env, f32)
+DEF_HELPER_FLAGS_2(round, TCG_CALL_NO_WG, i32, env, f32)
+DEF_HELPER_FLAGS_2(itof, TCG_CALL_NO_WG, f32, env, i32)
+DEF_HELPER_2(set_fpsw, void, env, i32)
+DEF_HELPER_FLAGS_2(racw, TCG_CALL_NO_WG, void, env, i32)
+DEF_HELPER_FLAGS_2(set_psw_rte, TCG_CALL_NO_WG, void, env, i32)
+DEF_HELPER_FLAGS_2(set_psw, TCG_CALL_NO_WG, void, env, i32)
+DEF_HELPER_1(pack_psw, i32, env)
+DEF_HELPER_FLAGS_3(div, TCG_CALL_NO_WG, i32, env, i32, i32)
+DEF_HELPER_FLAGS_3(divu, TCG_CALL_NO_WG, i32, env, i32, i32)
+DEF_HELPER_FLAGS_1(scmpu, TCG_CALL_NO_WG, void, env)
+DEF_HELPER_1(smovu, void, env)
+DEF_HELPER_1(smovf, void, env)
+DEF_HELPER_1(smovb, void, env)
+DEF_HELPER_2(sstr, void, env, i32)
+DEF_HELPER_FLAGS_2(swhile, TCG_CALL_NO_WG, void, env, i32)
+DEF_HELPER_FLAGS_2(suntil, TCG_CALL_NO_WG, void, env, i32)
+DEF_HELPER_FLAGS_2(rmpa, TCG_CALL_NO_WG, void, env, i32)
+DEF_HELPER_1(satr, void, env)
target/rx/helper.c new file +149 -0

149 lines not on this page · raw message

target/rx/op_helper.c new file +470 -0

470 lines not on this page · raw message

Signature · 1 line
2.20.1
#6 lore raw

PATCH v30 6/22 target/rx: CPU definition

In reply to Yoshinori Sato

Message-Id: <[email protected]>

Message-Id: <[email protected]>

[PMD: Use newer QOM style, split cpu-qom.h, restrict access to
extable array, use rx_cpu_tlb_fill() extracted from patch of Yoshinori Sato 'Convert to CPUClass::tlb_fill']

---
 target/rx/cpu-param.h   |  31 ++++++
 target/rx/cpu-qom.h     |  42 ++++++++
 target/rx/cpu.h         | 181 +++++++++++++++++++++++++++++++++
 target/rx/cpu.c         | 218 ++++++++++++++++++++++++++++++++++++++++
 target/rx/gdbstub.c     | 112 +++++++++++++++++++++
 gdb-xml/rx-core.xml     |  70 +++++++++++++
 target/rx/Makefile.objs |   1 -
 7 files changed, 654 insertions(+), 1 deletion(-)
 create mode 100644 target/rx/cpu-param.h
 create mode 100644 target/rx/cpu-qom.h
 create mode 100644 target/rx/cpu.h
 create mode 100644 target/rx/cpu.c
 create mode 100644 target/rx/gdbstub.c
 create mode 100644 gdb-xml/rx-core.xml
target/rx/cpu-param.h new file +31 -0
new file mode 100644
index 0000000000..5da87fbebe
@@ -0,0 +1,31 @@
+/*
+ *  RX cpu parameters
+ *
+ *  Copyright (c) 2019 Yoshinori Sato
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2 or later, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef RX_CPU_PARAM_H
+#define RX_CPU_PARAM_H
+
+#define TARGET_LONG_BITS 32
+#define TARGET_PAGE_BITS 12
+
+#define TARGET_PHYS_ADDR_SPACE_BITS 32
+#define TARGET_VIRT_ADDR_SPACE_BITS 32
+
+#define NB_MMU_MODES 1
+#define MMU_MODE0_SUFFIX _all
+
+#endif
target/rx/cpu-qom.h new file +42 -0

42 lines not on this page · raw message

target/rx/cpu.h new file +181 -0

181 lines not on this page · raw message

target/rx/cpu.c new file +218 -0

218 lines not on this page · raw message

target/rx/gdbstub.c new file +112 -0

112 lines not on this page · raw message

gdb-xml/rx-core.xml new file +70 -0

70 lines not on this page · raw message

target/rx/Makefile.objs +0 -1
index aa6f2d2d6c..a0018d5bc5 100644
@@ -1,5 +1,4 @@
 obj-y += translate.o op_helper.o helper.o cpu.o gdbstub.o disas.o
-obj-$(CONFIG_SOFTMMU) += monitor.o
 
 DECODETREE = $(SRC_PATH)/scripts/decodetree.py
 
Signature · 1 line
2.20.1
#7 lore raw

PATCH v30 7/22 target/rx: RX disassembler

In reply to Yoshinori Sato

Message-Id: <[email protected]>

---
 include/disas/dis-asm.h |    5 +
 target/rx/disas.c       | 1480 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 1485 insertions(+)
 create mode 100644 target/rx/disas.c
include/disas/dis-asm.h +5 -0
index f87f468809..c5f9fa08ab 100644
@@ -226,6 +226,10 @@ enum bfd_architecture
 #define bfd_mach_nios2r2        2
   bfd_arch_lm32,       /* Lattice Mico32 */
 #define bfd_mach_lm32 1
+  bfd_arch_rx,       /* Renesas RX */
+#define bfd_mach_rx            0x75
+#define bfd_mach_rx_v2         0x76
+#define bfd_mach_rx_v3         0x77
   bfd_arch_last
   };
 #define bfd_mach_s390_31 31
@@ -436,6 +440,7 @@ int print_insn_little_nios2     (bfd_vma, disassemble_info*);
 int print_insn_xtensa           (bfd_vma, disassemble_info*);
 int print_insn_riscv32          (bfd_vma, disassemble_info*);
 int print_insn_riscv64          (bfd_vma, disassemble_info*);
+int print_insn_rx(bfd_vma, disassemble_info *);
 
 #if 0
 /* Fetch the disassembler for a given BFD, if that support is available.  */
target/rx/disas.c new file +1480 -0

1,480 lines not on this page · raw message

Signature · 1 line
2.20.1
#8 lore raw

PATCH v30 8/22 target/rx: Disassemble rx_index_addr into a string

In reply to Yoshinori Sato

From: Richard Henderson <[email protected]>

We were eliding all zero indexes. It is only ld==0 that does not have an index in the instruction. This also allows us to avoid breaking the final print into multiple pieces.

Message-Id: <[email protected]>

---
 target/rx/disas.c | 154 +++++++++++++++++-----------------------------
 1 file changed, 55 insertions(+), 99 deletions(-)
target/rx/disas.c +55 -99
index 8cada4825d..64342537ee 100644
@@ -107,49 +107,42 @@ static const char psw[] = {
     'i', 'u', 0, 0, 0, 0, 0, 0,
 };
 
-static uint32_t rx_index_addr(int ld, int size, DisasContext *ctx)
+static void rx_index_addr(DisasContext *ctx, char out[8], int ld, int mi)
 {
-    bfd_byte buf[2];
+    uint32_t addr = ctx->addr;
+    uint8_t buf[2];
+    uint16_t dsp;
+
     switch (ld) {
     case 0:
-        return 0;
+        /* No index; return empty string.  */
+        out[0] = '\0';
+        return;
     case 1:
-        ctx->dis->read_memory_func(ctx->addr, buf, 1, ctx->dis);
         ctx->addr += 1;
-        return ((uint8_t)buf[0]) << size;
+        ctx->dis->read_memory_func(addr, buf, 1, ctx->dis);
+        dsp = buf[0];
+        break;
     case 2:
-        ctx->dis->read_memory_func(ctx->addr, buf, 2, ctx->dis);
         ctx->addr += 2;
-        return lduw_le_p(buf) << size;
+        ctx->dis->read_memory_func(addr, buf, 2, ctx->dis);
+        dsp = lduw_le_p(buf);
+        break;
+    default:
+        g_assert_not_reached();
     }
-    g_assert_not_reached();
+
+    sprintf(out, "%u", dsp << (mi < 3 ? mi : 4 - mi));
 }
 
 static void operand(DisasContext *ctx, int ld, int mi, int rs, int rd)
 {
-    int dsp;
     static const char sizes[][4] = {".b", ".w", ".l", ".uw", ".ub"};
+    char dsp[8];
+
     if (ld < 3) {
-        switch (mi) {
-        case 4:
-            /* dsp[rs].ub */
-            dsp = rx_index_addr(ld, RX_MEMORY_BYTE, ctx);
-            break;
-        case 3:
-            /* dsp[rs].uw */
-            dsp = rx_index_addr(ld, RX_MEMORY_WORD, ctx);
-            break;
-        default:
-            /* dsp[rs].b */
-            /* dsp[rs].w */
-            /* dsp[rs].l */
-            dsp = rx_index_addr(ld, mi, ctx);
-            break;
-        }
-        if (dsp > 0) {
-            prt("%d", dsp);
-        }
-        prt("[r%d]%s", rs, sizes[mi]);
+        rx_index_addr(ctx, dsp, ld, mi);
+        prt("%s[r%d]%s", dsp, rs, sizes[mi]);
     } else {
         prt("r%d", rs);
     }
@@ -235,7 +228,7 @@ static bool trans_MOV_ra(DisasContext *ctx, arg_MOV_ra *a)
 /* mov.[bwl] rs,rd */
 static bool trans_MOV_mm(DisasContext *ctx, arg_MOV_mm *a)
 {
-    int dsp;
+    char dspd[8], dsps[8];
 
     prt("mov.%c\t", size[a->sz]);
     if (a->lds == 3 && a->ldd == 3) {
@@ -244,29 +237,15 @@ static bool trans_MOV_mm(DisasContext *ctx, arg_MOV_mm *a)
         return true;
     }
     if (a->lds == 3) {
-        prt("r%d, ", a->rd);
-        dsp = rx_index_addr(a->ldd, a->sz, ctx);
-        if (dsp > 0) {
-            prt("%d", dsp);
-        }
-        prt("[r%d]", a->rs);
+        rx_index_addr(ctx, dspd, a->ldd, a->sz);
+        prt("r%d, %s[r%d]", a->rs, dspd, a->rd);
     } else if (a->ldd == 3) {
-        dsp = rx_index_addr(a->lds, a->sz, ctx);
-        if (dsp > 0) {
-            prt("%d", dsp);
-        }
-        prt("[r%d], r%d", a->rs, a->rd);
+        rx_index_addr(ctx, dsps, a->lds, a->sz);
+        prt("%s[r%d], r%d", dsps, a->rs, a->rd);
     } else {
-        dsp = rx_index_addr(a->lds, a->sz, ctx);
-        if (dsp > 0) {
-            prt("%d", dsp);
-        }
-        prt("[r%d], ", a->rs);
-        dsp = rx_index_addr(a->ldd, a->sz, ctx);
-        if (dsp > 0) {
-            prt("%d", dsp);
-        }
-        prt("[r%d]", a->rd);
+        rx_index_addr(ctx, dsps, a->lds, a->sz);
+        rx_index_addr(ctx, dspd, a->ldd, a->sz);
+        prt("%s[r%d], %s[r%d]", dsps, a->rs, dspd, a->rd);
     }
     return true;
 }
@@ -357,12 +336,10 @@ static bool trans_PUSH_r(DisasContext *ctx, arg_PUSH_r *a)
 /* push dsp[rs] */
 static bool trans_PUSH_m(DisasContext *ctx, arg_PUSH_m *a)
 {
-    prt("push\t");
-    int dsp = rx_index_addr(a->ld, a->sz, ctx);
-    if (dsp > 0) {
-        prt("%d", dsp);
-    }
-    prt("[r%d]", a->rs);
+    char dsp[8];
+
+    rx_index_addr(ctx, dsp, a->ld, a->sz);
+    prt("push\t%s[r%d]", dsp, a->rs);
     return true;
 }
 
@@ -389,17 +366,13 @@ static bool trans_XCHG_rr(DisasContext *ctx, arg_XCHG_rr *a)
 /* xchg dsp[rs].<mi>,rd */
 static bool trans_XCHG_mr(DisasContext *ctx, arg_XCHG_mr *a)
 {
-    int dsp;
     static const char msize[][4] = {
         "b", "w", "l", "ub", "uw",
     };
+    char dsp[8];
 
-    prt("xchg\t");
-    dsp = rx_index_addr(a->ld, a->mi, ctx);
-    if (dsp > 0) {
-        prt("%d", dsp);
-    }
-    prt("[r%d].%s, r%d", a->rs, msize[a->mi], a->rd);
+    rx_index_addr(ctx, dsp, a->ld, a->mi);
+    prt("xchg\t%s[r%d].%s, r%d", dsp, a->rs, msize[a->mi], a->rd);
     return true;
 }
 
@@ -552,13 +525,10 @@ static bool trans_ADC_rr(DisasContext *ctx, arg_ADC_rr *a)
 /* adc dsp[rs], rd */
 static bool trans_ADC_mr(DisasContext *ctx, arg_ADC_mr *a)
 {
-    int dsp;
-    prt("adc\t");
-    dsp = rx_index_addr(a->ld, 2, ctx);
-    if (dsp > 0) {
-        prt("%d", dsp);
-    }
-    prt("[r%d], r%d", a->rs, a->rd);
+    char dsp[8];
+
+    rx_index_addr(ctx, dsp, a->ld, 2);
+    prt("adc\t%s[r%d], r%d", dsp, a->rs, a->rd);
     return true;
 }
 
@@ -1217,25 +1187,17 @@ static bool trans_ITOF(DisasContext *ctx, arg_ITOF *a)
 
 #define BOP_IM(name, reg)                                       \
     do {                                                        \
-        int dsp;                                                \
-        prt("b%s\t#%d, ", #name, a->imm);                       \
-        dsp = rx_index_addr(a->ld, RX_MEMORY_BYTE, ctx);        \
-        if (dsp > 0) {                                          \
-            prt("%d", dsp);                                     \
-        }                                                       \
-        prt("[r%d]", reg);                                      \
+        char dsp[8];                                            \
+        rx_index_addr(ctx, dsp, a->ld, RX_MEMORY_BYTE);         \
+        prt("b%s\t#%d, %s[r%d]", #name, a->imm, dsp, reg);      \
         return true;                                            \
     } while (0)
 
 #define BOP_RM(name)                                            \
     do {                                                        \
-        int dsp;                                                \
-        prt("b%s\tr%d, ", #name, a->rd);                        \
-        dsp = rx_index_addr(a->ld, RX_MEMORY_BYTE, ctx);        \
-        if (dsp > 0) {                                          \
-            prt("%d", dsp);                                     \
-        }                                                       \
-        prt("[r%d]", a->rs);                                    \
+        char dsp[8];                                            \
+        rx_index_addr(ctx, dsp, a->ld, RX_MEMORY_BYTE);         \
+        prt("b%s\tr%d, %s[r%d]", #name, a->rd, dsp, a->rs);     \
         return true;                                            \
     } while (0)
 
@@ -1346,12 +1308,10 @@ static bool trans_BNOT_ir(DisasContext *ctx, arg_BNOT_ir *a)
 /* bmcond #imm, dsp[rd] */
 static bool trans_BMCnd_im(DisasContext *ctx, arg_BMCnd_im *a)
 {
-    int dsp = rx_index_addr(a->ld, RX_MEMORY_BYTE, ctx);
-    prt("bm%s\t#%d, ", cond[a->cd], a->imm);
-    if (dsp > 0) {
-        prt("%d", dsp);
-    }
-    prt("[%d]", a->rd);
+    char dsp[8];
+
+    rx_index_addr(ctx, dsp, a->ld, RX_MEMORY_BYTE);
+    prt("bm%s\t#%d, %s[r%d]", cond[a->cd], a->imm, dsp, a->rd);
     return true;
 }
 
@@ -1443,16 +1403,12 @@ static bool trans_WAIT(DisasContext *ctx, arg_WAIT *a)
 /* sccnd.[bwl] dsp:[rd] */
 static bool trans_SCCnd(DisasContext *ctx, arg_SCCnd *a)
 {
-    int dsp;
-    prt("sc%s.%c\t", cond[a->cd], size[a->sz]);
     if (a->ld < 3) {
-        dsp = rx_index_addr(a->sz, a->ld, ctx);
-        if (dsp > 0) {
-            prt("%d", dsp);
-        }
-        prt("[r%d]", a->rd);
+        char dsp[8];
+        rx_index_addr(ctx, dsp, a->sz, a->ld);
+        prt("sc%s.%c\t%s[r%d]", cond[a->cd], size[a->sz], dsp, a->rd);
     } else {
-        prt("r%d", a->rd);
+        prt("sc%s.%c\tr%d", cond[a->cd], size[a->sz], a->rd);
     }
     return true;
 }
Signature · 1 line
2.20.1
#9 lore raw

PATCH v30 9/22 target/rx: Replace operand with prt_ldmi in disassembler

In reply to Yoshinori Sato

From: Richard Henderson <[email protected]>

This has consistency with prt_ri(). It loads all data before beginning output. It uses exactly one call to prt() to emit the full instruction.

Message-Id: <[email protected]>

---
 target/rx/disas.c | 77 +++++++++++++++++------------------------------
 1 file changed, 27 insertions(+), 50 deletions(-)
target/rx/disas.c +27 -50
index 64342537ee..515b365528 100644
@@ -135,18 +135,18 @@ static void rx_index_addr(DisasContext *ctx, char out[8], int ld, int mi)
     sprintf(out, "%u", dsp << (mi < 3 ? mi : 4 - mi));
 }
 
-static void operand(DisasContext *ctx, int ld, int mi, int rs, int rd)
+static void prt_ldmi(DisasContext *ctx, const char *insn,
+                     int ld, int mi, int rs, int rd)
 {
     static const char sizes[][4] = {".b", ".w", ".l", ".uw", ".ub"};
     char dsp[8];
 
     if (ld < 3) {
         rx_index_addr(ctx, dsp, ld, mi);
-        prt("%s[r%d]%s", dsp, rs, sizes[mi]);
+        prt("%s\t%s[r%d]%s, r%d", insn, dsp, rs, sizes[mi], rd);
     } else {
-        prt("r%d", rs);
+        prt("%s\tr%d, r%d", insn, rs, rd);
     }
-    prt(", r%d", rd);
 }
 
 static void prt_ir(DisasContext *ctx, const char *insn, int imm, int rd)
@@ -416,8 +416,7 @@ static bool trans_AND_ir(DisasContext *ctx, arg_AND_ir *a)
 /* and rs,rd */
 static bool trans_AND_mr(DisasContext *ctx, arg_AND_mr *a)
 {
-    prt("and\t");
-    operand(ctx, a->ld, a->mi, a->rs, a->rd);
+    prt_ldmi(ctx, "and", a->ld, a->mi, a->rs, a->rd);
     return true;
 }
 
@@ -440,8 +439,7 @@ static bool trans_OR_ir(DisasContext *ctx, arg_OR_ir *a)
 /* or rs,rd */
 static bool trans_OR_mr(DisasContext *ctx, arg_OR_mr *a)
 {
-    prt("or\t");
-    operand(ctx, a->ld, a->mi, a->rs, a->rd);
+    prt_ldmi(ctx, "or", a->ld, a->mi, a->rs, a->rd);
     return true;
 }
 
@@ -463,8 +461,7 @@ static bool trans_XOR_ir(DisasContext *ctx, arg_XOR_ir *a)
 /* xor rs,rd */
 static bool trans_XOR_mr(DisasContext *ctx, arg_XOR_mr *a)
 {
-    prt("xor\t");
-    operand(ctx, a->ld, a->mi, a->rs, a->rd);
+    prt_ldmi(ctx, "xor", a->ld, a->mi, a->rs, a->rd);
     return true;
 }
 
@@ -479,8 +476,7 @@ static bool trans_TST_ir(DisasContext *ctx, arg_TST_ir *a)
 /* tst rs, rd */
 static bool trans_TST_mr(DisasContext *ctx, arg_TST_mr *a)
 {
-    prt("tst\t");
-    operand(ctx, a->ld, a->mi, a->rs, a->rd);
+    prt_ldmi(ctx, "tst", a->ld, a->mi, a->rs, a->rd);
     return true;
 }
 
@@ -548,8 +544,7 @@ static bool trans_ADD_irr(DisasContext *ctx, arg_ADD_irr *a)
 /* add dsp[rs], rd */
 static bool trans_ADD_mr(DisasContext *ctx, arg_ADD_mr *a)
 {
-    prt("add\t");
-    operand(ctx, a->ld, a->mi, a->rs, a->rd);
+    prt_ldmi(ctx, "add", a->ld, a->mi, a->rs, a->rd);
     return true;
 }
 
@@ -573,8 +568,7 @@ static bool trans_CMP_ir(DisasContext *ctx, arg_CMP_ir *a)
 /* cmp dsp[rs], rs2 */
 static bool trans_CMP_mr(DisasContext *ctx, arg_CMP_mr *a)
 {
-    prt("cmp\t");
-    operand(ctx, a->ld, a->mi, a->rs, a->rd);
+    prt_ldmi(ctx, "cmp", a->ld, a->mi, a->rs, a->rd);
     return true;
 }
 
@@ -589,8 +583,7 @@ static bool trans_SUB_ir(DisasContext *ctx, arg_SUB_ir *a)
 /* sub dsp[rs], rd */
 static bool trans_SUB_mr(DisasContext *ctx, arg_SUB_mr *a)
 {
-    prt("sub\t");
-    operand(ctx, a->ld, a->mi, a->rs, a->rd);
+    prt_ldmi(ctx, "sub", a->ld, a->mi, a->rs, a->rd);
     return true;
 }
 
@@ -611,8 +604,7 @@ static bool trans_SBB_rr(DisasContext *ctx, arg_SBB_rr *a)
 /* sbb dsp[rs], rd */
 static bool trans_SBB_mr(DisasContext *ctx, arg_SBB_mr *a)
 {
-    prt("sbb\t");
-    operand(ctx, a->ld, RX_IM_LONG, a->rs, a->rd);
+    prt_ldmi(ctx, "sbb", a->ld, RX_IM_LONG, a->rs, a->rd);
     return true;
 }
 
@@ -640,8 +632,7 @@ static bool trans_MAX_ir(DisasContext *ctx, arg_MAX_ir *a)
 /* max dsp[rs], rd */
 static bool trans_MAX_mr(DisasContext *ctx, arg_MAX_mr *a)
 {
-    prt("max\t");
-    operand(ctx, a->ld, a->mi, a->rs, a->rd);
+    prt_ldmi(ctx, "max", a->ld, a->mi, a->rs, a->rd);
     return true;
 }
 
@@ -656,8 +647,7 @@ static bool trans_MIN_ir(DisasContext *ctx, arg_MIN_ir *a)
 /* min dsp[rs], rd */
 static bool trans_MIN_mr(DisasContext *ctx, arg_MIN_mr *a)
 {
-    prt("max\t");
-    operand(ctx, a->ld, a->mi, a->rs, a->rd);
+    prt_ldmi(ctx, "min", a->ld, a->mi, a->rs, a->rd);
     return true;
 }
 
@@ -673,8 +663,7 @@ static bool trans_MUL_ir(DisasContext *ctx, arg_MUL_ir *a)
 /* mul dsp[rs], rd */
 static bool trans_MUL_mr(DisasContext *ctx, arg_MUL_mr *a)
 {
-    prt("mul\t");
-    operand(ctx, a->ld, a->mi, a->rs, a->rd);
+    prt_ldmi(ctx, "mul", a->ld, a->mi, a->rs, a->rd);
     return true;
 }
 
@@ -696,8 +685,7 @@ static bool trans_EMUL_ir(DisasContext *ctx, arg_EMUL_ir *a)
 /* emul dsp[rs], rd */
 static bool trans_EMUL_mr(DisasContext *ctx, arg_EMUL_mr *a)
 {
-    prt("emul\t");
-    operand(ctx, a->ld, a->mi, a->rs, a->rd);
+    prt_ldmi(ctx, "emul", a->ld, a->mi, a->rs, a->rd);
     return true;
 }
 
@@ -712,8 +700,7 @@ static bool trans_EMULU_ir(DisasContext *ctx, arg_EMULU_ir *a)
 /* emulu dsp[rs], rd */
 static bool trans_EMULU_mr(DisasContext *ctx, arg_EMULU_mr *a)
 {
-    prt("emulu\t");
-    operand(ctx, a->ld, a->mi, a->rs, a->rd);
+    prt_ldmi(ctx, "emulu", a->ld, a->mi, a->rs, a->rd);
     return true;
 }
 
@@ -728,8 +715,7 @@ static bool trans_DIV_ir(DisasContext *ctx, arg_DIV_ir *a)
 /* div dsp[rs], rd */
 static bool trans_DIV_mr(DisasContext *ctx, arg_DIV_mr *a)
 {
-    prt("div\t");
-    operand(ctx, a->ld, a->mi, a->rs, a->rd);
+    prt_ldmi(ctx, "div", a->ld, a->mi, a->rs, a->rd);
     return true;
 }
 
@@ -744,8 +730,7 @@ static bool trans_DIVU_ir(DisasContext *ctx, arg_DIVU_ir *a)
 /* divu dsp[rs], rd */
 static bool trans_DIVU_mr(DisasContext *ctx, arg_DIVU_mr *a)
 {
-    prt("divu\t");
-    operand(ctx, a->ld, a->mi, a->rs, a->rd);
+    prt_ldmi(ctx, "divu", a->ld, a->mi, a->rs, a->rd);
     return true;
 }
 
@@ -1089,8 +1074,7 @@ static bool trans_FADD_ir(DisasContext *ctx, arg_FADD_ir *a)
 /* fadd rs, rd */
 static bool trans_FADD_mr(DisasContext *ctx, arg_FADD_mr *a)
 {
-    prt("fadd\t");
-    operand(ctx, a->ld, RX_IM_LONG, a->rs, a->rd);
+    prt_ldmi(ctx, "fadd", a->ld, RX_IM_LONG, a->rs, a->rd);
     return true;
 }
 
@@ -1105,8 +1089,7 @@ static bool trans_FCMP_ir(DisasContext *ctx, arg_FCMP_ir *a)
 /* fcmp rs, rd */
 static bool trans_FCMP_mr(DisasContext *ctx, arg_FCMP_mr *a)
 {
-    prt("fcmp\t");
-    operand(ctx, a->ld, RX_IM_LONG, a->rs, a->rd);
+    prt_ldmi(ctx, "fcmp", a->ld, RX_IM_LONG, a->rs, a->rd);
     return true;
 }
 
@@ -1121,8 +1104,7 @@ static bool trans_FSUB_ir(DisasContext *ctx, arg_FSUB_ir *a)
 /* fsub rs, rd */
 static bool trans_FSUB_mr(DisasContext *ctx, arg_FSUB_mr *a)
 {
-    prt("fsub\t");
-    operand(ctx, a->ld, RX_IM_LONG, a->rs, a->rd);
+    prt_ldmi(ctx, "fsub", a->ld, RX_IM_LONG, a->rs, a->rd);
     return true;
 }
 
@@ -1130,8 +1112,7 @@ static bool trans_FSUB_mr(DisasContext *ctx, arg_FSUB_mr *a)
 /* ftoi rs, rd */
 static bool trans_FTOI(DisasContext *ctx, arg_FTOI *a)
 {
-    prt("ftoi\t");
-    operand(ctx, a->ld, RX_IM_LONG, a->rs, a->rd);
+    prt_ldmi(ctx, "ftoi", a->ld, RX_IM_LONG, a->rs, a->rd);
     return true;
 }
 
@@ -1146,8 +1127,7 @@ static bool trans_FMUL_ir(DisasContext *ctx, arg_FMUL_ir *a)
 /* fmul rs, rd */
 static bool trans_FMUL_mr(DisasContext *ctx, arg_FMUL_mr *a)
 {
-    prt("fmul\t");
-    operand(ctx, a->ld, RX_IM_LONG, a->rs, a->rd);
+    prt_ldmi(ctx, "fmul", a->ld, RX_IM_LONG, a->rs, a->rd);
     return true;
 }
 
@@ -1162,8 +1142,7 @@ static bool trans_FDIV_ir(DisasContext *ctx, arg_FDIV_ir *a)
 /* fdiv rs, rd */
 static bool trans_FDIV_mr(DisasContext *ctx, arg_FDIV_mr *a)
 {
-    prt("fdiv\t");
-    operand(ctx, a->ld, RX_IM_LONG, a->rs, a->rd);
+    prt_ldmi(ctx, "fdiv", a->ld, RX_IM_LONG, a->rs, a->rd);
     return true;
 }
 
@@ -1171,8 +1150,7 @@ static bool trans_FDIV_mr(DisasContext *ctx, arg_FDIV_mr *a)
 /* round rs, rd */
 static bool trans_ROUND(DisasContext *ctx, arg_ROUND *a)
 {
-    prt("round\t");
-    operand(ctx, a->ld, RX_IM_LONG, a->rs, a->rd);
+    prt_ldmi(ctx, "round", a->ld, RX_IM_LONG, a->rs, a->rd);
     return true;
 }
 
@@ -1180,8 +1158,7 @@ static bool trans_ROUND(DisasContext *ctx, arg_ROUND *a)
 /* itof dsp[rs], rd */
 static bool trans_ITOF(DisasContext *ctx, arg_ITOF *a)
 {
-    prt("itof\t");
-    operand(ctx, a->ld, RX_IM_LONG, a->rs, a->rd);
+    prt_ldmi(ctx, "itof", a->ld, RX_IM_LONG, a->rs, a->rd);
     return true;
 }
 
Signature · 1 line
2.20.1
#10 lore raw

PATCH v30 10/22 target/rx: Use prt_ldmi for XCHG_mr disassembly

In reply to Yoshinori Sato

From: Richard Henderson <[email protected]>

Note that the ld == 3 case handled by prt_ldmi is decoded as XCHG_rr and cannot appear here.

Message-Id: <[email protected]>

---
 target/rx/disas.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)
target/rx/disas.c +1 -7
index 515b365528..db10385fd0 100644
@@ -366,13 +366,7 @@ static bool trans_XCHG_rr(DisasContext *ctx, arg_XCHG_rr *a)
 /* xchg dsp[rs].<mi>,rd */
 static bool trans_XCHG_mr(DisasContext *ctx, arg_XCHG_mr *a)
 {
-    static const char msize[][4] = {
-        "b", "w", "l", "ub", "uw",
-    };
-    char dsp[8];
-
-    rx_index_addr(ctx, dsp, a->ld, a->mi);
-    prt("xchg\t%s[r%d].%s, r%d", dsp, a->rs, msize[a->mi], a->rd);
+    prt_ldmi(ctx, "xchg", a->ld, a->mi, a->rs, a->rd);
     return true;
 }
 
Signature · 1 line
2.20.1
#11 lore raw

PATCH v30 11/22 target/rx: Emit all disassembly in one prt()

In reply to Yoshinori Sato

From: Richard Henderson <[email protected]>

Many of the multi-part prints have been eliminated by previous patches. Eliminate the rest of them.

Message-Id: <[email protected]>

---
 target/rx/disas.c | 75 ++++++++++++++++++++++++-----------------------
 1 file changed, 39 insertions(+), 36 deletions(-)
target/rx/disas.c +39 -36
index db10385fd0..ebc1a44249 100644
@@ -228,24 +228,21 @@ static bool trans_MOV_ra(DisasContext *ctx, arg_MOV_ra *a)
 /* mov.[bwl] rs,rd */
 static bool trans_MOV_mm(DisasContext *ctx, arg_MOV_mm *a)
 {
-    char dspd[8], dsps[8];
+    char dspd[8], dsps[8], szc = size[a->sz];
 
-    prt("mov.%c\t", size[a->sz]);
     if (a->lds == 3 && a->ldd == 3) {
         /* mov.[bwl] rs,rd */
-        prt("r%d, r%d", a->rs, a->rd);
-        return true;
-    }
-    if (a->lds == 3) {
+        prt("mov.%c\tr%d, r%d", szc, a->rs, a->rd);
+    } else if (a->lds == 3) {
         rx_index_addr(ctx, dspd, a->ldd, a->sz);
-        prt("r%d, %s[r%d]", a->rs, dspd, a->rd);
+        prt("mov.%c\tr%d, %s[r%d]", szc, a->rs, dspd, a->rd);
     } else if (a->ldd == 3) {
         rx_index_addr(ctx, dsps, a->lds, a->sz);
-        prt("%s[r%d], r%d", dsps, a->rs, a->rd);
+        prt("mov.%c\t%s[r%d], r%d", szc, dsps, a->rs, a->rd);
     } else {
         rx_index_addr(ctx, dsps, a->lds, a->sz);
         rx_index_addr(ctx, dspd, a->ldd, a->sz);
-        prt("%s[r%d], %s[r%d]", dsps, a->rs, dspd, a->rd);
+        prt("mov.%c\t%s[r%d], %s[r%d]", szc, dsps, a->rs, dspd, a->rd);
     }
     return true;
 }
@@ -254,8 +251,11 @@ static bool trans_MOV_mm(DisasContext *ctx, arg_MOV_mm *a)
 /* mov.[bwl] rs,[-rd] */
 static bool trans_MOV_rp(DisasContext *ctx, arg_MOV_rp *a)
 {
-    prt("mov.%c\tr%d, ", size[a->sz], a->rs);
-    prt((a->ad == 0) ? "[r%d+]" : "[-r%d]", a->rd);
+    if (a->ad) {
+        prt("mov.%c\tr%d, [-r%d]", size[a->sz], a->rs, a->rd);
+    } else {
+        prt("mov.%c\tr%d, [r%d+]", size[a->sz], a->rs, a->rd);
+    }
     return true;
 }
 
@@ -263,9 +263,11 @@ static bool trans_MOV_rp(DisasContext *ctx, arg_MOV_rp *a)
 /* mov.[bwl] [-rd],rs */
 static bool trans_MOV_pr(DisasContext *ctx, arg_MOV_pr *a)
 {
-    prt("mov.%c\t", size[a->sz]);
-    prt((a->ad == 0) ? "[r%d+]" : "[-r%d]", a->rd);
-    prt(", r%d", a->rs);
+    if (a->ad) {
+        prt("mov.%c\t[-r%d], r%d", size[a->sz], a->rd, a->rs);
+    } else {
+        prt("mov.%c\t[r%d+], r%d", size[a->sz], a->rd, a->rs);
+    }
     return true;
 }
 
@@ -299,9 +301,11 @@ static bool trans_MOVU_ar(DisasContext *ctx, arg_MOVU_ar *a)
 /* movu.[bw] [-rs],rd */
 static bool trans_MOVU_pr(DisasContext *ctx, arg_MOVU_pr *a)
 {
-    prt("movu.%c\t", size[a->sz]);
-    prt((a->ad == 0) ? "[r%d+]" : "[-r%d]", a->rd);
-    prt(", r%d", a->rs);
+    if (a->ad) {
+        prt("movu.%c\t[-r%d], r%d", size[a->sz], a->rd, a->rs);
+    } else {
+        prt("movu.%c\t[r%d+], r%d", size[a->sz], a->rd, a->rs);
+    }
     return true;
 }
 
@@ -478,11 +482,11 @@ static bool trans_TST_mr(DisasContext *ctx, arg_TST_mr *a)
 /* not rs, rd */
 static bool trans_NOT_rr(DisasContext *ctx, arg_NOT_rr *a)
 {
-    prt("not\t");
     if (a->rs != a->rd) {
-        prt("r%d, ", a->rs);
+        prt("not\tr%d, r%d", a->rs, a->rd);
+    } else {
+        prt("not\tr%d", a->rs);
     }
-    prt("r%d", a->rd);
     return true;
 }
 
@@ -490,11 +494,11 @@ static bool trans_NOT_rr(DisasContext *ctx, arg_NOT_rr *a)
 /* neg rs, rd */
 static bool trans_NEG_rr(DisasContext *ctx, arg_NEG_rr *a)
 {
-    prt("neg\t");
     if (a->rs != a->rd) {
-        prt("r%d, ", a->rs);
+        prt("neg\tr%d, r%d", a->rs, a->rd);
+    } else {
+        prt("neg\tr%d", a->rs);
     }
-    prt("r%d", a->rd);
     return true;
 }
 
@@ -606,11 +610,10 @@ static bool trans_SBB_mr(DisasContext *ctx, arg_SBB_mr *a)
 /* abs rs, rd */
 static bool trans_ABS_rr(DisasContext *ctx, arg_ABS_rr *a)
 {
-    prt("abs\t");
-    if (a->rs == a->rd) {
-        prt("r%d", a->rd);
+    if (a->rs != a->rd) {
+        prt("abs\tr%d, r%d", a->rs, a->rd);
     } else {
-        prt("r%d, r%d", a->rs, a->rd);
+        prt("abs\tr%d", a->rs);
     }
     return true;
 }
@@ -733,11 +736,11 @@ static bool trans_DIVU_mr(DisasContext *ctx, arg_DIVU_mr *a)
 /* shll #imm:5, rs, rd */
 static bool trans_SHLL_irr(DisasContext *ctx, arg_SHLL_irr *a)
 {
-    prt("shll\t#%d, ", a->imm);
     if (a->rs2 != a->rd) {
-        prt("r%d, ", a->rs2);
+        prt("shll\t#%d, r%d, r%d", a->imm, a->rs2, a->rd);
+    } else {
+        prt("shll\t#%d, r%d", a->imm, a->rd);
     }
-    prt("r%d", a->rd);
     return true;
 }
 
@@ -752,11 +755,11 @@ static bool trans_SHLL_rr(DisasContext *ctx, arg_SHLL_rr *a)
 /* shar #imm:5, rs, rd */
 static bool trans_SHAR_irr(DisasContext *ctx, arg_SHAR_irr *a)
 {
-    prt("shar\t#%d,", a->imm);
     if (a->rs2 != a->rd) {
-        prt("r%d, ", a->rs2);
+        prt("shar\t#%d, r%d, r%d", a->imm, a->rs2, a->rd);
+    } else {
+        prt("shar\t#%d, r%d", a->imm, a->rd);
     }
-    prt("r%d", a->rd);
     return true;
 }
 
@@ -771,11 +774,11 @@ static bool trans_SHAR_rr(DisasContext *ctx, arg_SHAR_rr *a)
 /* shlr #imm:5, rs, rd */
 static bool trans_SHLR_irr(DisasContext *ctx, arg_SHLR_irr *a)
 {
-    prt("shlr\t#%d, ", a->imm);
     if (a->rs2 != a->rd) {
-        prt("r%d, ", a->rs2);
+        prt("shlr\t#%d, r%d, r%d", a->imm, a->rs2, a->rd);
+    } else {
+        prt("shlr\t#%d, r%d", a->imm, a->rd);
     }
-    prt("r%d", a->rd);
     return true;
 }
 
Signature · 1 line
2.20.1
#12 lore raw

PATCH v30 12/22 target/rx: Collect all bytes during disassembly

In reply to Yoshinori Sato

From: Richard Henderson <[email protected]>

Collected, to be used in the next patch.

Message-Id: <[email protected]>

---
 target/rx/disas.c | 62 ++++++++++++++++++++++++++++++++---------------
 1 file changed, 42 insertions(+), 20 deletions(-)
target/rx/disas.c +42 -20
index ebc1a44249..5a32a87534 100644
@@ -25,43 +25,59 @@ typedef struct DisasContext {
     disassemble_info *dis;
     uint32_t addr;
     uint32_t pc;
+    uint8_t len;
+    uint8_t bytes[8];
 } DisasContext;
 
 
 static uint32_t decode_load_bytes(DisasContext *ctx, uint32_t insn,
-                           int i, int n)
+                                  int i, int n)
 {
-    bfd_byte buf;
+    uint32_t addr = ctx->addr;
+
+    g_assert(ctx->len == i);
+    g_assert(n <= ARRAY_SIZE(ctx->bytes));
+
     while (++i <= n) {
-        ctx->dis->read_memory_func(ctx->addr++, &buf, 1, ctx->dis);
-        insn |= buf << (32 - i * 8);
+        ctx->dis->read_memory_func(addr++, &ctx->bytes[i - 1], 1, ctx->dis);
+        insn |= ctx->bytes[i - 1] << (32 - i * 8);
     }
+    ctx->addr = addr;
+    ctx->len = n;
+
     return insn;
 }
 
 static int32_t li(DisasContext *ctx, int sz)
 {
-    int32_t addr;
-    bfd_byte buf[4];
-    addr = ctx->addr;
+    uint32_t addr = ctx->addr;
+    uintptr_t len = ctx->len;
 
     switch (sz) {
     case 1:
+        g_assert(len + 1 <= ARRAY_SIZE(ctx->bytes));
         ctx->addr += 1;
-        ctx->dis->read_memory_func(addr, buf, 1, ctx->dis);
-        return (int8_t)buf[0];
+        ctx->len += 1;
+        ctx->dis->read_memory_func(addr, ctx->bytes + len, 1, ctx->dis);
+        return (int8_t)ctx->bytes[len];
     case 2:
+        g_assert(len + 2 <= ARRAY_SIZE(ctx->bytes));
         ctx->addr += 2;
-        ctx->dis->read_memory_func(addr, buf, 2, ctx->dis);
-        return ldsw_le_p(buf);
+        ctx->len += 2;
+        ctx->dis->read_memory_func(addr, ctx->bytes + len, 2, ctx->dis);
+        return ldsw_le_p(ctx->bytes + len);
     case 3:
+        g_assert(len + 3 <= ARRAY_SIZE(ctx->bytes));
         ctx->addr += 3;
-        ctx->dis->read_memory_func(addr, buf, 3, ctx->dis);
-        return (int8_t)buf[2] << 16 | lduw_le_p(buf);
+        ctx->len += 3;
+        ctx->dis->read_memory_func(addr, ctx->bytes + len, 3, ctx->dis);
+        return (int8_t)ctx->bytes[len + 2] << 16 | lduw_le_p(ctx->bytes + len);
     case 0:
+        g_assert(len + 4 <= ARRAY_SIZE(ctx->bytes));
         ctx->addr += 4;
-        ctx->dis->read_memory_func(addr, buf, 4, ctx->dis);
-        return ldl_le_p(buf);
+        ctx->len += 4;
+        ctx->dis->read_memory_func(addr, ctx->bytes + len, 4, ctx->dis);
+        return ldl_le_p(ctx->bytes + len);
     default:
         g_assert_not_reached();
     }
@@ -110,7 +126,7 @@ static const char psw[] = {
 static void rx_index_addr(DisasContext *ctx, char out[8], int ld, int mi)
 {
     uint32_t addr = ctx->addr;
-    uint8_t buf[2];
+    uintptr_t len = ctx->len;
     uint16_t dsp;
 
     switch (ld) {
@@ -119,14 +135,18 @@ static void rx_index_addr(DisasContext *ctx, char out[8], int ld, int mi)
         out[0] = '\0';
         return;
     case 1:
+        g_assert(len + 1 <= ARRAY_SIZE(ctx->bytes));
         ctx->addr += 1;
-        ctx->dis->read_memory_func(addr, buf, 1, ctx->dis);
-        dsp = buf[0];
+        ctx->len += 1;
+        ctx->dis->read_memory_func(addr, ctx->bytes + len, 1, ctx->dis);
+        dsp = ctx->bytes[len];
         break;
     case 2:
+        g_assert(len + 2 <= ARRAY_SIZE(ctx->bytes));
         ctx->addr += 2;
-        ctx->dis->read_memory_func(addr, buf, 2, ctx->dis);
-        dsp = lduw_le_p(buf);
+        ctx->len += 2;
+        ctx->dis->read_memory_func(addr, ctx->bytes + len, 2, ctx->dis);
+        dsp = lduw_le_p(ctx->bytes + len);
         break;
     default:
         g_assert_not_reached();
@@ -1392,8 +1412,10 @@ int print_insn_rx(bfd_vma addr, disassemble_info *dis)
     DisasContext ctx;
     uint32_t insn;
     int i;
+
     ctx.dis = dis;
     ctx.pc = ctx.addr = addr;
+    ctx.len = 0;
 
     insn = decode_load(&ctx);
     if (!decode(&ctx, insn)) {
Signature · 1 line
2.20.1
#13 lore raw

PATCH v30 13/22 target/rx: Dump bytes for each insn during disassembly

In reply to Yoshinori Sato

From: Richard Henderson <[email protected]>

There are so many different forms of each RX instruction that it will be very useful to be able to look at the bytes to see on which path a bug may lie.

Message-Id: <[email protected]>

---
 target/rx/disas.c | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)
target/rx/disas.c +15 -1
index 5a32a87534..d73b53db44 100644
@@ -102,7 +102,21 @@ static int bdsp_s(DisasContext *ctx, int d)
 /* Include the auto-generated decoder.  */
 #include "decode.inc.c"
 
-#define prt(...) (ctx->dis->fprintf_func)((ctx->dis->stream), __VA_ARGS__)
+static void dump_bytes(DisasContext *ctx)
+{
+    int i, len = ctx->len;
+
+    for (i = 0; i < len; ++i) {
+        ctx->dis->fprintf_func(ctx->dis->stream, "%02x ", ctx->bytes[i]);
+    }
+    ctx->dis->fprintf_func(ctx->dis->stream, "%*c", (8 - i) * 3, '\t');
+}
+
+#define prt(...) \
+    do {                                                        \
+        dump_bytes(ctx);                                        \
+        ctx->dis->fprintf_func(ctx->dis->stream, __VA_ARGS__);  \
+    } while (0)
 
 #define RX_MEMORY_BYTE 0
 #define RX_MEMORY_WORD 1
Signature · 1 line
2.20.1
#14 lore raw

PATCH v30 14/22 hw/intc: RX62N interrupt controller (ICUa)

In reply to Yoshinori Sato

This implementation supported only ICUa.
Hardware manual.
https://www.renesas.com/us/en/doc/products/mpumcu/doc/rx_family/r01uh0033ej0140_rx62n.pdf

Message-Id: <[email protected]>

---
 include/hw/intc/rx_icu.h |  56 ++++++
 hw/intc/rx_icu.c         | 379 +++++++++++++++++++++++++++++++++++++++
 hw/intc/Kconfig          |   3 +
 hw/intc/Makefile.objs    |   1 +
 4 files changed, 439 insertions(+)
 create mode 100644 include/hw/intc/rx_icu.h
 create mode 100644 hw/intc/rx_icu.c
include/hw/intc/rx_icu.h new file +56 -0
new file mode 100644
index 0000000000..acfcf06aef
@@ -0,0 +1,56 @@
+#ifndef RX_ICU_H
+#define RX_ICU_H
+
+#include "qemu-common.h"
+#include "hw/irq.h"
+
+enum TRG_MODE {
+    TRG_LEVEL = 0,
+    TRG_NEDGE = 1,      /* Falling */
+    TRG_PEDGE = 2,      /* Raising */
+    TRG_BEDGE = 3,      /* Both */
+};
+
+struct IRQSource {
+    enum TRG_MODE sense;
+    int level;
+};
+
+enum {
+    /* Software interrupt request */
+    SWI = 27,
+    NR_IRQS = 256,
+};
+
+struct RXICUState {
+    SysBusDevice parent_obj;
+
+    MemoryRegion memory;
+    struct IRQSource src[NR_IRQS];
+    char *icutype;
+    uint32_t nr_irqs;
+    uint32_t *map;
+    uint32_t nr_sense;
+    uint32_t *init_sense;
+
+    uint8_t ir[NR_IRQS];
+    uint8_t dtcer[NR_IRQS];
+    uint8_t ier[NR_IRQS / 8];
+    uint8_t ipr[142];
+    uint8_t dmasr[4];
+    uint16_t fir;
+    uint8_t nmisr;
+    uint8_t nmier;
+    uint8_t nmiclr;
+    uint8_t nmicr;
+    int req_irq;
+    qemu_irq _irq;
+    qemu_irq _fir;
+    qemu_irq _swi;
+};
+typedef struct RXICUState RXICUState;
+
+#define TYPE_RXICU "rx-icu"
+#define RXICU(obj) OBJECT_CHECK(RXICUState, (obj), TYPE_RXICU)
+
+#endif /* RX_ICU_H */
hw/intc/rx_icu.c new file +379 -0

379 lines not on this page · raw message

hw/intc/Kconfig +3 -0
index a189d6fedd..f562342bab 100644
@@ -61,3 +61,6 @@ config S390_FLIC_KVM
 
 config OMPIC
     bool
+
+config RX_ICU
+    bool
hw/intc/Makefile.objs +1 -0
index f726d87532..f17cbd1a9f 100644
@@ -49,3 +49,4 @@ obj-$(CONFIG_ARM_GIC) += arm_gicv3_cpuif.o
 obj-$(CONFIG_MIPS_CPS) += mips_gic.o
 obj-$(CONFIG_NIOS2) += nios2_iic.o
 obj-$(CONFIG_OMPIC) += ompic.o
+obj-$(CONFIG_RX) += rx_icu.o
Signature · 1 line
2.20.1
#15 lore raw

PATCH v30 15/22 hw/timer: RX62N internal timer modules

In reply to Yoshinori Sato

renesas_tmr: 8bit timer modules.
renesas_cmt: 16bit compare match timer modules.
This part use many renesas's CPU.
Hardware manual.
https://www.renesas.com/us/en/doc/products/mpumcu/doc/rx_family/r01uh0033ej0140_rx62n.pdf

Message-Id: <[email protected]>

---
 include/hw/timer/renesas_cmt.h |  38 +++
 include/hw/timer/renesas_tmr.h |  53 ++++
 hw/timer/renesas_cmt.c         | 278 ++++++++++++++++++++
 hw/timer/renesas_tmr.c         | 458 +++++++++++++++++++++++++++++++++
 hw/timer/Kconfig               |   6 +
 hw/timer/Makefile.objs         |   3 +
 6 files changed, 836 insertions(+)
 create mode 100644 include/hw/timer/renesas_cmt.h
 create mode 100644 include/hw/timer/renesas_tmr.h
 create mode 100644 hw/timer/renesas_cmt.c
 create mode 100644 hw/timer/renesas_tmr.c
include/hw/timer/renesas_cmt.h new file +38 -0
new file mode 100644
index 0000000000..acd25c6e0b
@@ -0,0 +1,38 @@
+/*
+ * Renesas Compare-match timer Object
+ *
+ * Copyright (c) 2019 Yoshinori Sato
+ *
+ * This code is licensed under the GPL version 2 or later.
+ *
+ */
+
+#ifndef HW_RENESAS_CMT_H
+#define HW_RENESAS_CMT_H
+
+#include "hw/sysbus.h"
+
+#define TYPE_RENESAS_CMT "renesas-cmt"
+#define RCMT(obj) OBJECT_CHECK(RCMTState, (obj), TYPE_RENESAS_CMT)
+
+enum {
+    CMT_CH = 2,
+    CMT_NR_IRQ = 1 * CMT_CH,
+};
+
+typedef struct RCMTState {
+    SysBusDevice parent_obj;
+
+    uint64_t input_freq;
+    MemoryRegion memory;
+
+    uint16_t cmstr;
+    uint16_t cmcr[CMT_CH];
+    uint16_t cmcnt[CMT_CH];
+    uint16_t cmcor[CMT_CH];
+    int64_t tick[CMT_CH];
+    qemu_irq cmi[CMT_CH];
+    QEMUTimer *timer[CMT_CH];
+} RCMTState;
+
+#endif
include/hw/timer/renesas_tmr.h new file +53 -0

53 lines not on this page · raw message

hw/timer/renesas_cmt.c new file +278 -0

278 lines not on this page · raw message

hw/timer/renesas_tmr.c new file +458 -0

458 lines not on this page · raw message

hw/timer/Kconfig +6 -0
index 59b3f44d69..ec26e54fcc 100644
@@ -35,3 +35,9 @@ config CMSDK_APB_TIMER
 config CMSDK_APB_DUALTIMER
     bool
     select PTIMER
+
+config RENESAS_TMR8
+    bool
+
+config RENESAS_CMT
+    bool
hw/timer/Makefile.objs +3 -0
index dece235fd7..d9b78dc248 100644
@@ -28,6 +28,9 @@ common-obj-$(CONFIG_MIPS_CPS) += mips_gictimer.o
 
 common-obj-$(CONFIG_ALLWINNER_A10_PIT) += allwinner-a10-pit.o
 
+obj-$(CONFIG_RENESAS_TMR8) += renesas_tmr.o
+obj-$(CONFIG_RENESAS_CMT) += renesas_cmt.o
+
 common-obj-$(CONFIG_STM32F2XX_TIMER) += stm32f2xx_timer.o
 common-obj-$(CONFIG_ASPEED_SOC) += aspeed_timer.o
 
Signature · 1 line
2.20.1
#16 lore raw

PATCH v30 16/22 hw/char: RX62N serial communication interface (SCI)

In reply to Yoshinori Sato

This module supported only non FIFO type.
Hardware manual.
https://www.renesas.com/us/en/doc/products/mpumcu/doc/rx_family/r01uh0033ej0140_rx62n.pdf

Message-Id: <[email protected]>

---
 include/hw/char/renesas_sci.h |  45 +++++
 hw/char/renesas_sci.c         | 342 ++++++++++++++++++++++++++++++++++
 hw/char/Kconfig               |   3 +
 hw/char/Makefile.objs         |   1 +
 4 files changed, 391 insertions(+)
 create mode 100644 include/hw/char/renesas_sci.h
 create mode 100644 hw/char/renesas_sci.c
include/hw/char/renesas_sci.h new file +45 -0
new file mode 100644
index 0000000000..50d1336944
@@ -0,0 +1,45 @@
+/*
+ * Renesas Serial Communication Interface
+ *
+ * Copyright (c) 2018 Yoshinori Sato
+ *
+ * This code is licensed under the GPL version 2 or later.
+ *
+ */
+
+#include "chardev/char-fe.h"
+#include "qemu/timer.h"
+#include "hw/sysbus.h"
+
+#define TYPE_RENESAS_SCI "renesas-sci"
+#define RSCI(obj) OBJECT_CHECK(RSCIState, (obj), TYPE_RENESAS_SCI)
+
+enum {
+    ERI = 0,
+    RXI = 1,
+    TXI = 2,
+    TEI = 3,
+    SCI_NR_IRQ = 4,
+};
+
+typedef struct {
+    SysBusDevice parent_obj;
+    MemoryRegion memory;
+
+    uint8_t smr;
+    uint8_t brr;
+    uint8_t scr;
+    uint8_t tdr;
+    uint8_t ssr;
+    uint8_t rdr;
+    uint8_t scmr;
+    uint8_t semr;
+
+    uint8_t read_ssr;
+    int64_t trtime;
+    int64_t rx_next;
+    QEMUTimer *timer;
+    CharBackend chr;
+    uint64_t input_freq;
+    qemu_irq irq[SCI_NR_IRQ];
+} RSCIState;
hw/char/renesas_sci.c new file +342 -0

342 lines not on this page · raw message

hw/char/Kconfig +3 -0
index 40e7a8b8bb..874627520c 100644
@@ -46,3 +46,6 @@ config SCLPCONSOLE
 
 config TERMINAL3270
     bool
+
+config RENESAS_SCI
+    bool
hw/char/Makefile.objs +1 -0
index 9e9a6c1aff..996c170750 100644
@@ -20,6 +20,7 @@ common-obj-$(CONFIG_SH4) += sh_serial.o
 common-obj-$(CONFIG_DIGIC) += digic-uart.o
 common-obj-$(CONFIG_STM32F2XX_USART) += stm32f2xx_usart.o
 common-obj-$(CONFIG_RASPI) += bcm2835_aux.o
+common-obj-$(CONFIG_RENESAS_SCI) += renesas_sci.o
 
 common-obj-$(CONFIG_CMSDK_APB_UART) += cmsdk-apb-uart.o
 common-obj-$(CONFIG_ETRAXFS) += etraxfs_ser.o
Signature · 1 line
2.20.1
#17 lore raw

PATCH v30 17/22 hw/rx: RX Target hardware definition

In reply to Yoshinori Sato

rx62n - RX62N cpu.
rx-virt - RX QEMU virtual target.

Message-Id: <[email protected]>

Message-Id: <[email protected]>

[PMD: Use TYPE_RX62N_CPU, use #define for RX62N_NR_TMR/CMT/SCI,
renamed CPU -> MCU, device -> microcontroller]

---
v23 changes.
Add missing includes.

v21 changes.
rx_load_image move to rx-virt.c

v19: Fixed typo (Peter Maydell)

---
 include/hw/rx/rx.h    |   7 ++
 include/hw/rx/rx62n.h |  91 ++++++++++++++++
 hw/rx/rx-virt.c       | 140 +++++++++++++++++++++++++
 hw/rx/rx62n.c         | 239 ++++++++++++++++++++++++++++++++++++++++++
 hw/rx/Kconfig         |  14 +++
 hw/rx/Makefile.objs   |   2 +
 6 files changed, 493 insertions(+)
 create mode 100644 include/hw/rx/rx.h
 create mode 100644 include/hw/rx/rx62n.h
 create mode 100644 hw/rx/rx-virt.c
 create mode 100644 hw/rx/rx62n.c
 create mode 100644 hw/rx/Kconfig
 create mode 100644 hw/rx/Makefile.objs
include/hw/rx/rx.h new file +7 -0
new file mode 100644
index 0000000000..ff5924b81f
@@ -0,0 +1,7 @@
+#ifndef QEMU_RX_H
+#define QEMU_RX_H
+/* Definitions for RX board emulation.  */
+
+#include "target/rx/cpu-qom.h"
+
+#endif
include/hw/rx/rx62n.h new file +91 -0

91 lines not on this page · raw message

hw/rx/rx-virt.c new file +140 -0

140 lines not on this page · raw message

hw/rx/rx62n.c new file +239 -0

239 lines not on this page · raw message

hw/rx/Kconfig new file +14 -0
new file mode 100644
index 0000000000..a07490a65e
@@ -0,0 +1,14 @@
+config RX
+    bool
+
+config RX62N
+    bool
+    select RX
+    select RX_ICU
+    select RENESAS_TMR8
+    select RENESAS_CMT
+    select RENESAS_SCI
+
+config RX_VIRT
+    bool
+    select RX62N
hw/rx/Makefile.objs new file +2 -0
new file mode 100644
index 0000000000..63f8be0e82
@@ -0,0 +1,2 @@
+obj-$(CONFIG_RX62N) += rx62n.o
+obj-$(CONFIG_RX_VIRT) += rx-virt.o
Signature · 1 line
2.20.1
#18 lore raw

PATCH v30 18/22 hw/rx: Honor -accel qtest

In reply to Yoshinori Sato

From: Richard Henderson <[email protected]>

Issue an error if no kernel, no bios, and not qtest'ing. Fixes make check-qtest-rx: test/qom-test.

Message-Id: <[email protected]>

---
We could squash this with the previous patch

---
 hw/rx/rx62n.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
hw/rx/rx62n.c +9 -1
index bd4cd4b6ea..c488934f09 100644
@@ -21,12 +21,14 @@
 
 #include "qemu/osdep.h"
 #include "qapi/error.h"
+#include "qemu/error-report.h"
 #include "hw/hw.h"
 #include "hw/rx/rx62n.h"
 #include "hw/loader.h"
 #include "hw/sysbus.h"
 #include "hw/qdev-properties.h"
 #include "sysemu/sysemu.h"
+#include "sysemu/qtest.h"
 #include "cpu.h"
 
 /*
@@ -191,8 +193,14 @@ static void rx62n_realize(DeviceState *dev, Error **errp)
     memory_region_init_rom(&s->c_flash, NULL, "codeflash",
                            RX62N_CFLASH_SIZE, errp);
     memory_region_add_subregion(s->sysmem, RX62N_CFLASH_BASE, &s->c_flash);
+
     if (!s->kernel) {
-        rom_add_file_fixed(bios_name, RX62N_CFLASH_BASE, 0);
+        if (bios_name) {
+            rom_add_file_fixed(bios_name, RX62N_CFLASH_BASE, 0);
+        }  else if (!qtest_enabled()) {
+            error_report("No bios or kernel specified");
+            exit(1);
+        }
     }
 
     /* Initialize CPU */
Signature · 1 line
2.20.1
#19 lore raw

PATCH v30 19/22 hw/rx: Restrict the RX62N microcontroller to the RX62N CPU core

In reply to Yoshinori Sato

From: Philippe Mathieu-Daudé <[email protected]>

While the VIRT machine can use different microcontrollers, the RX62N microcontroller is tied to the RX62N CPU core.

---
 hw/rx/rx-virt.c | 2 ++
 1 file changed, 2 insertions(+)
hw/rx/rx-virt.c +2 -0
index 017941b996..f58fa3e5a8 100644
@@ -17,6 +17,7 @@
  */
 
 #include "qemu/osdep.h"
+#include "qemu/error-report.h"
 #include "qapi/error.h"
 #include "qemu-common.h"
 #include "cpu.h"
@@ -56,6 +57,7 @@ static void rx_load_image(RXCPU *cpu, const char *filename,
 
 static void rxvirt_init(MachineState *machine)
 {
+    MachineClass *mc = MACHINE_GET_CLASS(machine);
     RX62NState *s = g_new(RX62NState, 1);
     MemoryRegion *sysmem = get_system_memory();
     MemoryRegion *sdram = g_new(MemoryRegion, 1);
Signature · 1 line
2.20.1
#20 lore raw

PATCH v30 20/22 Add rx-softmmu

In reply to Yoshinori Sato

Message-Id: <[email protected]>

pick ed65c02993 target/rx: Add RX to SysEmuTarget pick 01372568ae tests: Add rx to machine-none-test.c [PMD: Squashed patches from Richard Henderson modifying
qapi/common.json and tests/machine-none-test.c]

---
 configure                       | 11 ++++++++++-
 default-configs/rx-softmmu.mak  |  3 +++
 qapi/machine.json               |  3 ++-
 include/exec/poison.h           |  1 +
 include/sysemu/arch_init.h      |  1 +
 arch_init.c                     |  2 ++
 tests/qtest/machine-none-test.c |  1 +
 hw/Kconfig                      |  1 +
 8 files changed, 21 insertions(+), 2 deletions(-)
 create mode 100644 default-configs/rx-softmmu.mak
configure +10 -1
index 115dc38085..ffbd54726f 100755
@@ -4104,7 +4104,7 @@ fi
 fdt_required=no
 for target in $target_list; do
   case $target in
-    aarch64*-softmmu|arm*-softmmu|ppc*-softmmu|microblaze*-softmmu|mips64el-softmmu|riscv*-softmmu)
+    aarch64*-softmmu|arm*-softmmu|ppc*-softmmu|microblaze*-softmmu|mips64el-softmmu|riscv*-softmmu|rx-softmmu)
       fdt_required=yes
     ;;
   esac
@@ -7744,6 +7744,12 @@ case "$target_name" in
     mttcg=yes
     gdb_xml_files="riscv-64bit-cpu.xml riscv-64bit-fpu.xml riscv-64bit-csr.xml riscv-64bit-virtual.xml"
   ;;
+  rx)
+    TARGET_ARCH=rx
+    bflt="yes"
+    target_compiler=$cross_cc_rx
+    gdb_xml_files="rx-core.xml"
+  ;;
   sh4|sh4eb)
     TARGET_ARCH=sh4
     bflt="yes"
@@ -7925,6 +7931,9 @@ for i in $ARCH $TARGET_BASE_ARCH ; do
   riscv*)
     disas_config "RISCV"
   ;;
+  rx)
+    disas_config "RX"
+  ;;
   s390*)
     disas_config "S390"
   ;;
default-configs/rx-softmmu.mak new file +3 -0
new file mode 100644
index 0000000000..a3eecefb11
@@ -0,0 +1,3 @@
+# Default configuration for rx-softmmu
+
+CONFIG_RX_VIRT=y
qapi/machine.json +2 -1
index b3d30bc816..57703c9696 100644
@@ -21,6 +21,7 @@
 #        is true even for "qemu-system-x86_64".
 #
 # ppcemb: dropped in 3.1
+# rx: added in 5.0
 #
 # Since: 3.0
 ##
@@ -28,7 +29,7 @@
   'data' : [ 'aarch64', 'alpha', 'arm', 'cris', 'hppa', 'i386', 'lm32',
              'm68k', 'microblaze', 'microblazeel', 'mips', 'mips64',
              'mips64el', 'mipsel', 'moxie', 'nios2', 'or1k', 'ppc',
-             'ppc64', 'riscv32', 'riscv64', 's390x', 'sh4',
+             'ppc64', 'riscv32', 'riscv64', 'rx', 's390x', 'sh4',
              'sh4eb', 'sparc', 'sparc64', 'tricore', 'unicore32',
              'x86_64', 'xtensa', 'xtensaeb' ] }
 
include/exec/poison.h +1 -0
index 955eb863ab..7b9ac361dc 100644
@@ -26,6 +26,7 @@
 #pragma GCC poison TARGET_PPC
 #pragma GCC poison TARGET_PPC64
 #pragma GCC poison TARGET_ABI32
+#pragma GCC poison TARGET_RX
 #pragma GCC poison TARGET_S390X
 #pragma GCC poison TARGET_SH4
 #pragma GCC poison TARGET_SPARC
include/sysemu/arch_init.h +1 -0
index 62c6fe4cf1..6c011acc52 100644
@@ -24,6 +24,7 @@ enum {
     QEMU_ARCH_NIOS2 = (1 << 17),
     QEMU_ARCH_HPPA = (1 << 18),
     QEMU_ARCH_RISCV = (1 << 19),
+    QEMU_ARCH_RX = (1 << 20),
 };
 
 extern const uint32_t arch_type;
arch_init.c +2 -0
index 705d0b94ad..d9eb0ec1dd 100644
@@ -77,6 +77,8 @@ int graphic_depth = 32;
 #define QEMU_ARCH QEMU_ARCH_PPC
 #elif defined(TARGET_RISCV)
 #define QEMU_ARCH QEMU_ARCH_RISCV
+#elif defined(TARGET_RX)
+#define QEMU_ARCH QEMU_ARCH_RX
 #elif defined(TARGET_S390X)
 #define QEMU_ARCH QEMU_ARCH_S390X
 #elif defined(TARGET_SH4)
tests/qtest/machine-none-test.c +1 -0
index 5953d31755..8bb54a6360 100644
@@ -56,6 +56,7 @@ static struct arch2cpu cpus_map[] = {
     { "hppa", "hppa" },
     { "riscv64", "rv64gcsu-v1.10.0" },
     { "riscv32", "rv32gcsu-v1.9.1" },
+    { "rx", "rx62n" },
 };
 
 static const char *get_cpu_model_by_arch(const char *arch)
hw/Kconfig +1 -0
index ecf491bf04..62f9ebdc22 100644
@@ -55,6 +55,7 @@ source nios2/Kconfig
 source openrisc/Kconfig
 source ppc/Kconfig
 source riscv/Kconfig
+source rx/Kconfig
 source s390x/Kconfig
 source sh4/Kconfig
 source sparc/Kconfig
Signature · 1 line
2.20.1
#21 lore raw

PATCH v30 21/22 BootLinuxConsoleTest: Test the RX-Virt machine

In reply to Yoshinori Sato

From: Philippe Mathieu-Daudé <[email protected]>

Add two tests for the rx-virt machine, based on the recommended test setup from Yoshinori Sato:
https://lists.gnu.org/archive/html/qemu-devel/2019-05/msg03586.html

- U-Boot prompt
- Linux kernel with Sash shell

These are very quick tests:

  $ avocado run -t arch:rx tests/acceptance/boot_linux_console.py
  JOB ID     : 84a6ef01c0b87975ecbfcb31a920afd735753ace
  JOB LOG    : /home/phil/avocado/job-results/job-2019-05-24T05.02-84a6ef0/job.log
   (1/2) tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_rx_uboot: PASS (0.11 s)
   (2/2) tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_rx_linux: PASS (0.45 s)
  RESULTS    : PASS 2 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0

Tests can also be run with:

  $ avocado --show=console run -t arch:rx tests/acceptance/boot_linux_console.py
  console: U-Boot 2016.05-rc3-23705-ga1ef3c71cb-dirty (Feb 05 2019 - 21:56:06 +0900)
  console: Linux version 4.19.0+ (yo-satoh@yo-satoh-debian) (gcc version 9.0.0 20181105 (experimental) (GCC)) #137 Wed Feb 20 23:20:02 JST 2019
  console: Built 1 zonelists, mobility grouping on.  Total pages: 8128
  ...
  console: SuperH (H)SCI(F) driver initialized
  console: 88240.serial: ttySC0 at MMIO 0x88240 (irq = 215, base_baud = 0) is a sci
  console: console [ttySC0] enabled
  console: 88248.serial: ttySC1 at MMIO 0x88248 (irq = 219, base_baud = 0) is a sci

Based-on: [email protected] "RX architecture support"

---
 tests/acceptance/boot_linux_console.py | 46 ++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)
tests/acceptance/boot_linux_console.py +46 -0
index 34d37eba3b..367cf480a5 100644
@@ -686,3 +686,49 @@ class BootLinuxConsole(Test):
         tar_hash = '49e88d9933742f0164b60839886c9739cb7a0d34'
         self.vm.add_args('-cpu', 'dc233c')
         self.do_test_advcal_2018('02', tar_hash, 'santas-sleigh-ride.elf')
+
+    def test_rx_uboot(self):
+        """
+        :avocado: tags=arch:rx
+        :avocado: tags=machine:rx-virt
+        :avocado: tags=endian:little
+        """
+        uboot_url = ('https://acc.dl.osdn.jp/users/23/23888/u-boot.bin.gz')
+        uboot_hash = '9b78dbd43b40b2526848c0b1ce9de02c24f4dcdb'
+        uboot_path = self.fetch_asset(uboot_url, asset_hash=uboot_hash)
+        uboot_path = archive.uncompress(uboot_path, self.workdir)
+
+        self.vm.set_machine('rx-virt')
+        self.vm.set_console()
+        self.vm.add_args('-bios', uboot_path,
+                         '-no-reboot')
+        self.vm.launch()
+        uboot_version = 'U-Boot 2016.05-rc3-23705-ga1ef3c71cb-dirty'
+        self.wait_for_console_pattern(uboot_version)
+        gcc_version = 'rx-unknown-linux-gcc (GCC) 9.0.0 20181105 (experimental)'
+        # FIXME limit baudrate on chardev, else we type too fast
+        #self.exec_command_and_wait_for_pattern('version', gcc_version)
+
+    def test_rx_linux(self):
+        """
+        :avocado: tags=arch:rx
+        :avocado: tags=machine:rx-virt
+        :avocado: tags=endian:little
+        """
+        dtb_url = ('https://acc.dl.osdn.jp/users/23/23887/rx-qemu.dtb')
+        dtb_hash = '7b4e4e2c71905da44e86ce47adee2210b026ac18'
+        dtb_path = self.fetch_asset(dtb_url, asset_hash=dtb_hash)
+        kernel_url = ('http://acc.dl.osdn.jp/users/23/23845/zImage')
+        kernel_hash = '39a81067f8d72faad90866ddfefa19165d68fc99'
+        kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash)
+
+        self.vm.set_machine('rx-virt')
+        self.vm.set_console()
+        kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + 'earlycon'
+        self.vm.add_args('-kernel', kernel_path,
+                         '-dtb', dtb_path,
+                         '-no-reboot')
+        self.vm.launch()
+        self.wait_for_console_pattern('Sash command shell (version 1.1.1)')
+        self.exec_command_and_wait_for_pattern('printenv',
+                                               'TERM=linux')
Signature · 1 line
2.20.1
#22 lore raw

PATCH v30 22/22 qemu-doc.texi: Add RX section.

In reply to Yoshinori Sato

Describe emulated target specification. And two examples.

---
 qemu-doc.texi | 44 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)
qemu-doc.texi +44 -0
index a1ef6b6484..0b2173daa7 100644
@@ -1719,6 +1719,7 @@ differences are mentioned in the following sections.
 * Microblaze System emulator::
 * SH4 System emulator::
 * Xtensa System emulator::
+* RX System emulator::
 @end menu
 
 @node PowerPC System emulator
@@ -2487,6 +2488,49 @@ so should only be used with trusted guest OS.
 
 @c man end
 
+@node RX System emulator
+@section RX System emulator
+@cindex system emulation (RX)
+
+Use the executable @file{qemu-system-rx} to simulate a Virtual RX target.
+This target emulated following devices.
+
+@itemize @minus
+@item
+R5F562N8 MCU
+@item
+On-chip memory (ROM 512KB, RAM 96KB)
+@item
+Interrupt Control Unit (ICUa)
+@item
+8Bit Timer x 1CH (TMR0,1)
+@item
+Compare Match Timer x 2CH (CMT0,1)
+@item
+Serial Communication Interface x 1CH (SCI0)
+@item
+External memory 16MByte
+@end itemize
+
+Example of @file{qemu-system-rx} usage for rx is shown below:
+
+Download @code{u-boot_image} from @url{https://osdn.net/users/ysato/pf/qemu/dl/u-boot.bin.gz}
+
+Start emulation of rx-virt:
+@example
+qemu-system-rx -bios @code{u-boot_image}
+@end example
+
+Download @code{kernel_image} from @url{https://osdn.net/users/ysato/pf/qemu/dl/zImage}
+
+Download @code{device_tree_blob} from @url{https://osdn.net/users/ysato/pf/qemu/dl/rx-virt.dtb}
+
+Start emulation of rx-virt:
+@example
+qemu-system-rx -kernel @code{kernel_image} -dtb @code{device_tree_blob} \
+  -append "earlycon"
+@end example
+
 @node QEMU User space emulator
 @chapter QEMU User space emulator
 
Signature · 1 line
2.20.1
#23 lore raw
In reply to Yoshinori Sato
Patchew URL: https://patchew.org/QEMU/[email protected]/

Patchew URL: https://patchew.org/QEMU/[email protected]/

Hi,

This series seems to have some coding style problems. See output below for more information:

Subject: [PATCH v30 00/22] Add RX archtecture support
Message-id: [email protected]
Type: series

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

From https://github.com/patchew-project/qemu
* [new tag] patchew/[email protected] -> patchew/[email protected]
Switched to a new branch 'test'
f4d6eaf qemu-doc.texi: Add RX section.
0b8d847 BootLinuxConsoleTest: Test the RX-Virt machine c557e26 Add rx-softmmu
43b988e hw/rx: Restrict the RX62N microcontroller to the RX62N CPU core ff21308 hw/rx: Honor -accel qtest
8c88664 hw/rx: RX Target hardware definition
1b2fe5f hw/char: RX62N serial communication interface (SCI) b2f8fa7 hw/timer: RX62N internal timer modules
ae62029 hw/intc: RX62N interrupt controller (ICUa)
765ce42 target/rx: Dump bytes for each insn during disassembly a2a0a4b target/rx: Collect all bytes during disassembly b746289 target/rx: Emit all disassembly in one prt()
c90e743 target/rx: Use prt_ldmi for XCHG_mr disassembly 89b0c41 target/rx: Replace operand with prt_ldmi in disassembler c5849aa target/rx: Disassemble rx_index_addr into a string 88a4745 target/rx: RX disassembler
def33df target/rx: CPU definition
ec76660 target/rx: TCG helper
65fc0c5 target/rx: TCG translation
c225a52 hw/registerfields.h: Add 8bit and 16bit register macros 1b8ec2b qemu/bitops.h: Add extract8 and extract16
4292f08 MAINTAINERS: Add RX

=== OUTPUT BEGIN ===
1/22 Checking commit 4292f083c3fa (MAINTAINERS: Add RX)
2/22 Checking commit 1b8ec2b1e39d (qemu/bitops.h: Add extract8 and extract16) 3/22 Checking commit c225a5286644 (hw/registerfields.h: Add 8bit and 16bit register macros) Use of uninitialized value in concatenation (.) or string at ./scripts/checkpatch.pl line 2490.
ERROR: Macros with multiple statements should be enclosed in a do - while loop #27: FILE: include/hw/registerfields.h:25:
+#define REG8(reg, addr) \
+ enum { A_ ## reg = (addr) }; \
+ enum { R_ ## reg = (addr) };

ERROR: Macros with multiple statements should be enclosed in a do - while loop #31: FILE: include/hw/registerfields.h:29:
+#define REG16(reg, addr) \
+ enum { A_ ## reg = (addr) }; \
+ enum { R_ ## reg = (addr) / 2 };

total: 2 errors, 0 warnings, 56 lines checked

Patch 3/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.

4/22 Checking commit 65fc0c5eab98 (target/rx: TCG translation)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #20:
new file mode 100644

total: 0 errors, 1 warnings, 3065 lines checked

Patch 4/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
5/22 Checking commit ec766608772b (target/rx: TCG helper)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #21:
new file mode 100644

total: 0 errors, 1 warnings, 650 lines checked

Patch 5/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
6/22 Checking commit def33dfddaf5 (target/rx: CPU definition)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #22:
new file mode 100644

total: 0 errors, 1 warnings, 659 lines checked

Patch 6/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
7/22 Checking commit 88a474516e8d (target/rx: RX disassembler)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #38:
new file mode 100644

total: 0 errors, 1 warnings, 1497 lines checked

Patch 7/22 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
8/22 Checking commit c5849aab2ce9 (target/rx: Disassemble rx_index_addr into a string) 9/22 Checking commit 89b0c4140179 (target/rx: Replace operand with prt_ldmi in disassembler) 10/22 Checking commit c90e743d5f36 (target/rx: Use prt_ldmi for XCHG_mr disassembly) 11/22 Checking commit b74628914f4f (target/rx: Emit all disassembly in one prt()) 12/22 Checking commit a2a0a4b84d0e (target/rx: Collect all bytes during disassembly) 13/22 Checking commit 765ce427f3f7 (target/rx: Dump bytes for each insn during disassembly) 14/22 Checking commit ae62029d9e72 (hw/intc: RX62N interrupt controller (ICUa))
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #40:
new file mode 100644

total: 0 errors, 1 warnings, 445 lines checked

Patch 14/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
15/22 Checking commit b2f8fa713ccb (hw/timer: RX62N internal timer modules)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #50:
new file mode 100644

total: 0 errors, 1 warnings, 845 lines checked

Patch 15/22 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
16/22 Checking commit 1b2fe5f13848 (hw/char: RX62N serial communication interface (SCI))
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #43:
new file mode 100644

total: 0 errors, 1 warnings, 400 lines checked

Patch 16/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
17/22 Checking commit 8c8866420ce2 (hw/rx: RX Target hardware definition)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #23:
new file mode 100644

ERROR: trailing whitespace
#128: FILE: hw/rx/rx-virt.c:73:
+ $

ERROR: trailing whitespace
#146: FILE: hw/rx/rx-virt.c:91:
+ /* The kernel image is loaded into $

WARNING: Block comments use a leading /* on a separate line #146: FILE: hw/rx/rx-virt.c:91:
+ /* The kernel image is loaded into

WARNING: Block comments use * on subsequent lines
#147: FILE: hw/rx/rx-virt.c:92:
+ /* The kernel image is loaded into
+ the latter half of the SDRAM space. */

WARNING: Block comments use a trailing */ on a separate line #147: FILE: hw/rx/rx-virt.c:92:
+ the latter half of the SDRAM space. */

total: 2 errors, 4 warnings, 493 lines checked

Patch 17/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.

18/22 Checking commit ff21308a5e17 (hw/rx: Honor -accel qtest)
19/22 Checking commit 43b988ef2318 (hw/rx: Restrict the RX62N microcontroller to the RX62N CPU core) 20/22 Checking commit c557e261b764 (Add rx-softmmu)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#69:
new file mode 100644

total: 0 errors, 1 warnings, 83 lines checked

Patch 20/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
21/22 Checking commit 0b8d84762b47 (BootLinuxConsoleTest: Test the RX-Virt machine) 22/22 Checking commit f4d6eaf69279 (qemu-doc.texi: Add RX section.) === OUTPUT END ===

Test command exited with code: 1

The full log is available at
http://patchew.org/logs/[email protected]/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to [email protected]

#24 lore raw
In reply to Yoshinori Sato
Patchew URL: https://patchew.org/QEMU/[email protected]/

Patchew URL: https://patchew.org/QEMU/[email protected]/

Hi,

This series seems to have some coding style problems. See output below for more information:

Subject: [PATCH v30 00/22] Add RX archtecture support
Message-id: [email protected]
Type: series

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
- [tag update] patchew/[email protected] -> patchew/[email protected]
- [tag update] patchew/[email protected] -> patchew/[email protected]
Switched to a new branch 'test'
63d8f29 qemu-doc.texi: Add RX section.
0828fee BootLinuxConsoleTest: Test the RX-Virt machine bea9ae2 Add rx-softmmu
46f27e3 hw/rx: Restrict the RX62N microcontroller to the RX62N CPU core 2afce4c hw/rx: Honor -accel qtest
ed93bfd hw/rx: RX Target hardware definition
72f4963 hw/char: RX62N serial communication interface (SCI) ad00efa hw/timer: RX62N internal timer modules
bf6c82f hw/intc: RX62N interrupt controller (ICUa)
253d941 target/rx: Dump bytes for each insn during disassembly 0d816ca target/rx: Collect all bytes during disassembly bdfbcf3 target/rx: Emit all disassembly in one prt()
f587124 target/rx: Use prt_ldmi for XCHG_mr disassembly eeca618 target/rx: Replace operand with prt_ldmi in disassembler 956befe target/rx: Disassemble rx_index_addr into a string 0835249 target/rx: RX disassembler
6821236 target/rx: CPU definition
0e76a8f target/rx: TCG helper
fe37ab1 target/rx: TCG translation
7cc01ef hw/registerfields.h: Add 8bit and 16bit register macros d17802b qemu/bitops.h: Add extract8 and extract16
81462db MAINTAINERS: Add RX

=== OUTPUT BEGIN ===
1/22 Checking commit 81462db667b2 (MAINTAINERS: Add RX)
2/22 Checking commit d17802b2bd09 (qemu/bitops.h: Add extract8 and extract16) 3/22 Checking commit 7cc01ef2805e (hw/registerfields.h: Add 8bit and 16bit register macros) Use of uninitialized value in concatenation (.) or string at ./scripts/checkpatch.pl line 2490.
ERROR: Macros with multiple statements should be enclosed in a do - while loop #27: FILE: include/hw/registerfields.h:25:
+#define REG8(reg, addr) \
+ enum { A_ ## reg = (addr) }; \
+ enum { R_ ## reg = (addr) };

ERROR: Macros with multiple statements should be enclosed in a do - while loop #31: FILE: include/hw/registerfields.h:29:
+#define REG16(reg, addr) \
+ enum { A_ ## reg = (addr) }; \
+ enum { R_ ## reg = (addr) / 2 };

total: 2 errors, 0 warnings, 56 lines checked

Patch 3/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.

4/22 Checking commit fe37ab11655e (target/rx: TCG translation)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #20:
new file mode 100644

total: 0 errors, 1 warnings, 3065 lines checked

Patch 4/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
5/22 Checking commit 0e76a8f988a8 (target/rx: TCG helper)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #21:
new file mode 100644

total: 0 errors, 1 warnings, 650 lines checked

Patch 5/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
6/22 Checking commit 6821236f1ec6 (target/rx: CPU definition)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #22:
new file mode 100644

total: 0 errors, 1 warnings, 659 lines checked

Patch 6/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
7/22 Checking commit 083524988c91 (target/rx: RX disassembler)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #38:
new file mode 100644

total: 0 errors, 1 warnings, 1497 lines checked

Patch 7/22 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
8/22 Checking commit 956befec0bfb (target/rx: Disassemble rx_index_addr into a string) 9/22 Checking commit eeca61803f65 (target/rx: Replace operand with prt_ldmi in disassembler) 10/22 Checking commit f58712457dc7 (target/rx: Use prt_ldmi for XCHG_mr disassembly) 11/22 Checking commit bdfbcf35637b (target/rx: Emit all disassembly in one prt()) 12/22 Checking commit 0d816ca0983f (target/rx: Collect all bytes during disassembly) 13/22 Checking commit 253d941aaa86 (target/rx: Dump bytes for each insn during disassembly) 14/22 Checking commit bf6c82fc3bcd (hw/intc: RX62N interrupt controller (ICUa))
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #40:
new file mode 100644

total: 0 errors, 1 warnings, 445 lines checked

Patch 14/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
15/22 Checking commit ad00efa8d314 (hw/timer: RX62N internal timer modules)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #50:
new file mode 100644

total: 0 errors, 1 warnings, 845 lines checked

Patch 15/22 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
16/22 Checking commit 72f4963a91f9 (hw/char: RX62N serial communication interface (SCI))
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #43:
new file mode 100644

total: 0 errors, 1 warnings, 400 lines checked

Patch 16/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
17/22 Checking commit ed93bfd19986 (hw/rx: RX Target hardware definition)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #23:
new file mode 100644

ERROR: trailing whitespace
#128: FILE: hw/rx/rx-virt.c:73:
+ $

ERROR: trailing whitespace
#146: FILE: hw/rx/rx-virt.c:91:
+ /* The kernel image is loaded into $

WARNING: Block comments use a leading /* on a separate line #146: FILE: hw/rx/rx-virt.c:91:
+ /* The kernel image is loaded into

WARNING: Block comments use * on subsequent lines
#147: FILE: hw/rx/rx-virt.c:92:
+ /* The kernel image is loaded into
+ the latter half of the SDRAM space. */

WARNING: Block comments use a trailing */ on a separate line #147: FILE: hw/rx/rx-virt.c:92:
+ the latter half of the SDRAM space. */

total: 2 errors, 4 warnings, 493 lines checked

Patch 17/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.

18/22 Checking commit 2afce4c4ec24 (hw/rx: Honor -accel qtest)
19/22 Checking commit 46f27e3252e4 (hw/rx: Restrict the RX62N microcontroller to the RX62N CPU core) 20/22 Checking commit bea9ae2c5ed7 (Add rx-softmmu)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#69:
new file mode 100644

total: 0 errors, 1 warnings, 83 lines checked

Patch 20/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
21/22 Checking commit 0828feec3de9 (BootLinuxConsoleTest: Test the RX-Virt machine) 22/22 Checking commit 63d8f29d671c (qemu-doc.texi: Add RX section.) === OUTPUT END ===

Test command exited with code: 1

The full log is available at
http://patchew.org/logs/[email protected]/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to [email protected]

#25 lore raw
In reply to Yoshinori Sato
Patchew URL: https://patchew.org/QEMU/[email protected]/

Patchew URL: https://patchew.org/QEMU/[email protected]/

Hi,

This series seems to have some coding style problems. See output below for more information:

Subject: [PATCH v30 00/22] Add RX archtecture support
Message-id: [email protected]
Type: series

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

From https://github.com/patchew-project/qemu
- [tag update] patchew/[email protected] -> patchew/[email protected]
Switched to a new branch 'test'
b99dc82 qemu-doc.texi: Add RX section.
0d81589 BootLinuxConsoleTest: Test the RX-Virt machine e1fb98f Add rx-softmmu
9fb7102 hw/rx: Restrict the RX62N microcontroller to the RX62N CPU core 3491db9 hw/rx: Honor -accel qtest
7905f70 hw/rx: RX Target hardware definition
6871a28 hw/char: RX62N serial communication interface (SCI) 430e7ae hw/timer: RX62N internal timer modules
029f7c2 hw/intc: RX62N interrupt controller (ICUa)
08436a0 target/rx: Dump bytes for each insn during disassembly 0922998 target/rx: Collect all bytes during disassembly f7c9eeb target/rx: Emit all disassembly in one prt()
b26c962 target/rx: Use prt_ldmi for XCHG_mr disassembly 547cba7 target/rx: Replace operand with prt_ldmi in disassembler 72fdb0c target/rx: Disassemble rx_index_addr into a string 9ae47c8 target/rx: RX disassembler
6ce9166 target/rx: CPU definition
f44b93f target/rx: TCG helper
d12c2b0 target/rx: TCG translation
4765cee hw/registerfields.h: Add 8bit and 16bit register macros d8bef98 qemu/bitops.h: Add extract8 and extract16
3b29a0a MAINTAINERS: Add RX

=== OUTPUT BEGIN ===
1/22 Checking commit 3b29a0a2c13b (MAINTAINERS: Add RX)
2/22 Checking commit d8bef9867414 (qemu/bitops.h: Add extract8 and extract16) 3/22 Checking commit 4765cee62a1b (hw/registerfields.h: Add 8bit and 16bit register macros) Use of uninitialized value in concatenation (.) or string at ./scripts/checkpatch.pl line 2490.
ERROR: Macros with multiple statements should be enclosed in a do - while loop #27: FILE: include/hw/registerfields.h:25:
+#define REG8(reg, addr) \
+ enum { A_ ## reg = (addr) }; \
+ enum { R_ ## reg = (addr) };

ERROR: Macros with multiple statements should be enclosed in a do - while loop #31: FILE: include/hw/registerfields.h:29:
+#define REG16(reg, addr) \
+ enum { A_ ## reg = (addr) }; \
+ enum { R_ ## reg = (addr) / 2 };

total: 2 errors, 0 warnings, 56 lines checked

Patch 3/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.

4/22 Checking commit d12c2b05dc64 (target/rx: TCG translation)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #20:
new file mode 100644

total: 0 errors, 1 warnings, 3065 lines checked

Patch 4/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
5/22 Checking commit f44b93fefa39 (target/rx: TCG helper)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #21:
new file mode 100644

total: 0 errors, 1 warnings, 650 lines checked

Patch 5/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
6/22 Checking commit 6ce916678c4b (target/rx: CPU definition)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #22:
new file mode 100644

total: 0 errors, 1 warnings, 659 lines checked

Patch 6/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
7/22 Checking commit 9ae47c83cd99 (target/rx: RX disassembler)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #38:
new file mode 100644

total: 0 errors, 1 warnings, 1497 lines checked

Patch 7/22 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
8/22 Checking commit 72fdb0cf8e02 (target/rx: Disassemble rx_index_addr into a string) 9/22 Checking commit 547cba7fec67 (target/rx: Replace operand with prt_ldmi in disassembler) 10/22 Checking commit b26c962f1e11 (target/rx: Use prt_ldmi for XCHG_mr disassembly) 11/22 Checking commit f7c9eebd32fb (target/rx: Emit all disassembly in one prt()) 12/22 Checking commit 0922998c8ca2 (target/rx: Collect all bytes during disassembly) 13/22 Checking commit 08436a08ece7 (target/rx: Dump bytes for each insn during disassembly) 14/22 Checking commit 029f7c293c53 (hw/intc: RX62N interrupt controller (ICUa))
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #40:
new file mode 100644

total: 0 errors, 1 warnings, 445 lines checked

Patch 14/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
15/22 Checking commit 430e7ae5bc53 (hw/timer: RX62N internal timer modules)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #50:
new file mode 100644

total: 0 errors, 1 warnings, 845 lines checked

Patch 15/22 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
16/22 Checking commit 6871a2859564 (hw/char: RX62N serial communication interface (SCI))
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #43:
new file mode 100644

total: 0 errors, 1 warnings, 400 lines checked

Patch 16/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
17/22 Checking commit 7905f70a12a1 (hw/rx: RX Target hardware definition)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #23:
new file mode 100644

ERROR: trailing whitespace
#128: FILE: hw/rx/rx-virt.c:73:
+ $

ERROR: trailing whitespace
#146: FILE: hw/rx/rx-virt.c:91:
+ /* The kernel image is loaded into $

WARNING: Block comments use a leading /* on a separate line #146: FILE: hw/rx/rx-virt.c:91:
+ /* The kernel image is loaded into

WARNING: Block comments use * on subsequent lines
#147: FILE: hw/rx/rx-virt.c:92:
+ /* The kernel image is loaded into
+ the latter half of the SDRAM space. */

WARNING: Block comments use a trailing */ on a separate line #147: FILE: hw/rx/rx-virt.c:92:
+ the latter half of the SDRAM space. */

total: 2 errors, 4 warnings, 493 lines checked

Patch 17/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.

18/22 Checking commit 3491db96714e (hw/rx: Honor -accel qtest)
19/22 Checking commit 9fb7102e2ee2 (hw/rx: Restrict the RX62N microcontroller to the RX62N CPU core) 20/22 Checking commit e1fb98f90c3b (Add rx-softmmu)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#69:
new file mode 100644

total: 0 errors, 1 warnings, 83 lines checked

Patch 20/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
21/22 Checking commit 0d81589f7682 (BootLinuxConsoleTest: Test the RX-Virt machine) 22/22 Checking commit b99dc821dcb8 (qemu-doc.texi: Add RX section.) === OUTPUT END ===

Test command exited with code: 1

The full log is available at
http://patchew.org/logs/[email protected]/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to [email protected]

#26 lore raw
In reply to Yoshinori Sato
Patchew URL: https://patchew.org/QEMU/[email protected]/

Patchew URL: https://patchew.org/QEMU/[email protected]/

Hi,

This series seems to have some coding style problems. See output below for more information:

Subject: [PATCH v30 00/22] Add RX archtecture support
Message-id: [email protected]
Type: series

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
Switched to a new branch 'test'
fb4922a qemu-doc.texi: Add RX section.
edd4d76 BootLinuxConsoleTest: Test the RX-Virt machine 1f0e65e Add rx-softmmu
edf3f49 hw/rx: Restrict the RX62N microcontroller to the RX62N CPU core 7e8b2d2 hw/rx: Honor -accel qtest
b45a90b hw/rx: RX Target hardware definition
393a9ff hw/char: RX62N serial communication interface (SCI) fb03e33 hw/timer: RX62N internal timer modules
14af849 hw/intc: RX62N interrupt controller (ICUa)
097db5cd target/rx: Dump bytes for each insn during disassembly d6b49d1 target/rx: Collect all bytes during disassembly ee0e458 target/rx: Emit all disassembly in one prt()
c06d978 target/rx: Use prt_ldmi for XCHG_mr disassembly 67ecb36 target/rx: Replace operand with prt_ldmi in disassembler 0be1ef5 target/rx: Disassemble rx_index_addr into a string ea7685e target/rx: RX disassembler
46e3e2b target/rx: CPU definition
5bc4129 target/rx: TCG helper
c18ded8 target/rx: TCG translation
0356712 hw/registerfields.h: Add 8bit and 16bit register macros bb1b91d qemu/bitops.h: Add extract8 and extract16
3cbeee6 MAINTAINERS: Add RX

=== OUTPUT BEGIN ===
1/22 Checking commit 3cbeee611724 (MAINTAINERS: Add RX)
2/22 Checking commit bb1b91d61176 (qemu/bitops.h: Add extract8 and extract16) 3/22 Checking commit 0356712846d1 (hw/registerfields.h: Add 8bit and 16bit register macros) Use of uninitialized value in concatenation (.) or string at ./scripts/checkpatch.pl line 2490.
ERROR: Macros with multiple statements should be enclosed in a do - while loop #27: FILE: include/hw/registerfields.h:25:
+#define REG8(reg, addr) \
+ enum { A_ ## reg = (addr) }; \
+ enum { R_ ## reg = (addr) };

ERROR: Macros with multiple statements should be enclosed in a do - while loop #31: FILE: include/hw/registerfields.h:29:
+#define REG16(reg, addr) \
+ enum { A_ ## reg = (addr) }; \
+ enum { R_ ## reg = (addr) / 2 };

total: 2 errors, 0 warnings, 56 lines checked

Patch 3/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.

4/22 Checking commit c18ded8e7e08 (target/rx: TCG translation)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #20:
new file mode 100644

total: 0 errors, 1 warnings, 3065 lines checked

Patch 4/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
5/22 Checking commit 5bc412974455 (target/rx: TCG helper)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #21:
new file mode 100644

total: 0 errors, 1 warnings, 650 lines checked

Patch 5/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
6/22 Checking commit 46e3e2b13e31 (target/rx: CPU definition)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #22:
new file mode 100644

total: 0 errors, 1 warnings, 659 lines checked

Patch 6/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
7/22 Checking commit ea7685ec72cc (target/rx: RX disassembler)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #38:
new file mode 100644

total: 0 errors, 1 warnings, 1497 lines checked

Patch 7/22 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
8/22 Checking commit 0be1ef5d641a (target/rx: Disassemble rx_index_addr into a string) 9/22 Checking commit 67ecb36d6ff1 (target/rx: Replace operand with prt_ldmi in disassembler) 10/22 Checking commit c06d978520ce (target/rx: Use prt_ldmi for XCHG_mr disassembly) 11/22 Checking commit ee0e45884b35 (target/rx: Emit all disassembly in one prt()) 12/22 Checking commit d6b49d1fd490 (target/rx: Collect all bytes during disassembly) 13/22 Checking commit 097db5cdc306 (target/rx: Dump bytes for each insn during disassembly) 14/22 Checking commit 14af8493f5f8 (hw/intc: RX62N interrupt controller (ICUa))
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #40:
new file mode 100644

total: 0 errors, 1 warnings, 445 lines checked

Patch 14/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
15/22 Checking commit fb03e3345795 (hw/timer: RX62N internal timer modules)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #50:
new file mode 100644

total: 0 errors, 1 warnings, 845 lines checked

Patch 15/22 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
16/22 Checking commit 393a9ffe035e (hw/char: RX62N serial communication interface (SCI))
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #43:
new file mode 100644

total: 0 errors, 1 warnings, 400 lines checked

Patch 16/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
17/22 Checking commit b45a90b39e03 (hw/rx: RX Target hardware definition)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #23:
new file mode 100644

ERROR: trailing whitespace
#128: FILE: hw/rx/rx-virt.c:73:
+ $

ERROR: trailing whitespace
#146: FILE: hw/rx/rx-virt.c:91:
+ /* The kernel image is loaded into $

WARNING: Block comments use a leading /* on a separate line #146: FILE: hw/rx/rx-virt.c:91:
+ /* The kernel image is loaded into

WARNING: Block comments use * on subsequent lines
#147: FILE: hw/rx/rx-virt.c:92:
+ /* The kernel image is loaded into
+ the latter half of the SDRAM space. */

WARNING: Block comments use a trailing */ on a separate line #147: FILE: hw/rx/rx-virt.c:92:
+ the latter half of the SDRAM space. */

total: 2 errors, 4 warnings, 493 lines checked

Patch 17/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.

18/22 Checking commit 7e8b2d211ffa (hw/rx: Honor -accel qtest)
19/22 Checking commit edf3f49bfe54 (hw/rx: Restrict the RX62N microcontroller to the RX62N CPU core) 20/22 Checking commit 1f0e65e1da92 (Add rx-softmmu)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#69:
new file mode 100644

total: 0 errors, 1 warnings, 83 lines checked

Patch 20/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
21/22 Checking commit edd4d76366b9 (BootLinuxConsoleTest: Test the RX-Virt machine) 22/22 Checking commit fb4922a3edc7 (qemu-doc.texi: Add RX section.) === OUTPUT END ===

Test command exited with code: 1

The full log is available at
http://patchew.org/logs/[email protected]/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to [email protected]

#27 lore raw
In reply to Yoshinori Sato
Patchew URL: https://patchew.org/QEMU/[email protected]/

Patchew URL: https://patchew.org/QEMU/[email protected]/

Hi,

This series seems to have some coding style problems. See output below for more information:

Subject: [PATCH v30 00/22] Add RX archtecture support
Message-id: [email protected]
Type: series

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

From https://github.com/patchew-project/qemu
- [tag update] patchew/[email protected] -> patchew/[email protected]
Switched to a new branch 'test'
4470895 qemu-doc.texi: Add RX section.
f0b23ed BootLinuxConsoleTest: Test the RX-Virt machine 92a7207 Add rx-softmmu
e3ec889 hw/rx: Restrict the RX62N microcontroller to the RX62N CPU core b62a7e2 hw/rx: Honor -accel qtest
ecdf913 hw/rx: RX Target hardware definition
a7637c5 hw/char: RX62N serial communication interface (SCI) 3f8b83c hw/timer: RX62N internal timer modules
f2c5f71 hw/intc: RX62N interrupt controller (ICUa)
66902a4 target/rx: Dump bytes for each insn during disassembly 691260f target/rx: Collect all bytes during disassembly 7b77f1a target/rx: Emit all disassembly in one prt()
ced96c7 target/rx: Use prt_ldmi for XCHG_mr disassembly e24ee8d target/rx: Replace operand with prt_ldmi in disassembler cc5ad57 target/rx: Disassemble rx_index_addr into a string db3bdeb target/rx: RX disassembler
b3d7bf4 target/rx: CPU definition
936ddc4 target/rx: TCG helper
2e5e44d target/rx: TCG translation
303744a hw/registerfields.h: Add 8bit and 16bit register macros 767e9e6 qemu/bitops.h: Add extract8 and extract16
c576bd7 MAINTAINERS: Add RX

=== OUTPUT BEGIN ===
1/22 Checking commit c576bd79d68d (MAINTAINERS: Add RX)
2/22 Checking commit 767e9e6adb78 (qemu/bitops.h: Add extract8 and extract16) 3/22 Checking commit 303744a62af8 (hw/registerfields.h: Add 8bit and 16bit register macros) Use of uninitialized value in concatenation (.) or string at ./scripts/checkpatch.pl line 2490.
ERROR: Macros with multiple statements should be enclosed in a do - while loop #27: FILE: include/hw/registerfields.h:25:
+#define REG8(reg, addr) \
+ enum { A_ ## reg = (addr) }; \
+ enum { R_ ## reg = (addr) };

ERROR: Macros with multiple statements should be enclosed in a do - while loop #31: FILE: include/hw/registerfields.h:29:
+#define REG16(reg, addr) \
+ enum { A_ ## reg = (addr) }; \
+ enum { R_ ## reg = (addr) / 2 };

total: 2 errors, 0 warnings, 56 lines checked

Patch 3/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.

4/22 Checking commit 2e5e44dcfc69 (target/rx: TCG translation)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #20:
new file mode 100644

total: 0 errors, 1 warnings, 3065 lines checked

Patch 4/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
5/22 Checking commit 936ddc4f1b14 (target/rx: TCG helper)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #21:
new file mode 100644

total: 0 errors, 1 warnings, 650 lines checked

Patch 5/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
6/22 Checking commit b3d7bf4ef6ae (target/rx: CPU definition)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #22:
new file mode 100644

total: 0 errors, 1 warnings, 659 lines checked

Patch 6/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
7/22 Checking commit db3bdeb0a4bf (target/rx: RX disassembler)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #38:
new file mode 100644

total: 0 errors, 1 warnings, 1497 lines checked

Patch 7/22 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
8/22 Checking commit cc5ad57c2c56 (target/rx: Disassemble rx_index_addr into a string) 9/22 Checking commit e24ee8d89615 (target/rx: Replace operand with prt_ldmi in disassembler) 10/22 Checking commit ced96c73a4f4 (target/rx: Use prt_ldmi for XCHG_mr disassembly) 11/22 Checking commit 7b77f1ab7077 (target/rx: Emit all disassembly in one prt()) 12/22 Checking commit 691260ffe7fa (target/rx: Collect all bytes during disassembly) 13/22 Checking commit 66902a40736b (target/rx: Dump bytes for each insn during disassembly) 14/22 Checking commit f2c5f711f5ac (hw/intc: RX62N interrupt controller (ICUa))
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #40:
new file mode 100644

total: 0 errors, 1 warnings, 445 lines checked

Patch 14/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
15/22 Checking commit 3f8b83c03e1d (hw/timer: RX62N internal timer modules)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #50:
new file mode 100644

total: 0 errors, 1 warnings, 845 lines checked

Patch 15/22 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
16/22 Checking commit a7637c5043f1 (hw/char: RX62N serial communication interface (SCI))
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #43:
new file mode 100644

total: 0 errors, 1 warnings, 400 lines checked

Patch 16/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
17/22 Checking commit ecdf913ebc5b (hw/rx: RX Target hardware definition)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #23:
new file mode 100644

ERROR: trailing whitespace
#128: FILE: hw/rx/rx-virt.c:73:
+ $

ERROR: trailing whitespace
#146: FILE: hw/rx/rx-virt.c:91:
+ /* The kernel image is loaded into $

WARNING: Block comments use a leading /* on a separate line #146: FILE: hw/rx/rx-virt.c:91:
+ /* The kernel image is loaded into

WARNING: Block comments use * on subsequent lines
#147: FILE: hw/rx/rx-virt.c:92:
+ /* The kernel image is loaded into
+ the latter half of the SDRAM space. */

WARNING: Block comments use a trailing */ on a separate line #147: FILE: hw/rx/rx-virt.c:92:
+ the latter half of the SDRAM space. */

total: 2 errors, 4 warnings, 493 lines checked

Patch 17/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.

18/22 Checking commit b62a7e22a70c (hw/rx: Honor -accel qtest)
19/22 Checking commit e3ec88947610 (hw/rx: Restrict the RX62N microcontroller to the RX62N CPU core) 20/22 Checking commit 92a72077979d (Add rx-softmmu)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#69:
new file mode 100644

total: 0 errors, 1 warnings, 83 lines checked

Patch 20/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
21/22 Checking commit f0b23edc7d0a (BootLinuxConsoleTest: Test the RX-Virt machine) 22/22 Checking commit 44708958d5b5 (qemu-doc.texi: Add RX section.) === OUTPUT END ===

Test command exited with code: 1

The full log is available at
http://patchew.org/logs/[email protected]/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to [email protected]

#28 lore raw
In reply to Yoshinori Sato
Patchew URL: https://patchew.org/QEMU/[email protected]/

Patchew URL: https://patchew.org/QEMU/[email protected]/

Hi,

This series seems to have some coding style problems. See output below for more information:

Subject: [PATCH v30 00/22] Add RX archtecture support
Message-id: [email protected]
Type: series

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
- [tag update] patchew/[email protected] -> patchew/[email protected]
Switched to a new branch 'test'
742aed2 qemu-doc.texi: Add RX section.
f8dc41e BootLinuxConsoleTest: Test the RX-Virt machine 37414e6 Add rx-softmmu
6bad46f hw/rx: Restrict the RX62N microcontroller to the RX62N CPU core b6f9774 hw/rx: Honor -accel qtest
38bc73d hw/rx: RX Target hardware definition
f224df0 hw/char: RX62N serial communication interface (SCI) ccd39c6 hw/timer: RX62N internal timer modules
3999489 hw/intc: RX62N interrupt controller (ICUa)
aa8d683 target/rx: Dump bytes for each insn during disassembly 8215d23 target/rx: Collect all bytes during disassembly 595382d target/rx: Emit all disassembly in one prt()
c722e15 target/rx: Use prt_ldmi for XCHG_mr disassembly be31b82 target/rx: Replace operand with prt_ldmi in disassembler 90b054c target/rx: Disassemble rx_index_addr into a string f2802e4 target/rx: RX disassembler
cb4c947 target/rx: CPU definition
5782455 target/rx: TCG helper
5435b95 target/rx: TCG translation
92c8a93 hw/registerfields.h: Add 8bit and 16bit register macros ca806d1 qemu/bitops.h: Add extract8 and extract16
5239516 MAINTAINERS: Add RX

=== OUTPUT BEGIN ===
1/22 Checking commit 5239516cc8f1 (MAINTAINERS: Add RX)
2/22 Checking commit ca806d1ba65e (qemu/bitops.h: Add extract8 and extract16) 3/22 Checking commit 92c8a93e24b2 (hw/registerfields.h: Add 8bit and 16bit register macros) Use of uninitialized value in concatenation (.) or string at ./scripts/checkpatch.pl line 2490.
ERROR: Macros with multiple statements should be enclosed in a do - while loop #27: FILE: include/hw/registerfields.h:25:
+#define REG8(reg, addr) \
+ enum { A_ ## reg = (addr) }; \
+ enum { R_ ## reg = (addr) };

ERROR: Macros with multiple statements should be enclosed in a do - while loop #31: FILE: include/hw/registerfields.h:29:
+#define REG16(reg, addr) \
+ enum { A_ ## reg = (addr) }; \
+ enum { R_ ## reg = (addr) / 2 };

total: 2 errors, 0 warnings, 56 lines checked

Patch 3/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.

4/22 Checking commit 5435b951d5f6 (target/rx: TCG translation)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #20:
new file mode 100644

total: 0 errors, 1 warnings, 3065 lines checked

Patch 4/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
5/22 Checking commit 5782455eda42 (target/rx: TCG helper)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #21:
new file mode 100644

total: 0 errors, 1 warnings, 650 lines checked

Patch 5/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
6/22 Checking commit cb4c94748de8 (target/rx: CPU definition)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #22:
new file mode 100644

total: 0 errors, 1 warnings, 659 lines checked

Patch 6/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
7/22 Checking commit f2802e4c7970 (target/rx: RX disassembler)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #38:
new file mode 100644

total: 0 errors, 1 warnings, 1497 lines checked

Patch 7/22 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
8/22 Checking commit 90b054c90463 (target/rx: Disassemble rx_index_addr into a string) 9/22 Checking commit be31b8271561 (target/rx: Replace operand with prt_ldmi in disassembler) 10/22 Checking commit c722e1591484 (target/rx: Use prt_ldmi for XCHG_mr disassembly) 11/22 Checking commit 595382d7f38d (target/rx: Emit all disassembly in one prt()) 12/22 Checking commit 8215d23159cd (target/rx: Collect all bytes during disassembly) 13/22 Checking commit aa8d68395ec1 (target/rx: Dump bytes for each insn during disassembly) 14/22 Checking commit 399948948c03 (hw/intc: RX62N interrupt controller (ICUa))
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #40:
new file mode 100644

total: 0 errors, 1 warnings, 445 lines checked

Patch 14/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
15/22 Checking commit ccd39c643aa0 (hw/timer: RX62N internal timer modules)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #50:
new file mode 100644

total: 0 errors, 1 warnings, 845 lines checked

Patch 15/22 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
16/22 Checking commit f224df014e23 (hw/char: RX62N serial communication interface (SCI))
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #43:
new file mode 100644

total: 0 errors, 1 warnings, 400 lines checked

Patch 16/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
17/22 Checking commit 38bc73d05b17 (hw/rx: RX Target hardware definition)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #23:
new file mode 100644

ERROR: trailing whitespace
#128: FILE: hw/rx/rx-virt.c:73:
+ $

ERROR: trailing whitespace
#146: FILE: hw/rx/rx-virt.c:91:
+ /* The kernel image is loaded into $

WARNING: Block comments use a leading /* on a separate line #146: FILE: hw/rx/rx-virt.c:91:
+ /* The kernel image is loaded into

WARNING: Block comments use * on subsequent lines
#147: FILE: hw/rx/rx-virt.c:92:
+ /* The kernel image is loaded into
+ the latter half of the SDRAM space. */

WARNING: Block comments use a trailing */ on a separate line #147: FILE: hw/rx/rx-virt.c:92:
+ the latter half of the SDRAM space. */

total: 2 errors, 4 warnings, 493 lines checked

Patch 17/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.

18/22 Checking commit b6f9774f8996 (hw/rx: Honor -accel qtest)
19/22 Checking commit 6bad46f6bb12 (hw/rx: Restrict the RX62N microcontroller to the RX62N CPU core) 20/22 Checking commit 37414e62f6b4 (Add rx-softmmu)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#69:
new file mode 100644

total: 0 errors, 1 warnings, 83 lines checked

Patch 20/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
21/22 Checking commit f8dc41e6173c (BootLinuxConsoleTest: Test the RX-Virt machine) 22/22 Checking commit 742aed21ef10 (qemu-doc.texi: Add RX section.) === OUTPUT END ===

Test command exited with code: 1

The full log is available at
http://patchew.org/logs/[email protected]/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to [email protected]

#29 lore raw
In reply to Yoshinori Sato
Patchew URL: https://patchew.org/QEMU/[email protected]/

Patchew URL: https://patchew.org/QEMU/[email protected]/

Hi,

This series seems to have some coding style problems. See output below for more information:

Subject: [PATCH v30 00/22] Add RX archtecture support
Message-id: [email protected]
Type: series

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
- [tag update] patchew/[email protected] -> patchew/[email protected]
Switched to a new branch 'test'
c07b5e4 qemu-doc.texi: Add RX section.
d9e3115 BootLinuxConsoleTest: Test the RX-Virt machine b1722b2 Add rx-softmmu
f88aff7 hw/rx: Restrict the RX62N microcontroller to the RX62N CPU core ce78c96 hw/rx: Honor -accel qtest
8097b53 hw/rx: RX Target hardware definition
dbc2b8b hw/char: RX62N serial communication interface (SCI) 979446e hw/timer: RX62N internal timer modules
5a15247 hw/intc: RX62N interrupt controller (ICUa)
f94a445 target/rx: Dump bytes for each insn during disassembly ca644b3 target/rx: Collect all bytes during disassembly 9d474c3 target/rx: Emit all disassembly in one prt()
95020f2 target/rx: Use prt_ldmi for XCHG_mr disassembly 5b536a9 target/rx: Replace operand with prt_ldmi in disassembler 7c95e62 target/rx: Disassemble rx_index_addr into a string 196b5bd target/rx: RX disassembler
9312a61 target/rx: CPU definition
4b9939c target/rx: TCG helper
3b8d86a target/rx: TCG translation
84337e2 hw/registerfields.h: Add 8bit and 16bit register macros 203f17b qemu/bitops.h: Add extract8 and extract16
08aca69 MAINTAINERS: Add RX

=== OUTPUT BEGIN ===
1/22 Checking commit 08aca69fecc7 (MAINTAINERS: Add RX)
2/22 Checking commit 203f17b55f7c (qemu/bitops.h: Add extract8 and extract16) 3/22 Checking commit 84337e272083 (hw/registerfields.h: Add 8bit and 16bit register macros) Use of uninitialized value in concatenation (.) or string at ./scripts/checkpatch.pl line 2490.
ERROR: Macros with multiple statements should be enclosed in a do - while loop #27: FILE: include/hw/registerfields.h:25:
+#define REG8(reg, addr) \
+ enum { A_ ## reg = (addr) }; \
+ enum { R_ ## reg = (addr) };

ERROR: Macros with multiple statements should be enclosed in a do - while loop #31: FILE: include/hw/registerfields.h:29:
+#define REG16(reg, addr) \
+ enum { A_ ## reg = (addr) }; \
+ enum { R_ ## reg = (addr) / 2 };

total: 2 errors, 0 warnings, 56 lines checked

Patch 3/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.

4/22 Checking commit 3b8d86a82898 (target/rx: TCG translation)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #20:
new file mode 100644

total: 0 errors, 1 warnings, 3065 lines checked

Patch 4/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
5/22 Checking commit 4b9939cf24c9 (target/rx: TCG helper)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #21:
new file mode 100644

total: 0 errors, 1 warnings, 650 lines checked

Patch 5/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
6/22 Checking commit 9312a613ec1a (target/rx: CPU definition)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #22:
new file mode 100644

total: 0 errors, 1 warnings, 659 lines checked

Patch 6/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
7/22 Checking commit 196b5bd702fc (target/rx: RX disassembler)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #38:
new file mode 100644

total: 0 errors, 1 warnings, 1497 lines checked

Patch 7/22 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
8/22 Checking commit 7c95e627ab42 (target/rx: Disassemble rx_index_addr into a string) 9/22 Checking commit 5b536a9efbaa (target/rx: Replace operand with prt_ldmi in disassembler) 10/22 Checking commit 95020f2f8f2a (target/rx: Use prt_ldmi for XCHG_mr disassembly) 11/22 Checking commit 9d474c351686 (target/rx: Emit all disassembly in one prt()) 12/22 Checking commit ca644b362f6f (target/rx: Collect all bytes during disassembly) 13/22 Checking commit f94a445e6fb0 (target/rx: Dump bytes for each insn during disassembly) 14/22 Checking commit 5a152470d6b2 (hw/intc: RX62N interrupt controller (ICUa))
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #40:
new file mode 100644

total: 0 errors, 1 warnings, 445 lines checked

Patch 14/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
15/22 Checking commit 979446eb0c51 (hw/timer: RX62N internal timer modules)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #50:
new file mode 100644

total: 0 errors, 1 warnings, 845 lines checked

Patch 15/22 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
16/22 Checking commit dbc2b8bb6f23 (hw/char: RX62N serial communication interface (SCI))
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #43:
new file mode 100644

total: 0 errors, 1 warnings, 400 lines checked

Patch 16/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
17/22 Checking commit 8097b536c109 (hw/rx: RX Target hardware definition)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #23:
new file mode 100644

ERROR: trailing whitespace
#128: FILE: hw/rx/rx-virt.c:73:
+ $

ERROR: trailing whitespace
#146: FILE: hw/rx/rx-virt.c:91:
+ /* The kernel image is loaded into $

WARNING: Block comments use a leading /* on a separate line #146: FILE: hw/rx/rx-virt.c:91:
+ /* The kernel image is loaded into

WARNING: Block comments use * on subsequent lines
#147: FILE: hw/rx/rx-virt.c:92:
+ /* The kernel image is loaded into
+ the latter half of the SDRAM space. */

WARNING: Block comments use a trailing */ on a separate line #147: FILE: hw/rx/rx-virt.c:92:
+ the latter half of the SDRAM space. */

total: 2 errors, 4 warnings, 493 lines checked

Patch 17/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.

18/22 Checking commit ce78c961bb0b (hw/rx: Honor -accel qtest)
19/22 Checking commit f88aff7a868d (hw/rx: Restrict the RX62N microcontroller to the RX62N CPU core) 20/22 Checking commit b1722b2fe634 (Add rx-softmmu)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#69:
new file mode 100644

total: 0 errors, 1 warnings, 83 lines checked

Patch 20/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
21/22 Checking commit d9e311566e1e (BootLinuxConsoleTest: Test the RX-Virt machine) 22/22 Checking commit c07b5e41a8d4 (qemu-doc.texi: Add RX section.) === OUTPUT END ===

Test command exited with code: 1

The full log is available at
http://patchew.org/logs/[email protected]/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to [email protected]

#30 lore raw
In reply to Yoshinori Sato
Patchew URL: https://patchew.org/QEMU/[email protected]/

Patchew URL: https://patchew.org/QEMU/[email protected]/

Hi,

This series seems to have some coding style problems. See output below for more information:

Subject: [PATCH v30 00/22] Add RX archtecture support
Message-id: [email protected]
Type: series

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

From https://github.com/patchew-project/qemu
- [tag update] patchew/[email protected] -> patchew/[email protected]
Switched to a new branch 'test'
96043cc qemu-doc.texi: Add RX section.
b7f311f BootLinuxConsoleTest: Test the RX-Virt machine d928a96 Add rx-softmmu
46a5463 hw/rx: Restrict the RX62N microcontroller to the RX62N CPU core 3602010 hw/rx: Honor -accel qtest
0ab77aa hw/rx: RX Target hardware definition
6d8c7a0 hw/char: RX62N serial communication interface (SCI) b5b1aca hw/timer: RX62N internal timer modules
ad8af53 hw/intc: RX62N interrupt controller (ICUa)
b32635d target/rx: Dump bytes for each insn during disassembly 4363ee1 target/rx: Collect all bytes during disassembly 410e6f4 target/rx: Emit all disassembly in one prt()
ed23672 target/rx: Use prt_ldmi for XCHG_mr disassembly 5701623 target/rx: Replace operand with prt_ldmi in disassembler fd886bb target/rx: Disassemble rx_index_addr into a string 1560408 target/rx: RX disassembler
0d304ec target/rx: CPU definition
57ca20a target/rx: TCG helper
003ca8c target/rx: TCG translation
79f2eaa hw/registerfields.h: Add 8bit and 16bit register macros 3148170 qemu/bitops.h: Add extract8 and extract16
79b00a8 MAINTAINERS: Add RX

=== OUTPUT BEGIN ===
1/22 Checking commit 79b00a820d7c (MAINTAINERS: Add RX)
2/22 Checking commit 3148170e9de8 (qemu/bitops.h: Add extract8 and extract16) 3/22 Checking commit 79f2eaaec033 (hw/registerfields.h: Add 8bit and 16bit register macros) Use of uninitialized value in concatenation (.) or string at ./scripts/checkpatch.pl line 2490.
ERROR: Macros with multiple statements should be enclosed in a do - while loop #27: FILE: include/hw/registerfields.h:25:
+#define REG8(reg, addr) \
+ enum { A_ ## reg = (addr) }; \
+ enum { R_ ## reg = (addr) };

ERROR: Macros with multiple statements should be enclosed in a do - while loop #31: FILE: include/hw/registerfields.h:29:
+#define REG16(reg, addr) \
+ enum { A_ ## reg = (addr) }; \
+ enum { R_ ## reg = (addr) / 2 };

total: 2 errors, 0 warnings, 56 lines checked

Patch 3/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.

4/22 Checking commit 003ca8c0eb26 (target/rx: TCG translation)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #20:
new file mode 100644

total: 0 errors, 1 warnings, 3065 lines checked

Patch 4/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
5/22 Checking commit 57ca20a306f9 (target/rx: TCG helper)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #21:
new file mode 100644

total: 0 errors, 1 warnings, 650 lines checked

Patch 5/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
6/22 Checking commit 0d304ec0ddd3 (target/rx: CPU definition)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #22:
new file mode 100644

total: 0 errors, 1 warnings, 659 lines checked

Patch 6/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
7/22 Checking commit 15604085897f (target/rx: RX disassembler)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #38:
new file mode 100644

total: 0 errors, 1 warnings, 1497 lines checked

Patch 7/22 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
8/22 Checking commit fd886bbd1449 (target/rx: Disassemble rx_index_addr into a string) 9/22 Checking commit 5701623d0c7b (target/rx: Replace operand with prt_ldmi in disassembler) 10/22 Checking commit ed236724afd5 (target/rx: Use prt_ldmi for XCHG_mr disassembly) 11/22 Checking commit 410e6f481e97 (target/rx: Emit all disassembly in one prt()) 12/22 Checking commit 4363ee1bdef4 (target/rx: Collect all bytes during disassembly) 13/22 Checking commit b32635d70232 (target/rx: Dump bytes for each insn during disassembly) 14/22 Checking commit ad8af53c7b71 (hw/intc: RX62N interrupt controller (ICUa))
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #40:
new file mode 100644

total: 0 errors, 1 warnings, 445 lines checked

Patch 14/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
15/22 Checking commit b5b1aca6fd0b (hw/timer: RX62N internal timer modules)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #50:
new file mode 100644

total: 0 errors, 1 warnings, 845 lines checked

Patch 15/22 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
16/22 Checking commit 6d8c7a072968 (hw/char: RX62N serial communication interface (SCI))
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #43:
new file mode 100644

total: 0 errors, 1 warnings, 400 lines checked

Patch 16/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
17/22 Checking commit 0ab77aad73ee (hw/rx: RX Target hardware definition)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #23:
new file mode 100644

ERROR: trailing whitespace
#128: FILE: hw/rx/rx-virt.c:73:
+ $

ERROR: trailing whitespace
#146: FILE: hw/rx/rx-virt.c:91:
+ /* The kernel image is loaded into $

WARNING: Block comments use a leading /* on a separate line #146: FILE: hw/rx/rx-virt.c:91:
+ /* The kernel image is loaded into

WARNING: Block comments use * on subsequent lines
#147: FILE: hw/rx/rx-virt.c:92:
+ /* The kernel image is loaded into
+ the latter half of the SDRAM space. */

WARNING: Block comments use a trailing */ on a separate line #147: FILE: hw/rx/rx-virt.c:92:
+ the latter half of the SDRAM space. */

total: 2 errors, 4 warnings, 493 lines checked

Patch 17/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.

18/22 Checking commit 360201025f02 (hw/rx: Honor -accel qtest)
19/22 Checking commit 46a5463dc037 (hw/rx: Restrict the RX62N microcontroller to the RX62N CPU core) 20/22 Checking commit d928a9664d5d (Add rx-softmmu)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#69:
new file mode 100644

total: 0 errors, 1 warnings, 83 lines checked

Patch 20/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
21/22 Checking commit b7f311fc5ce4 (BootLinuxConsoleTest: Test the RX-Virt machine) 22/22 Checking commit 96043cc86d23 (qemu-doc.texi: Add RX section.) === OUTPUT END ===

Test command exited with code: 1

The full log is available at
http://patchew.org/logs/[email protected]/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to [email protected]

#31 lore raw
In reply to Yoshinori Sato
Patchew URL: https://patchew.org/QEMU/[email protected]/

Patchew URL: https://patchew.org/QEMU/[email protected]/

Hi,

This series seems to have some coding style problems. See output below for more information:

Subject: [PATCH v30 00/22] Add RX archtecture support
Message-id: [email protected]
Type: series

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
- [tag update] patchew/[email protected] -> patchew/[email protected]
Switched to a new branch 'test'
01f0378 qemu-doc.texi: Add RX section.
756b686 BootLinuxConsoleTest: Test the RX-Virt machine 837ab5e Add rx-softmmu
a54c4a7 hw/rx: Restrict the RX62N microcontroller to the RX62N CPU core 8f05d87 hw/rx: Honor -accel qtest
17b5d48 hw/rx: RX Target hardware definition
15aaf04 hw/char: RX62N serial communication interface (SCI) 863466a hw/timer: RX62N internal timer modules
8e2ddf8 hw/intc: RX62N interrupt controller (ICUa)
c2b722c target/rx: Dump bytes for each insn during disassembly abe5c93 target/rx: Collect all bytes during disassembly 2856668 target/rx: Emit all disassembly in one prt()
fbb8022 target/rx: Use prt_ldmi for XCHG_mr disassembly e02a968 target/rx: Replace operand with prt_ldmi in disassembler ebe47d5 target/rx: Disassemble rx_index_addr into a string 2123e83 target/rx: RX disassembler
62b81b7 target/rx: CPU definition
d4da3eb target/rx: TCG helper
c6645faa target/rx: TCG translation
97f0ecf hw/registerfields.h: Add 8bit and 16bit register macros 4d682d8 qemu/bitops.h: Add extract8 and extract16
6e4e0c1 MAINTAINERS: Add RX

=== OUTPUT BEGIN ===
1/22 Checking commit 6e4e0c17243b (MAINTAINERS: Add RX)
2/22 Checking commit 4d682d871146 (qemu/bitops.h: Add extract8 and extract16) 3/22 Checking commit 97f0ecffe465 (hw/registerfields.h: Add 8bit and 16bit register macros) Use of uninitialized value in concatenation (.) or string at ./scripts/checkpatch.pl line 2490.
ERROR: Macros with multiple statements should be enclosed in a do - while loop #27: FILE: include/hw/registerfields.h:25:
+#define REG8(reg, addr) \
+ enum { A_ ## reg = (addr) }; \
+ enum { R_ ## reg = (addr) };

ERROR: Macros with multiple statements should be enclosed in a do - while loop #31: FILE: include/hw/registerfields.h:29:
+#define REG16(reg, addr) \
+ enum { A_ ## reg = (addr) }; \
+ enum { R_ ## reg = (addr) / 2 };

total: 2 errors, 0 warnings, 56 lines checked

Patch 3/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.

4/22 Checking commit c6645faa5ab8 (target/rx: TCG translation)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #20:
new file mode 100644

total: 0 errors, 1 warnings, 3065 lines checked

Patch 4/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
5/22 Checking commit d4da3eb54e32 (target/rx: TCG helper)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #21:
new file mode 100644

total: 0 errors, 1 warnings, 650 lines checked

Patch 5/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
6/22 Checking commit 62b81b7701c5 (target/rx: CPU definition)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #22:
new file mode 100644

total: 0 errors, 1 warnings, 659 lines checked

Patch 6/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
7/22 Checking commit 2123e834292a (target/rx: RX disassembler)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #38:
new file mode 100644

total: 0 errors, 1 warnings, 1497 lines checked

Patch 7/22 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
8/22 Checking commit ebe47d55bde6 (target/rx: Disassemble rx_index_addr into a string) 9/22 Checking commit e02a9686860e (target/rx: Replace operand with prt_ldmi in disassembler) 10/22 Checking commit fbb8022a3edc (target/rx: Use prt_ldmi for XCHG_mr disassembly) 11/22 Checking commit 2856668a7c4a (target/rx: Emit all disassembly in one prt()) 12/22 Checking commit abe5c9380941 (target/rx: Collect all bytes during disassembly) 13/22 Checking commit c2b722c81fe2 (target/rx: Dump bytes for each insn during disassembly) 14/22 Checking commit 8e2ddf8e72aa (hw/intc: RX62N interrupt controller (ICUa))
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #40:
new file mode 100644

total: 0 errors, 1 warnings, 445 lines checked

Patch 14/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
15/22 Checking commit 863466adfcc5 (hw/timer: RX62N internal timer modules)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #50:
new file mode 100644

total: 0 errors, 1 warnings, 845 lines checked

Patch 15/22 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
16/22 Checking commit 15aaf048e883 (hw/char: RX62N serial communication interface (SCI))
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #43:
new file mode 100644

total: 0 errors, 1 warnings, 400 lines checked

Patch 16/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
17/22 Checking commit 17b5d48e9ee0 (hw/rx: RX Target hardware definition)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #23:
new file mode 100644

ERROR: trailing whitespace
#128: FILE: hw/rx/rx-virt.c:73:
+ $

ERROR: trailing whitespace
#146: FILE: hw/rx/rx-virt.c:91:
+ /* The kernel image is loaded into $

WARNING: Block comments use a leading /* on a separate line #146: FILE: hw/rx/rx-virt.c:91:
+ /* The kernel image is loaded into

WARNING: Block comments use * on subsequent lines
#147: FILE: hw/rx/rx-virt.c:92:
+ /* The kernel image is loaded into
+ the latter half of the SDRAM space. */

WARNING: Block comments use a trailing */ on a separate line #147: FILE: hw/rx/rx-virt.c:92:
+ the latter half of the SDRAM space. */

total: 2 errors, 4 warnings, 493 lines checked

Patch 17/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.

18/22 Checking commit 8f05d879200d (hw/rx: Honor -accel qtest)
19/22 Checking commit a54c4a7c0cde (hw/rx: Restrict the RX62N microcontroller to the RX62N CPU core) 20/22 Checking commit 837ab5e2281d (Add rx-softmmu)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#69:
new file mode 100644

total: 0 errors, 1 warnings, 83 lines checked

Patch 20/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
21/22 Checking commit 756b686baccc (BootLinuxConsoleTest: Test the RX-Virt machine) 22/22 Checking commit 01f0378fbddb (qemu-doc.texi: Add RX section.) === OUTPUT END ===

Test command exited with code: 1

The full log is available at
http://patchew.org/logs/[email protected]/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to [email protected]

#32 lore raw
In reply to Yoshinori Sato
Patchew URL: https://patchew.org/QEMU/[email protected]/

Patchew URL: https://patchew.org/QEMU/[email protected]/

Hi,

This series seems to have some coding style problems. See output below for more information:

Subject: [PATCH v30 00/22] Add RX archtecture support
Message-id: [email protected]
Type: series

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
- [tag update] patchew/[email protected] -> patchew/[email protected]
Switched to a new branch 'test'
babc84a qemu-doc.texi: Add RX section.
02671a3 BootLinuxConsoleTest: Test the RX-Virt machine a7b171f Add rx-softmmu
157d061 hw/rx: Restrict the RX62N microcontroller to the RX62N CPU core 6dd9e29 hw/rx: Honor -accel qtest
531f2e7 hw/rx: RX Target hardware definition
2f84384 hw/char: RX62N serial communication interface (SCI) efb672d hw/timer: RX62N internal timer modules
2ecc8e8 hw/intc: RX62N interrupt controller (ICUa)
c48b1e3 target/rx: Dump bytes for each insn during disassembly cf6bd23 target/rx: Collect all bytes during disassembly 0630f57 target/rx: Emit all disassembly in one prt()
c68232e target/rx: Use prt_ldmi for XCHG_mr disassembly 0c715cf target/rx: Replace operand with prt_ldmi in disassembler 56823e8 target/rx: Disassemble rx_index_addr into a string bec88c6 target/rx: RX disassembler
e087756 target/rx: CPU definition
76fbf4b target/rx: TCG helper
077b749 target/rx: TCG translation
077083d hw/registerfields.h: Add 8bit and 16bit register macros 0e0b064 qemu/bitops.h: Add extract8 and extract16
e057d0d MAINTAINERS: Add RX

=== OUTPUT BEGIN ===
1/22 Checking commit e057d0d1eaa7 (MAINTAINERS: Add RX)
2/22 Checking commit 0e0b0640e7e8 (qemu/bitops.h: Add extract8 and extract16) 3/22 Checking commit 077083db9152 (hw/registerfields.h: Add 8bit and 16bit register macros) Use of uninitialized value in concatenation (.) or string at ./scripts/checkpatch.pl line 2490.
ERROR: Macros with multiple statements should be enclosed in a do - while loop #27: FILE: include/hw/registerfields.h:25:
+#define REG8(reg, addr) \
+ enum { A_ ## reg = (addr) }; \
+ enum { R_ ## reg = (addr) };

ERROR: Macros with multiple statements should be enclosed in a do - while loop #31: FILE: include/hw/registerfields.h:29:
+#define REG16(reg, addr) \
+ enum { A_ ## reg = (addr) }; \
+ enum { R_ ## reg = (addr) / 2 };

total: 2 errors, 0 warnings, 56 lines checked

Patch 3/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.

4/22 Checking commit 077b74916e86 (target/rx: TCG translation)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #20:
new file mode 100644

total: 0 errors, 1 warnings, 3065 lines checked

Patch 4/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
5/22 Checking commit 76fbf4b71e73 (target/rx: TCG helper)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #21:
new file mode 100644

total: 0 errors, 1 warnings, 650 lines checked

Patch 5/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
6/22 Checking commit e087756e80bc (target/rx: CPU definition)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #22:
new file mode 100644

total: 0 errors, 1 warnings, 659 lines checked

Patch 6/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
7/22 Checking commit bec88c65c6d9 (target/rx: RX disassembler)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #38:
new file mode 100644

total: 0 errors, 1 warnings, 1497 lines checked

Patch 7/22 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
8/22 Checking commit 56823e81616e (target/rx: Disassemble rx_index_addr into a string) 9/22 Checking commit 0c715cfcaf50 (target/rx: Replace operand with prt_ldmi in disassembler) 10/22 Checking commit c68232e9cbaa (target/rx: Use prt_ldmi for XCHG_mr disassembly) 11/22 Checking commit 0630f571ce7f (target/rx: Emit all disassembly in one prt()) 12/22 Checking commit cf6bd23f5f99 (target/rx: Collect all bytes during disassembly) 13/22 Checking commit c48b1e310d06 (target/rx: Dump bytes for each insn during disassembly) 14/22 Checking commit 2ecc8e8d62d7 (hw/intc: RX62N interrupt controller (ICUa))
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #40:
new file mode 100644

total: 0 errors, 1 warnings, 445 lines checked

Patch 14/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
15/22 Checking commit efb672d6bcee (hw/timer: RX62N internal timer modules)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #50:
new file mode 100644

total: 0 errors, 1 warnings, 845 lines checked

Patch 15/22 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
16/22 Checking commit 2f843848c4d1 (hw/char: RX62N serial communication interface (SCI))
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #43:
new file mode 100644

total: 0 errors, 1 warnings, 400 lines checked

Patch 16/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
17/22 Checking commit 531f2e7ba4e9 (hw/rx: RX Target hardware definition)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #23:
new file mode 100644

ERROR: trailing whitespace
#128: FILE: hw/rx/rx-virt.c:73:
+ $

ERROR: trailing whitespace
#146: FILE: hw/rx/rx-virt.c:91:
+ /* The kernel image is loaded into $

WARNING: Block comments use a leading /* on a separate line #146: FILE: hw/rx/rx-virt.c:91:
+ /* The kernel image is loaded into

WARNING: Block comments use * on subsequent lines
#147: FILE: hw/rx/rx-virt.c:92:
+ /* The kernel image is loaded into
+ the latter half of the SDRAM space. */

WARNING: Block comments use a trailing */ on a separate line #147: FILE: hw/rx/rx-virt.c:92:
+ the latter half of the SDRAM space. */

total: 2 errors, 4 warnings, 493 lines checked

Patch 17/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.

18/22 Checking commit 6dd9e29294c7 (hw/rx: Honor -accel qtest)
19/22 Checking commit 157d061f696c (hw/rx: Restrict the RX62N microcontroller to the RX62N CPU core) 20/22 Checking commit a7b171fcf22b (Add rx-softmmu)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#69:
new file mode 100644

total: 0 errors, 1 warnings, 83 lines checked

Patch 20/22 has style problems, please review. If any of these errors are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
21/22 Checking commit 02671a3e7d1a (BootLinuxConsoleTest: Test the RX-Virt machine) 22/22 Checking commit babc84a4f27c (qemu-doc.texi: Add RX section.) === OUTPUT END ===

Test command exited with code: 1

The full log is available at
http://patchew.org/logs/[email protected]/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to [email protected]