On Tue, Oct 19, 2021 at 11:45 AM Warner Losh wrote:
>
> As part of upstreaming, the include guards have been made more
> consistent. Update this file to use the new guards.
>
> Signed-off-by: Warner Losh
> ---
> bsd-user/arm/target_arch_sysarch.h | 6 +++---
> 1 file changed, 3 insertions(+), 3
On Tue, Oct 19, 2021 at 11:45 AM Warner Losh wrote:
>
> The preferred name for the 32-bit arm is now armv7. Update the name to
> reflect that. In addition, add Stacey's copyright to this file and
> update the include guards to the new convention.
>
> Signed-off-by: Stacey Son
> Signed-off-by: War
On Tue, Oct 19, 2021 at 11:45 AM Warner Losh wrote:
>
> Implement target_cpu_clone_regs to clone the resister state on a fork.
>
> Signed-off-by: Stacey Son
> Signed-off-by: Warner Losh
> ---
> bsd-user/arm/target_arch_cpu.h | 8
> 1 file changed, 8 insertions(+)
>
> diff --git a/bsd-u
On Tue, Oct 19, 2021 at 11:45 AM Warner Losh wrote:
>
> Implement the system call dispatch. This implements all three kinds of
> system call: direct and the two indirect variants. It handles all the
> special cases for thumb as well.
>
> Signed-off-by: Stacey Son
> Signed-off-by: Klye Evans
> Si
On Tue, Oct 19, 2021 at 11:45 AM Warner Losh wrote:
>
> target_arch_cpu.h is for CPU loop definitions. Create the file and
> define target_cpu_init and target_cpu_reset for arm.
>
> Signed-off-by: Olivier Houchard
> Signed-off-by: Stacey Son
> Signed-off-by: Warner Losh
> ---
> bsd-user/arm/ta
On Tue, Oct 19, 2021 at 11:45 AM Warner Losh wrote:
>
> Target specific TLS routines to get and set the TLS values.
>
> Signed-off-by: Klye Evans
s/Klye/Kyle/ :-)
> Signed-off-by: Stacey Son
> Signed-off-by: Warner Losh
> ---
> bsd-user/arm/target_arch.h | 28
>
On Tue, Oct 19, 2021 at 11:45 AM Warner Losh wrote:
>
> Add a boiler plate CPU loop that does nothing except return an error for
> all traps.
>
> Signed-off-by: Sean Bruno
> Signed-off-by: Stacey Son
> Signed-off-by: Warner Losh
> ---
> bsd-user/arm/target_arch_cpu.h | 22 +
On 10/22/21 19:45, Philippe Mathieu-Daudé wrote:
> When using the Loongson-3A4000 CPU, the MSAIR is returned with a
> zero value (because unimplemented). Checking on real hardware,
> this value appears incorrect:
>
> $ cat /proc/cpuinfo
> system type : generic-loongson-machine
> machine
The advanced interrupt architecture (AIA) extends the per-HART local
interrupt support. Along with this, it also adds IMSIC (MSI contrllor)
and Advanced PLIC (wired interrupt controller).
The latest AIA draft specification can be found here:
https://github.com/riscv/riscv-aia/releases/download/0.2
We should be returning illegal instruction trap when RV64 HS-mode tries
to access RV32 HS-mode CSR.
Fixes: d6f20dacea51 ("target/riscv: Fix 32-bit HS mode access permissions")
Signed-off-by: Anup Patel
Reviewed-by: Alistair Francis
---
target/riscv/csr.c | 2 +-
1 file changed, 1 insertion(+),
The hgeie and hgeip CSRs are required for emulating an external
interrupt controller capable of injecting virtual external
interrupt to Guest/VM running at VS-level.
Signed-off-by: Anup Patel
Reviewed-by: Alistair Francis
---
target/riscv/cpu.c| 61 --
A hypervsior can optionally take guest external interrupts using
SGEIP bit of hip and hie CSRs.
Signed-off-by: Anup Patel
Reviewed-by: Alistair Francis
---
target/riscv/cpu.c | 3 ++-
target/riscv/cpu_bits.h | 3 +++
target/riscv/csr.c | 18 +++---
3 files changed, 16 in
The machine or device emulation should be able to force set certain
CPU features because:
1) We can have certain CPU features which are in-general optional
but implemented by RISC-V CPUs on the machine.
2) We can have devices which require a certain CPU feature. For example,
AIA IMSIC devices
We define a CPU feature for AIA CSR support in RISC-V CPUs which
can be set by machine/device emulation. The RISC-V CSR emulation
will also check this feature for emulating AIA CSRs.
Signed-off-by: Anup Patel
Reviewed-by: Bin Meng
Reviewed-by: Alistair Francis
---
target/riscv/cpu.h | 3 ++-
1
The guest external interrupts from an interrupt controller are
delivered only when the Guest/VM is running (i.e. V=1). This means
any guest external interrupt which is triggered while the Guest/VM
is not running (i.e. V=0) will be missed on QEMU resulting in Guest
with sluggish response to serial c
The AIA specificaiton adds interrupt filtering support for M-mode
and HS-mode. Using AIA interrupt filtering M-mode and H-mode can
take local interrupt 13 or above and selectively inject same local
interrupt to lower privilege modes.
At the moment, we don't have any local interrupts above 12 so we
The AIA spec defines programmable 8-bit priority for each local interrupt
at M-level, S-level and VS-level so we extend local interrupt processing
to consider AIA interrupt priorities. The AIA CSRs which help software
configure local interrupt priorities will be added by subsequent patches.
Signed
The AIA specification defines IMSIC interface CSRs for easy access
to the per-HART IMSIC registers without using indirect xiselect and
xireg CSRs. This patch implements the AIA IMSIC interface CSRs.
Signed-off-by: Anup Patel
---
target/riscv/csr.c | 199 ++
The RISC-V AIA specification extends RISC-V local interrupts and
introduces new CSRs. This patch adds defines for the new AIA CSRs.
Signed-off-by: Anup Patel
---
target/riscv/cpu_bits.h | 128
1 file changed, 128 insertions(+)
diff --git a/target/riscv/c
The AIA specification adds new CSRs for RV32 so that RISC-V hart can
support 64 local interrupts on both RV32 and RV64.
Signed-off-by: Anup Patel
---
target/riscv/cpu.h| 14 +-
target/riscv/cpu_helper.c | 10 +-
target/riscv/csr.c| 560 +++---
ta
The RISC-V AIA (Advanced Interrupt Architecture) defines a new
interrupt controller for MSIs (message signal interrupts) called
IMSIC (Incoming Message Signal Interrupt Controller). The IMSIC
is per-HART device and also suppport virtualizaiton of MSIs using
dedicated VS-level guest interrupt files.
The AIA specification introduces new [m|s|vs]topi CSRs for
reporting pending local IRQ number and associated IRQ priority.
Signed-off-by: Anup Patel
---
target/riscv/csr.c | 154 +
1 file changed, 154 insertions(+)
diff --git a/target/riscv/csr.c b/ta
The AIA device emulation (such as AIA IMSIC) should be able to set
(or provide) AIA ireg read-modify-write callback for each privilege
level of a RISC-V HART.
Signed-off-by: Anup Patel
---
target/riscv/cpu.h| 19 +++
target/riscv/cpu_helper.c | 14 ++
2 files
The AIA specification defines [m|s|vs]iselect and [m|s|vs]ireg CSRs
which allow indirect access to interrupt priority arrays and per-HART
IMSIC registers. This patch implements AIA xiselect and xireg CSRs.
Signed-off-by: Anup Patel
---
target/riscv/cpu.h | 7 ++
target/riscv/csr.c | 17
We should use the AIA INTC compatible string in the CPU INTC
DT nodes when the CPUs support AIA feature. This will allow
Linux INTC driver to use AIA local interrupt CSRs.
Signed-off-by: Anup Patel
Reviewed-by: Alistair Francis
---
hw/riscv/virt.c | 13 +++--
1 file changed, 11 insertio
We have two new machine options "aia" and "aia-guests" available
for the RISC-V virt machine so let's document these options.
Signed-off-by: Anup Patel
Reviewed-by: Alistair Francis
---
docs/system/riscv/virt.rst | 16
1 file changed, 16 insertions(+)
diff --git a/docs/system/
The AIA hvictl and hviprioX CSRs allow hypervisor to control
interrupts visible at VS-level. This patch implements AIA hvictl
and hviprioX CSRs.
Signed-off-by: Anup Patel
---
target/riscv/cpu.h | 1 +
target/riscv/csr.c | 126 +
target/riscv/mach
We add "x-aia" command-line option for RISC-V HART using which
allows users to force enable CPU AIA CSRs without changing the
interrupt controller available in RISC-V machine.
Signed-off-by: Anup Patel
Reviewed-by: Alistair Francis
---
target/riscv/cpu.c | 5 +
target/riscv/cpu.h | 1 +
2 f
The RISC-V AIA (Advanced Interrupt Architecture) defines a new
interrupt controller for wired interrupts called APLIC (Advanced
Platform Level Interrupt Controller). The APLIC is capabable of
forwarding wired interupts to RISC-V HARTs directly or as MSIs
(Message Signaled Interupts).
This patch ad
We extend virt machine to emulate AIA APLIC devices only when
"aia=aplic" parameter is passed along with machine name in QEMU
command-line. When "aia=none" or not specified then we fallback
to original PLIC device emulation.
Signed-off-by: Anup Patel
---
hw/riscv/Kconfig| 1 +
hw/riscv
We extend virt machine to emulate both AIA IMSIC and AIA APLIC
devices only when "aia=aplic-imsic" parameter is passed along
with machine name in the QEMU command-line. The AIA IMSIC is
only a per-HART MSI controller so we use AIA APLIC in MSI-mode
to forward all wired interrupts as MSIs to the AIA
On Fri, 22 Oct 2021, Richard Henderson wrote:
On 10/21/21 12:45 PM, matheus.fe...@eldorado.org.br wrote:
+#if defined(TARGET_PPC64)
+return do_vinsx(ctx, a->vrt, size, right, cpu_gpr[a->vra],
cpu_gpr[a->vrb],
+gen_helper);
+#else
+bool ok;
+TCGv_i64 val;
+
+
在 2021/10/22 18:45, Philippe Mathieu-Daudé 写道:
When using the Loongson-3A4000 CPU, the MSAIR is returned with a
zero value (because unimplemented). Checking on real hardware,
this value appears incorrect:
$ cat /proc/cpuinfo
system type : generic-loongson-machine
machine :
Hello,
On Sat, 23 Oct 2021, John Paul Adrian Glaubitz wrote:
On 10/23/21 03:07, BALATON Zoltan wrote:
I can confirm that the default config works for me, too. Both with gcc-8 and
gcc-11.
OK with your config I can reproduce the problem too but the kernel with that
config
is 177MB and the r2d
Hi Kunkun,
On 10/22/21 12:01 PM, Kunkun Jiang wrote:
> Hi Eric,
>
> On 2021/10/22 0:15, Eric Auger wrote:
>> Hi Kunkun,
>>
>> On 9/14/21 3:53 AM, Kunkun Jiang wrote:
>>> We expand MemoryRegions of vfio-pci sub-page MMIO BARs to
>>> vfio_pci_write_config to improve IO performance.
>> s/to vfio_pci_
On Sat, Oct 23, 2021 at 1:34 AM Kyle Evans wrote:
> On Tue, Oct 19, 2021 at 11:45 AM Warner Losh wrote:
> >
> > Implement the system call dispatch. This implements all three kinds of
> > system call: direct and the two indirect variants. It handles all the
> > special cases for thumb as well.
>
We do not want a shell command substitution, but a parameter
substitution (with assignment). Replace $() -> ${}, otherwise
the expanded command return an empty string and the $cross_cc
variable is not set.
Fixes: 634ef789f8e ("tests/tcg: add more default compilers to configure.sh")
Signed-off-by:
Philippe Mathieu-Daudé writes:
> We do not want a shell command substitution, but a parameter
> substitution (with assignment). Replace $() -> ${}, otherwise
> the expanded command return an empty string and the $cross_cc
> variable is not set.
Queued to testing/next, thanks.
--
Alex Bennée
On Sat, Oct 23, 2021 at 7:47 PM Alex Bennée wrote:
> Philippe Mathieu-Daudé writes:
>
> > We do not want a shell command substitution, but a parameter
> > substitution (with assignment). Replace $() -> ${}, otherwise
> > the expanded command return an empty string and the $cross_cc
> > variable i
On 10/22/21 3:11 PM, Luis Fernando Fujita Pires wrote:
From: Richard Henderson
@@ -1392,18 +1408,18 @@ void tcg_optimize(TCGContext *s)
/* Proceed with possible constant folding. */
break;
}
-if (opc == INDEX_op_sub_
From: Greg Kurz
All of these pages live in the wiki, not in the main web site.
Signed-off-by: Greg Kurz
Reviewed-by: Laurent Vivier
Tested-by: Laurent Vivier
Message-Id: <163456470882.196333.17366490695504718038.stgit@bahia.huguette>
Signed-off-by: Laurent Vivier
---
README.rst | 14 +++
From: Oğuz Ersen
Message-Id:
Signed-off-by: Oğuz Ersen
Reviewed-by: Laurent Vivier
[lv,pb: s/K_opyala/_Kopyala/;s/Se_kmeleri/_Sekmeleri/]
Signed-off-by: Laurent Vivier
---
po/tr.po | 25 -
1 file changed, 12 insertions(+), 13 deletions(-)
diff --git a/po/tr.po b/po/
branch-for-6.2-pull-request
for you to fetch changes up to 2c92be50bcfa8b7529a39fc99078ef14dcfc71aa:
analyze-migration.py: fix extract contents ('-x') errors (2021-10-23 20:28:56
+0200)
Trivial patches p
From: Greg Kurz
Fix the comment to match what the code is doing, as explained in
the changelog of commit 86cf9e154632cb28d749db0ea47946fba8cf3f09
that introduced the change:
Commit 9458a9a1df1a4c719e24512394d548c1fc7abd22 added synchronization
of vCPU and migration operations through cal
From: Philippe Mathieu-Daudé
We are going to modify this function, fix its style first.
Signed-off-by: Philippe Mathieu-Daudé
Reviewed-by: Laurent Vivier
Reviewed-by: Thomas Huth
Message-Id: <20210807110939.95853-2-f4...@amsat.org>
Signed-off-by: Laurent Vivier
---
disas/nios2.c | 55 ++
From: Philippe Mathieu-Daudé
Since commit 12b6e9b27d4 ("disas: Clean up CPUDebug initialization")
the disassemble_info->bfd_endian enum is set for all targets in
target_disas(). We can directly call print_insn_nios2() and simplify.
Signed-off-by: Philippe Mathieu-Daudé
Reviewed-by: Laurent Vivi
From: Philippe Mathieu-Daudé
In order to help Eduardo and Marcel with the machine
core API, add myself as reviewer. That will also help
me to learn more about this subsystem :)
Signed-off-by: Philippe Mathieu-Daudé
Reviewed by: Marcel Apfelbaum
Message-Id: <20211007093108.323223-1-phi...@redha
From: Laurent Vivier
The parameters of '-d' can be either 'state' or 'desc', not 'dump'
as it is reported in the error message.
Fixes: b17425701d66 ("Add migration stream analyzation script")
Signed-off-by: Laurent Vivier
Reviewed-by: Philippe Mathieu-Daudé
Message-Id: <20211015131645.501281-2
From: Laurent Vivier
When we try to use 'analyze-migration.py -x' with python3,
we have the following errors:
Traceback (most recent call last):
File "scripts/analyze-migration.py", line 593, in
f.write(jsonenc.encode(dump.vmsd_desc))
TypeError: a bytes-like object is required, no
From: Tong Ho
Signed-off-by: Tong Ho
Reviewed-by: Edgar E. Iglesias
Reviewed-by: Francisco Iglesias
Reviewed-by: Philippe Mathieu-Daudé
Message-Id: <20211015203532.2463705-2-tong...@xilinx.com>
Signed-off-by: Laurent Vivier
---
hw/nvram/xlnx-efuse.c | 9 ++---
1 file changed, 6 insertio
On 10/23/21 3:12 AM, BALATON Zoltan wrote:
You mentioning target_ulong reminded me a question I had. Currently we have
qemu-system-ppc and qemu-system-ppc64 but the latter includes all machines of the former
too so you could run for example sam460ex with qemu-system-ppc64 (except mac99 which
be
From: Tong Ho
Signed-off-by: Tong Ho
Reviewed-by: Edgar E. Iglesias
Reviewed-by: Francisco Iglesias
Reviewed-by: Philippe Mathieu-Daudé
Message-Id: <20211015203532.2463705-4-tong...@xilinx.com>
Signed-off-by: Laurent Vivier
---
hw/nvram/xlnx-zynqmp-efuse.c | 18 --
1 file ch
From: Tong Ho
Signed-off-by: Tong Ho
Reviewed-by: Edgar E. Iglesias
Reviewed-by: Francisco Iglesias
Reviewed-by: Philippe Mathieu-Daudé
Message-Id: <20211015203532.2463705-3-tong...@xilinx.com>
Signed-off-by: Laurent Vivier
---
hw/nvram/xlnx-versal-efuse-ctrl.c | 20 +++-
1
When converting a siginfo_t from waitid(), the interpretation of si_status
depends on the value of si_code: For CLD_EXITED, it is an exit code and
should be copied verbatim. For other codes, it is a signal number
(possibly with additional high bits from ptrace) that should be mapped.
This code was
On 10/21/21 12:45 PM, matheus.fe...@eldorado.org.br wrote:
From: Matheus Ferst
Implement the following PowerISA v3.1 instructions:
vextdubvlx: Vector Extract Double Unsigned Byte to VSR using
GPR-specified Left-Index
vextduhvlx: Vector Extract Double Unsigned Halfword to VSR using
On Sat, 23 Oct 2021, Richard Henderson wrote:
On 10/23/21 3:12 AM, BALATON Zoltan wrote:
You mentioning target_ulong reminded me a question I had. Currently we have
qemu-system-ppc and qemu-system-ppc64 but the latter includes all machines
of the former too so you could run for example sam460ex
On 10/23/21 1:02 PM, BALATON Zoltan wrote:
So may question was not if it's possible but if having target_ulong different from what we
had in qemu-system-ppc could cause any problems? I have no experience running 32-bit
guests with qemu-system-ppc64 but previously when this came up one difference
On 10/21/21 12:45 PM, matheus.fe...@eldorado.org.br wrote:
From: "Bruno Larsen (billionai)"
Introduce the macro to centralize checking if the VSX facility is
enabled and handle it correctly.
Signed-off-by: Bruno Larsen (billionai)
Signed-off-by: Luis Pires
Signed-off-by: Matheus Ferst
---
tar
On Sat, Oct 23, 2021 at 07:52:21AM +0530, Ani Sinha wrote:
>
>
> On Fri, 22 Oct 2021, Eric DeVolder wrote:
>
> > Ani, inline below.
> > eric
> >
> > On 10/22/21 05:18, Ani Sinha wrote:
> > >
> > >
> > > On Fri, 15 Oct 2021, Eric DeVolder wrote:
> > >
> > > > This change exposes ACPI ERST support
On Fri, Oct 22, 2021 at 03:58:28PM +0100, Jean-Philippe Brucker wrote:
> On Fri, Oct 22, 2021 at 10:46:08AM -0400, Michael S. Tsirkin wrote:
> > On Wed, Oct 13, 2021 at 05:06:08PM +0100, Jean-Philippe Brucker wrote:
> > > Since commit d8fb7d0969d5 ("vl: switch -M parsing to keyval"), machine
> > >
On 10/21/21 12:45 PM, matheus.fe...@eldorado.org.br wrote:
+static bool do_lstxv(DisasContext *ctx, int ra, int displ,
+ int rt, bool store)
You need an int64_t displ before you add PLXV et al. What happened to passing in arg_D as
for the other integer instructions?
+
On 10/21/21 12:45 PM, matheus.fe...@eldorado.org.br wrote:
@@ -2075,7 +1969,7 @@ static void gen_xvxsigdp(DisasContext *ctx)
tcg_temp_free_i64(xbl);
}
-static bool do_lstxv(DisasContext *ctx, int ra, int displ,
+static bool do_lstxv(DisasContext *ctx, int ra, TCGv displ,
On 10/23/21 1:34 PM, Richard Henderson wrote:
On 10/21/21 12:45 PM, matheus.fe...@eldorado.org.br wrote:
+static bool do_lstxv(DisasContext *ctx, int ra, int displ,
+ int rt, bool store)
You need an int64_t displ before you add PLXV et al. What happened to passing in arg_D
On 10/21/21 12:45 PM, matheus.fe...@eldorado.org.br wrote:
+if (ctx->le_mode) {
+gen_addr_add(ctx, ea, ea, 8);
+offset = -8;
+} else {
+offset = 8;
+}
+
+if (store) {
+get_cpu_vsrh(xt, rt);
+tcg_gen_qemu_st_i64(xt, ea, ctx->mem_idx, mop);
+
On 10/21/21 12:45 PM, matheus.fe...@eldorado.org.br wrote:
if (ctx->le_mode) {
-gen_addr_add(ctx, ea, ea, 8);
+gen_addr_add(ctx, ea, ea, paired ? 24 : 8);
Still questioning the address of the fault, but the rest of it looks ok.
r~
On 10/21/21 12:45 PM, matheus.fe...@eldorado.org.br wrote:
From: "Lucas Mateus Castro (alqotel)"
Implemented the instructions lxvpx and stxvpx using decodetree
Signed-off-by: Lucas Mateus Castro (alqotel)
Signed-off-by: Matheus Ferst
---
target/ppc/insn32.decode| 3 +++
target/p
On 10/21/21 12:45 PM, matheus.fe...@eldorado.org.br wrote:
From: "Lucas Mateus Castro (alqotel)"
Implemented the instructions plxv and pstxv using decodetree
Signed-off-by: Lucas Mateus Castro (alqotel)
Signed-off-by: Matheus Ferst
---
target/ppc/insn64.decode| 10 ++
tar
On 10/21/21 12:45 PM, matheus.fe...@eldorado.org.br wrote:
From: "Lucas Mateus Castro (alqotel)"
Implemented the instructions plxvp and pstxvp using decodetree
Signed-off-by: Lucas Mateus Castro (alqotel)
Signed-off-by: Matheus Ferst
---
target/ppc/insn64.decode| 9 +
tar
On 10/21/21 12:45 PM, matheus.fe...@eldorado.org.br wrote:
From: "Bruno Larsen (billionai)"
Changed the function that handles XXSPLTW emulation to using decodetree,
but still using the same logic.
Signed-off-by: Bruno Larsen (billionai)
Signed-off-by: Matheus Ferst
---
target/ppc/insn32.decod
On 10/21/21 12:45 PM, matheus.fe...@eldorado.org.br wrote:
From: "Bruno Larsen (billionai)"
Changed the function that handles XXSPLTIB emulation to using
decodetree, but still use the same logic as before
Signed-off-by: Bruno Larsen (billionai)
Signed-off-by: Matheus Ferst
---
target/ppc/insn
On 10/21/21 12:45 PM, matheus.fe...@eldorado.org.br wrote:
From: "Bruno Larsen (billionai)"
Implemented XXSPLTI32DX emulation using decodetree
Signed-off-by: Bruno Larsen (billionai)
Signed-off-by: Matheus Ferst
---
target/ppc/insn64.decode| 11
target/ppc/translate/v
On 10/21/21 12:45 PM, matheus.fe...@eldorado.org.br wrote:
From: "Bruno Larsen (billionai)"
Implemented the XXSPLTIW instruction, using decodetree.
Signed-off-by: Bruno Larsen (billionai)
Signed-off-by: Matheus Ferst
---
target/ppc/insn64.decode| 6 ++
target/ppc/translate/v
On 10/21/21 12:45 PM, matheus.fe...@eldorado.org.br wrote:
From: "Bruno Larsen (billionai)"
Implemented the instruction XXSPLTIDP using decodetree.
Signed-off-by: Bruno Larsen (billionai)
Signed-off-by: Matheus Ferst
---
target/ppc/insn64.decode| 2 ++
target/ppc/translate/vsx-i
On 10/21/21 12:45 PM, matheus.fe...@eldorado.org.br wrote:
From: Matheus Ferst
Signed-off-by: Bruno Larsen (billionai)
Signed-off-by: Matheus Ferst
---
target/ppc/helper.h | 4 +++
target/ppc/insn64.decode| 19 ++
target/ppc/int_helper.c | 15
On 10/21/21 12:45 PM, matheus.fe...@eldorado.org.br wrote:
+static bool trans_LXVKQ(DisasContext *ctx, arg_X_uim5 *a)
+{
+static const uint32_t valid_values = 0b00010010;
All of the specified values are non-zero, so this kinda duplicates the values table.
Otherwise,
Hi,
This series converts 2000+ lines of switch() code to decodetree
description, so this hard-to-review/modify switch is auto generated
by the decodetree script. This is a big win for maintenance (and
indeed the convertion revealed 2 bugs).
Massive convertions are - beside being often boring - bu
We do not want a shell command substitution, but a parameter
substitution (with assignment). Replace $() -> ${}, otherwise
the expanded command return an empty string and the $cross_cc
variable is not set.
Fixes: 634ef789f8e ("tests/tcg: add more default compilers to configure.sh")
Signed-off-by:
The following commits added various user-mode tests
for various MSA instructions:
- 0fdd986a6c8 ("Add tests for MSA integer add instructions")
- 1be82d89011 ("Add tests for MSA integer average instructions")
- 1d336c87a3c ("Add tests for MSA bit set instructions")
- 1e6bea794c8 ("Add tests for
Convert the LDI opcode (Immediate Load) to decodetree. Since it
overlaps with the generic MSA handler, use a decodetree overlap
group.
Since the 'data format' field is a constant value, use
tcg_constant_i32() instead of a TCG temporary.
Signed-off-by: Philippe Mathieu-Daudé
---
target/mips/tcg/
Convert 3-register instructions with implicit data formats
to decodetree.
Signed-off-by: Philippe Mathieu-Daudé
---
target/mips/tcg/msa.decode | 8
target/mips/tcg/msa_translate.c | 82 +++--
2 files changed, 24 insertions(+), 66 deletions(-)
diff --git a/
The result of the 'Vector Multiply and Subtract' opcode is
incorrect with Byte vectors. Probably due to a copy/paste error,
commit 5f148a02327 mistakenly used the $wt (target register)
instead of $wd (destination register) as first operand. Fix that.
Cc: Aleksandar Rikalo
Fixes: 5f148a02327 ("ta
The result of the 'Vector Multiply and Add' opcode is incorrect
with Byte vectors. Probably due to a copy/paste error, commit
7a7a162adde mistakenly used the $wt (target register) instead
of $wd (destination register) as first operand. Fix that.
Cc: Aleksandar Rikalo
Fixes: 7a7a162adde ("target/m
Extract the common code which parses data formats to an helper.
Signed-off-by: Philippe Mathieu-Daudé
---
target/mips/tcg/msa_translate.c | 68 +++--
1 file changed, 39 insertions(+), 29 deletions(-)
diff --git a/target/mips/tcg/msa_translate.c b/target/mips/tcg/msa_
Have check_msa_access() return a boolean value so we can
return early if MSA is not enabled.
Signed-off-by: Philippe Mathieu-Daudé
---
target/mips/tcg/msa_translate.c | 20 +---
1 file changed, 13 insertions(+), 7 deletions(-)
diff --git a/target/mips/tcg/msa_translate.c b/targe
Replace magic DataFormat value by the corresponding
enum from CPUMIPSMSADataFormat.
Signed-off-by: Philippe Mathieu-Daudé
---
target/mips/tcg/msa_translate.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/target/mips/tcg/msa_translate.c b/target/mips/tcg/msa_translate.
Convert instructions with an immediate bit index and
data format df/m to decodetree.
Since the 'data format' field is a constant value, use
tcg_constant_i32() instead of a TCG temporary.
Signed-off-by: Philippe Mathieu-Daudé
---
target/mips/tcg/msa.decode | 15 +
target/mips/tcg/msa_tr
Convert 3-register operations to decodetree.
Signed-off-by: Philippe Mathieu-Daudé
---
target/mips/tcg/msa.decode | 11 ++
target/mips/tcg/msa_translate.c | 213 +---
2 files changed, 66 insertions(+), 158 deletions(-)
diff --git a/target/mips/tcg/msa.decode b/
Similar to the TRANS() macro introduced in commit fb3164e412d,
introduce TRANS_CHECK() which takes a boolean expression as
argument.
Signed-off-by: Philippe Mathieu-Daudé
---
target/mips/tcg/translate.h | 9 +
1 file changed, 9 insertions(+)
diff --git a/target/mips/tcg/translate.h b/ta
Convert 3-register operations to decodetree.
Since the 'data format' field is a constant value, use
tcg_constant_i32() instead of a TCG temporary.
Signed-off-by: Philippe Mathieu-Daudé
---
target/mips/tcg/msa.decode | 6 ++
target/mips/tcg/msa_translate.c | 35 ++--
This 'shift amount' format is not always 16-bit, so name it
generically as 'sa'. This will help to unify the various
arg_msa decodetree generated structures.
Rename the @bz format -> @bz_v (specific @bz with df=3) and
@bz_df -> @bz (generic @bz).
Signed-off-by: Philippe Mathieu-Daudé
---
target
Convert the SHF opcode (Immediate Set Shuffle Elements) to decodetree.
Since the 'data format' field is a constant value, use
tcg_constant_i32() instead of a TCG temporary.
Signed-off-by: Philippe Mathieu-Daudé
---
target/mips/tcg/msa.decode | 3 +++
target/mips/tcg/msa_translate.c | 47 +
Convert instructions with a 5-bit immediate value to decodetree.
Since the 'data format' field is a constant value, use
tcg_constant_i32() instead of a TCG temporary.
Signed-off-by: Philippe Mathieu-Daudé
---
target/mips/tcg/msa.decode | 15 +
target/mips/tcg/msa_translate.c | 99 +
All opcodes have been converted to decodetree. The generic
MSA handler is now pointless, remove it.
Signed-off-by: Philippe Mathieu-Daudé
---
target/mips/tcg/msa.decode | 2 --
target/mips/tcg/msa_translate.c | 7 ---
2 files changed, 9 deletions(-)
diff --git a/target/mips/tcg/msa.dec
Convert 2-register floating-point operations to decodetree.
Signed-off-by: Philippe Mathieu-Daudé
---
target/mips/tcg/msa.decode | 19 ++
target/mips/tcg/msa_translate.c | 109
2 files changed, 46 insertions(+), 82 deletions(-)
diff --git a/target/mips
Convert 2-register operations to decodetree.
Signed-off-by: Philippe Mathieu-Daudé
---
target/mips/tcg/msa.decode | 3 ++
target/mips/tcg/msa_translate.c | 91 +
2 files changed, 28 insertions(+), 66 deletions(-)
diff --git a/target/mips/tcg/msa.decode b/ta
Convert instructions with an 8-bit immediate value and either
implicit data format or data format df to decodetree.
Signed-off-by: Philippe Mathieu-Daudé
---
target/mips/tcg/msa.decode | 8
target/mips/tcg/msa_translate.c | 72 +
2 files changed, 26 ins
Convert 3-register floating-point or fixed-point operations
to decodetree.
Signed-off-by: Philippe Mathieu-Daudé
---
target/mips/tcg/msa.decode | 8
target/mips/tcg/msa_translate.c | 70 +++--
2 files changed, 39 insertions(+), 39 deletions(-)
diff --git a
Convert instructions with an immediate element index
and data format df/n to decodetree.
Since the 'data format' and 'n' fields are constant values,
use tcg_constant_i32() instead of a TCG temporaries.
Signed-off-by: Philippe Mathieu-Daudé
---
target/mips/tcg/msa.decode | 6 +
target/
Convert load/store instructions to decodetree.
Signed-off-by: Philippe Mathieu-Daudé
---
target/mips/tcg/msa.decode | 4 ++
target/mips/tcg/msa_translate.c | 99 +
2 files changed, 44 insertions(+), 59 deletions(-)
diff --git a/target/mips/tcg/msa.decode b/
Convert the COPY_U opcode (Element Copy to GPR Unsigned) to
decodetree.
Since the 'n' field is a constant value, use tcg_constant_i32()
instead of a TCG temporary.
Signed-off-by: Philippe Mathieu-Daudé
---
target/mips/tcg/msa.decode | 1 +
target/mips/tcg/msa_translate.c | 90
1 - 100 of 135 matches
Mail list logo