[Qemu-devel] [PATCH v8 48/87] target/mips: Add emulation of DSP ASE for nanoMIPS - part 4

2018-08-13 Thread Aleksandar Markovic
From: Stefan Markovic Add emulation of DSP ASE instructions for nanoMIPS - part 4. Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- target/mips/translate.c | 363 1 file changed, 363 insertions(+) diff --git a/target/mips

[Qemu-devel] [PATCH v8 81/87] linux-user: Add support for statx() syscall for all platforms

2018-08-13 Thread Aleksandar Markovic
-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- linux-user/syscall.c | 121 +- linux-user/syscall_defs.h | 38 +++ 2 files changed, 158 insertions(+), 1 deletion(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index bced9b8

[Qemu-devel] [PATCH v8 83/87] linux-user: Add nanoMIPS linux user mode configuration support

2018-08-13 Thread Aleksandar Markovic
From: Stefan Markovic Add new linux user mode configuration for nanoMIPS. Signed-off-by: Aleksandar Rikalo Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- configure | 13 - default-configs/nanomips-linux-user.mak | 1 + 2

[Qemu-devel] [PATCH v8 42/87] target/mips: Implement emulation of nanoMIPS LLWP/SCWP pair

2018-08-13 Thread Aleksandar Markovic
From: Aleksandar Rikalo Implement support for nanoMIPS LLWP/SCWP instruction pair. Signed-off-by: Dimitrije Nikolic Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- linux-user/mips/cpu_loop.c | 25 target/mips/cpu.h | 2 ++ target/mips

[Qemu-devel] [PATCH v8 78/87] linux-user: Add support for nanoMIPS signal trampoline

2018-08-13 Thread Aleksandar Markovic
From: Aleksandar Rikalo Add signal trampoline support for nanoMIPS. Signed-off-by: Aleksandar Rikalo Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- linux-user/mips/signal.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/linux-user

[Qemu-devel] [PATCH v8 05/87] target/mips: Fix two instances of shadow variables

2018-08-13 Thread Aleksandar Markovic
From: Aleksandar Markovic Fix two instances of shadow variables. This cleans up entire file translate.c from shadow variables. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- target/mips/translate.c

[Qemu-devel] [PATCH v8 14/87] target/mips: Add gen_op_addr_addi()

2018-08-13 Thread Aleksandar Markovic
From: Stefan Markovic Add gen_op_addr_addi(). This function will be used in emulation of some nanoMIPS instructions. Reviewed-by: Richard Henderson Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- target/mips/translate.c | 12 1 file changed, 12 insertions

[Qemu-devel] [PATCH v8 29/87] target/mips: Add emulation of nanoMIPS 16-bit load and store instructions

2018-08-13 Thread Aleksandar Markovic
From: Yongbok Kim Add emulation of LWXS16, LB16, SB16, LBU16, LH16, SH16, LHU16, LW16, LWSP16, LW4X4, SW4X4, LWGP16, SWSP16, SW16, and SWGP16 instructions. Signed-off-by: Yongbok Kim Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic Reviewed-by: Aleksandar Markovic

[Qemu-devel] [PATCH v8 75/87] linux-user: Add target_structs.h header for nanoMIPS

2018-08-13 Thread Aleksandar Markovic
From: Dimitrije Nikolic Add target_structs.h header for nanoMIPS, that in fact only redirects to the corresponding MIPS header. Signed-off-by: Aleksandar Rikalo Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- linux-user/nanomips/target_structs.h | 1 + 1 file changed

[Qemu-devel] [PATCH v8 50/87] target/mips: Add emulation of DSP ASE for nanoMIPS - part 6

2018-08-13 Thread Aleksandar Markovic
From: Stefan Markovic Add emulation of DSP ASE instructions for nanoMIPS - part 6. Reviewed-by: Aleksandar Markovic Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- target/mips/translate.c | 62 + 1 file changed, 62

[Qemu-devel] [PATCH v8 85/87] gdbstub: Disable handling of nanoMIPS ISA bit in the MIPS gdbstub

2018-08-13 Thread Aleksandar Markovic
Kim Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- target/mips/gdbstub.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/target/mips/gdbstub.c b/target/mips/gdbstub.c index 18e0e6d..559b69f 100644 --- a/target/mips/gdbstub.c +++ b/target

[Qemu-devel] [PATCH v8 23/87] target/mips: Add placeholder and invocation of decode_nanomips_opc()

2018-08-13 Thread Aleksandar Markovic
From: Aleksandar Markovic Add empty body and invocation of decode_nanomips_opc() if the bit ISA_NANOMIPS32 is set in ctx->insn_flags. Reviewed-by: Richard Henderson Signed-off-by: Yongbok Kim Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- target/mips/translate.c |

[Qemu-devel] [PATCH v8 00/87] Add nanoMIPS support to QEMU

2018-08-13 Thread Aleksandar Markovic
From: Aleksandar Markovic v7->v8: - the series is slightly reorganized so that: - patches 1-19 are fixes and improvements that are not dependent on the existence of nanoMIPS (even though most of them are logicaly connected to (and necessary for) nanoMIPS supp

[Qemu-devel] [PATCH v8 15/87] elf: Remove duplicate preprocessor constant definition

2018-08-13 Thread Aleksandar Markovic
From: Aleksandar Markovic Remove duplicate preprocessor constant definition for EF_MIPS_ARCH. The duplicate was introduced in commit 45506bdd. It placed the constant EF_MIPS_ARCH in a better place, however it did not remove the original. This patch removes the original occurrence. Reviewed

[Qemu-devel] [PATCH v8 22/87] target/mips: Add nanoMIPS DSP ASE opcodes

2018-08-13 Thread Aleksandar Markovic
From: Stefan Markovic Add nanoMIPS opcodes for DSP ASE instruction pools and instructions. Reviewed-by: Richard Henderson Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- target/mips/translate.c | 215 1 file changed, 215

[Qemu-devel] [PATCH v8 07/87] target/mips: Add CP0 BadInstrX register

2018-08-13 Thread Aleksandar Markovic
From: Stefan Markovic Add CP0 BadInstrX register. This register will be used in nanoMIPS. Reviewed-by: Aleksandar Markovic Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Stefan Markovic Signed-off-by: Yongbok Kim Signed-off-by: Aleksandar Markovic

[Qemu-devel] [PATCH v8 34/87] target/mips: Add emulation of nanoMIPS 48-bit instructions

2018-08-13 Thread Aleksandar Markovic
From: Yongbok Kim Add emulation of LI48, ADDIU48, ADDIUGP48, ADDIUPC48, LWPC48, and SWPC48 instructions. Reviewed-by: Richard Henderson Reviewed-by: Aleksandar Markovic Signed-off-by: Yongbok Kim Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- target/mips/translate.c

[Qemu-devel] [PATCH v8 44/87] target/mips: Implement MT ASE support for nanoMIPS

2018-08-13 Thread Aleksandar Markovic
From: Stefan Markovic Add emulation of MT ASE instructions for nanoMIPS. Reviewed-by: Richard Henderson Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- target/mips/translate.c | 85 +++-- 1 file changed, 83 insertions(+), 2

[Qemu-devel] [PATCH v8 68/87] linux-user: Add target_signal.h header for nanoMIPS

2018-08-13 Thread Aleksandar Markovic
From: Aleksandar Rikalo nanoMIPS signal handling is much closer to the signal handling in other mainstream platforms than to the signal handling in preceding MIPS platforms. Signed-off-by: Aleksandar Rikalo Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- linux-user

[Qemu-devel] [PATCH v8 76/87] linux-user: Add target_elf.h header for nanoMIPS

2018-08-13 Thread Aleksandar Markovic
From: Dimitrije Nikolic This header includes common elf header, and adds cpu_get_model() function. Signed-off-by: Aleksandar Rikalo Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- linux-user/nanomips/target_elf.h | 14 ++ 1 file changed, 14 insertions

[Qemu-devel] [PATCH v8 77/87] linux-user: Add signal.c for nanoMIPS

2018-08-13 Thread Aleksandar Markovic
-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- linux-user/mips/signal.c | 25 - linux-user/nanomips/signal.c | 1 + 2 files changed, 21 insertions(+), 5 deletions(-) create mode 100644 linux-user/nanomips/signal.c diff --git a/linux-user/mips/signal.c b/linux

Re: [Qemu-devel] [PATCH v8 09/87] target/mips: Add support for availability control via bit MT

2018-08-13 Thread Aleksandar Markovic
> From: Aleksandar Markovic > Sent: Monday, August 13, 2018 7:52 PM > > Subject: [PATCH v8 09/87] target/mips: Add support for availability control > via bit MT > > From: Aleksandar Rikalo > > Add a field in hflags for MT bit, and functions check_mt() and > c

[Qemu-devel] [PATCH v8 24/87] target/mips: Add nanoMIPS decoding and extraction utilities

2018-08-13 Thread Aleksandar Markovic
From: Aleksandar Markovic Add some basic utility functions and macros for nanoMIPS decoding engine. Reviewed-by: Richard Henderson Signed-off-by: Yongbok Kim Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- target/mips/translate.c | 45

[Qemu-devel] [PATCH v8 12/87] target/mips: Don't update BadVAddr register in Debug Mode

2018-08-13 Thread Aleksandar Markovic
From: Yongbok Kim BadVAddr should not be updated if (env->hflags & MIPS_HFLAG_DM) is set. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Yongbok Kim Signed-off-by: Aleksandar Markovic --- target/mips/helper.c| 4 +++- target/mips/op_helper

[Qemu-devel] [PATCH v8 03/87] target/mips: Avoid case statements formulated by ranges - part 2

2018-08-13 Thread Aleksandar Markovic
From: Aleksandar Rikalo Remove "range style" case statements to make code analysis easier. This patch handles cases when the values in the range in question were not properly defined. Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- target/mips/transl

[Qemu-devel] [PATCH v8 13/87] target/mips: Check ELPA flag only in some cases of MFHC0 and MTHC0

2018-08-13 Thread Aleksandar Markovic
. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Aleksandar Markovic Reviewed-by: Richard Henderson Signed-off-by: Yongbok Kim Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- target/mips/translate.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff

[Qemu-devel] [PATCH v8 25/87] target/mips: Add emulation of nanoMIPS 16-bit arithmetic instructions

2018-08-13 Thread Aleksandar Markovic
From: Yongbok Kim Add emulation of nanoMIPS 16-bit arithmetic instructions. Reviewed-by: Richard Henderson Signed-off-by: Yongbok Kim Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- target/mips/translate.c | 125 1 file

[Qemu-devel] [PATCH v8 31/87] target/mips: Add emulation of nanoMIPS 16-bit save and restore instructions

2018-08-13 Thread Aleksandar Markovic
From: Matthew Fortune Add emulation of SAVE16 and RESTORE.JRC16 instructions. Routines gen_save(), gen_restore(), and gen_adjust_sp() are provided to support this feature. Reviewed-by: Richard Henderson Signed-off-by: Yongbok Kim Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan

[Qemu-devel] [PATCH v8 43/87] target/mips: Add emulation of nanoMIPS 32-bit branch instructions

2018-08-13 Thread Aleksandar Markovic
From: Yongbok Kim Add emulation of various flavors of nanoMIPS 32-bit branch instructions. Reviewed-by: Aleksandar Markovic Signed-off-by: Yongbok Kim Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- target/mips/translate.c | 262

[Qemu-devel] [PATCH v8 66/87] elf: Add nanoMIPS specific variations in ELF header fields

2018-08-13 Thread Aleksandar Markovic
From: Aleksandar Rikalo Add nanoMIPS-related values in ELF header fields as specified in nanoMIPS' "ELF ABI Supplement". Reviewed-by: Aleksandar Markovic Acked-by: Richard Henderson Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- include/

[Qemu-devel] [PATCH v8 61/87] elf: On elf loading, treat both EM_MIPS and EM_NANOMIPS as legal for MIPS

2018-08-13 Thread Aleksandar Markovic
From: Aleksandar Rikalo Modify load_elf32()/load_elf64() to treat EM_NANOMIPS as equal to EM_MIPS. Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- include/hw/elf_ops.h | 8 1 file changed, 8 insertions(+) diff --git a/include/hw/elf_ops.h b/include/hw

[Qemu-devel] [PATCH v8 71/87] linux-user: Add target_fcntl.h header for nanoMIPS

2018-08-13 Thread Aleksandar Markovic
From: Aleksandar Rikalo Add fcntl-related constants and structures for nanoMIPS. Signed-off-by: Aleksandar Rikalo Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- linux-user/nanomips/target_fcntl.h | 38 ++ 1 file changed, 38

[Qemu-devel] [PATCH v8 45/87] target/mips: Add emulation of DSP ASE for nanoMIPS - part 1

2018-08-13 Thread Aleksandar Markovic
From: Stefan Markovic Add emulation of DSP ASE instructions for nanoMIPS - part 1. Reviewed-by: Aleksandar Markovic Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- target/mips/translate.c | 556 1 file changed, 556

[Qemu-devel] [PATCH v8 08/87] target/mips: Add support for availability control via bit XNP

2018-08-13 Thread Aleksandar Markovic
From: Aleksandar Rikalo Add a field in hflags for XNP bit, and a function check_xnp(). Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- target/mips/cpu.h | 3 ++- target/mips/internal.h | 5 - target/mips/translate.c | 12 3 files changed, 18

[Qemu-devel] [PATCH v8 06/87] target/mips: Update some CP0 registers bit definitions

2018-08-13 Thread Aleksandar Markovic
From: Aleksandar Markovic Update CP0 registers Config0, Config1, Config2, Config3, Config4, and Config5 bit definitions. Some of these bits will be utilized by upcoming nanoMIPS changes. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Aleksandar Markovic

[Qemu-devel] [PATCH v8 09/87] target/mips: Add support for availability control via bit MT

2018-08-13 Thread Aleksandar Markovic
From: Aleksandar Rikalo Add a field in hflags for MT bit, and functions check_mt() and check_cp0_mt(). Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- target/mips/cpu.h | 3 ++- target/mips/internal.h | 6 +- target/mips/translate.c | 29

[Qemu-devel] [PATCH v8 30/87] target/mips: Add emulation of nanoMIPS 16-bit logic instructions

2018-08-13 Thread Aleksandar Markovic
From: Yongbok Kim Add emulation of NOT16, AND16, XOR16, OR16 instructions. Reviewed-by: Richard Henderson Signed-off-by: Yongbok Kim Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- target/mips/translate.c | 28 1 file changed, 28

[Qemu-devel] [PATCH v8 40/87] target/mips: Implement emulation of nanoMIPS EXTW instruction

2018-08-13 Thread Aleksandar Markovic
-by: James Hogan Signed-off-by: Yongbok Kim Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic Reviewed-by: Richard Henderson --- target/mips/translate.c | 53 + 1 file changed, 36 insertions(+), 17 deletions(-) diff --git

[Qemu-devel] [PATCH v8 87/87] qemu-doc: Add nanoMIPS-related items

2018-08-13 Thread Aleksandar Markovic
From: Aleksandar Markovic Add nanoMIPS-related items in qemu-doc.texi Reviewed-by: Thomas Huth Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- qemu-doc.texi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/qemu-doc.texi b/qemu-doc.texi index 8ea6bfa..ab2471d

[Qemu-devel] [PATCH v8 80/87] linux-user: Amend support for sigaction() syscall for nanoMIPS

2018-08-13 Thread Aleksandar Markovic
From: Aleksandar Rikalo Amend sigaction syscall support for nanoMIPS. This must be done since nanoMIPS' signal handling is different than MIPS' signal handling. Signed-off-by: Aleksandar Rikalo Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- linux-user/syscall.c | 2

[Qemu-devel] [PATCH v8 67/87] linux-user: Add syscall numbers for nanoMIPS

2018-08-13 Thread Aleksandar Markovic
From: Aleksandar Rikalo Add syscall numbers for nanoMIPS. nanoMIPS redefines its ABI compared to preceding MIPS architectures, and its set of supported system calls is significantly different. Signed-off-by: Aleksandar Rikalo Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic

[Qemu-devel] [PATCH v8 63/87] mips_malta: Add setting up GT64120 BARs to the nanoMIPS bootloader

2018-08-13 Thread Aleksandar Markovic
From: Paul Burton Setup the GT64120 BARs in the nanoMIPS bootloader, in the same way that they are setup in the MIPS32 bootloader. This is necessary for Linux to be able to access peripherals, including the UART. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Aleksandar Markovic Signed-off

[Qemu-devel] [PATCH v8 70/87] linux-user: Update syscall_defs.h header for nanoMIPS

2018-08-13 Thread Aleksandar Markovic
From: Aleksandar Markovic Update constants and structures related to linux user syscall support in nanoMIPS. Signed-off-by: Aleksandar Rikalo Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- linux-user/syscall_defs.h | 57

[Qemu-devel] [PATCH v8 16/87] elf: Add ELF flags for MIPS machine variants

2018-08-13 Thread Aleksandar Markovic
From: Aleksandar Markovic Add MIPS machine variants ELF flags so that the emulation behavior can be adjusted if needed. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Laurent Vivier Reviewed-by: Richard Henderson Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic

[Qemu-devel] [PATCH v8 32/87] target/mips: Add emulation of some common nanoMIPS 32-bit instructions

2018-08-13 Thread Aleksandar Markovic
From: Yongbok Kim Add emulation of SIGRIE, SYSCALL, BREAK, SDBBP, ADDIU, ADDIUPC, ADDIUGP.W, LWGP, SWGP, ORI, XORI, ANDI, and other instructions. Reviewed-by: Aleksandar Markovic Signed-off-by: Yongbok Kim Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- target/mips

[Qemu-devel] [PATCH v8 64/87] mips_malta: Fix semihosting argument passing for nanoMIPS bare metal

2018-08-13 Thread Aleksandar Markovic
From: Stefan Markovic Fix passing argument for nanoMIPS bare metal related to the semihosting regime. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Aleksandar Markovic Signed-off-by: Yongbok Kim Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- hw/mips/mips_malta.c

[Qemu-devel] [PATCH v8 65/87] target/mips: Add definition of nanoMIPS I7200 CPU

2018-08-13 Thread Aleksandar Markovic
From: Stefan Markovic Add definition of the first nanoMIPS processor in QEMU. Signed-off-by: Yongbok Kim Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- target/mips/translate_init.inc.c | 39 +++ 1 file changed, 39 insertions

[Qemu-devel] [PATCH v8 52/87] target/mips: Add handling of branch delay slots for nanoMIPS

2018-08-13 Thread Aleksandar Markovic
From: Matthew Fortune ISA mode bit (LSB of address) is no longer required but is also masked to allow for tools transition. The flag has_isa_mode has the key role in the implementation. Signed-off-by: Yongbok Kim Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- target

[Qemu-devel] [PATCH v8 57/87] target/mips: Fix ERET/ERETNC behavior related to ADEL exception

2018-08-13 Thread Aleksandar Markovic
From: Yongbok Kim Fix ERET/ERETNC so that ADEL exception can be raised. Reviewed-by: Aleksandar Markovic Signed-off-by: Yongbok Kim Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- target/mips/op_helper.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff

[Qemu-devel] [PATCH v8 18/87] linux-user: Add preprocessor availability control to some syscalls

2018-08-13 Thread Aleksandar Markovic
iewed-by: Aleksandar Markovic Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- linux-user/strace.c | 14 +- linux-user/syscall.c | 29 + 2 files changed, 42 insertions(+), 1 deletion(-) diff --git a/linux-user/strace.c b/linux-user/st

[Qemu-devel] [PATCH v8 11/87] target/mips: Implement CP0 Config1.WR bit functionality

2018-08-13 Thread Aleksandar Markovic
From: Stefan Markovic Add testing Config1.WR bit into watch exception handling logic. Reviewed-by: Aleksandar Markovic Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- target/mips/translate.c | 8 1 file changed, 8 insertions(+) diff --git a/target/mips

[Qemu-devel] [PATCH v8 10/87] target/mips: Fix MT ASE instructions' availability control

2018-08-13 Thread Aleksandar Markovic
From: Aleksandar Rikalo Use bits from configuration registers for availability control of MT ASE instructions, rather than only ISA_MT bit in insn_flags. Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- target/mips/translate.c | 16 1 file changed, 8

[Qemu-devel] [PATCH v8 35/87] target/mips: Add emulation of nanoMIPS FP instructions

2018-08-13 Thread Aleksandar Markovic
From: Yongbok Kim Add emulation of basic floating point arithmetic for nanoMIPS. Reviewed-by: Richard Henderson Reviewed-by: Aleksandar Markovic Signed-off-by: Yongbok Kim Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- target/mips/translate.c | 300

[Qemu-devel] [PATCH v8 54/87] target/mips: Adjust exception_resume_pc() for nanoMIPS

2018-08-13 Thread Aleksandar Markovic
From: James Hogan We shouldn't set the ISA bit in CP0_EPC for nanoMIPS. Signed-off-by: James Hogan Signed-off-by: Yongbok Kim Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- target/mips/helper.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[Qemu-devel] [PATCH v8 33/87] target/mips: Add emulation of nanoMIPS instructions MOVE.P and MOVE.PREV

2018-08-13 Thread Aleksandar Markovic
From: Yongbok Kim Add emulation of nanoMIPS instructions MOVE.P and MOVE.PREV. Reviewed-by: Richard Henderson Signed-off-by: Yongbok Kim Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- target/mips/translate.c | 33 - 1 file changed, 32

[Qemu-devel] [PATCH v8 72/87] linux-user: Add sockbits.h header for nanoMIPS

2018-08-13 Thread Aleksandar Markovic
From: Aleksandar Rikalo Add sockbits.h header for nanoMIPS. Signed-off-by: Aleksandar Rikalo Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- linux-user/nanomips/sockbits.h | 1 + 1 file changed, 1 insertion(+) create mode 100644 linux-user/nanomips/sockbits.h diff

[Qemu-devel] [PATCH v8 41/87] target/mips: Add emulation of nanoMIPS 32-bit load and store instructions

2018-08-13 Thread Aleksandar Markovic
From: Yongbok Kim Add emulation of various nanoMIPS load and store instructions. Reviewed-by: Richard Henderson Reviewed-by: Aleksandar Markovic Signed-off-by: Yongbok Kim Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- target/mips/translate.c | 277

[Qemu-devel] [PATCH v8 82/87] linux-user: Add support for nanoMIPS core files

2018-08-13 Thread Aleksandar Markovic
From: Aleksandar Rikalo nanoMIPs core files require value EF_NANOMIPS_ABI_P32 to be passed to the e_flags part of the core's elf header. Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- linux-user/elfload.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion

Re: [Qemu-devel] [PATCH v8 10/87] target/mips: Fix MT ASE instructions' availability control

2018-08-13 Thread Aleksandar Markovic
> From: Aleksandar Markovic > Sent: Monday, August 13, 2018 7:52 PM > To: qemu-devel@nongnu.org > > Subject: [PATCH v8 10/87] target/mips: Fix MT ASE instructions' availability > control > > From: Aleksandar Rikalo > > Use bits from configuration registers for av

Re: [Qemu-devel] [PATCH v5 36/76] target/mips: Add emulation of nanoMIPS 32-bit branch instructions

2018-08-15 Thread Aleksandar Markovic
> I think perhaps all of your branching code, utilizing the existing expanders, > needs a re-think. We re-thought handling of nanoMIPS branch instructions, and a new approach will be integrated in the next version. We plan ()for nanoMIPS branches) not to rely on pre-nanoMIPS branch-related

Re: [Qemu-devel] ?==?utf-8?q? [PULL?==?utf-8?q? 00/19] MIPS queue for QEMU upstream, August 14, 2018

2018-08-15 Thread Aleksandar Markovic
each patch, clang build must be success)? Aleksandar Original Message Subject: Re: [PULL 00/19] MIPS queue for QEMU upstream, August 14, 2018 Date: Wednesday, August 15, 2018 21:20 CEST From: Peter Maydell To: Aleksandar Markovic CC: QEMU Developers References: <1534270

[Qemu-devel] [PULL 03/19] target/mips: Avoid case statements formulated by ranges - part 2

2018-08-14 Thread Aleksandar Markovic
From: Aleksandar Rikalo Remove "range style" case statements to make code analysis easier. This patch handles cases when the values in the range in question were not properly defined. Reviewed-by: Aleksandar Markovic Signed-off-by: Aleksandar Markovic Signed-off-by: Stefa

[Qemu-devel] [PULL 19/19] qemu-doc: Amend MIPS-related items

2018-08-14 Thread Aleksandar Markovic
From: Aleksandar Markovic Amend MIPS-related items in qemu-doc.texi Reviewed-by: Thomas Huth Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- qemu-doc.texi | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/qemu-doc.texi b/qemu-doc.texi

[Qemu-devel] [PULL 10/19] target/mips: Fix MT ASE instructions' availability control

2018-08-14 Thread Aleksandar Markovic
From: Aleksandar Rikalo Use bits from configuration registers for availability control of MT ASE instructions, rather than only ISA_MT bit in insn_flags. Reviewed-by: Aleksandar Markovic Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- target/mips/translate.c | 16

Re: [Qemu-devel] [PATCH v8 00/87] Add nanoMIPS support to QEMU

2018-08-14 Thread Aleksandar Markovic
> From: Aleksandar Markovic Sent: Monday, August 13, 2018 7:52 PM > > Subject: [PATCH v8 00/87] Add nanoMIPS support to QEMU > > From: Aleksandar Markovic > > v7->v8: > > - the series is slightly reorganized so that: > - patche

[Qemu-devel] [PULL 05/19] target/mips: Fix two instances of shadow variables

2018-08-14 Thread Aleksandar Markovic
From: Aleksandar Markovic Fix two instances of shadow variables. This cleans up entire file translate.c from shadow variables. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- target/mips/translate.c

[Qemu-devel] [PULL 01/19] MAINTAINERS: Update target/mips maintainer's email addresses

2018-08-14 Thread Aleksandar Markovic
From: Aleksandar Markovic Update email addresses of Aleksandar Markovic and Paul Burton in the MAINTAINERS file. Also, add corresponding items in the .mailmap file. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Aleksandar Markovic --- .mailmap| 7

[Qemu-devel] [PULL 04/19] target/mips: Mark switch fallthroughs with interpretable comments

2018-08-14 Thread Aleksandar Markovic
From: Aleksandar Markovic Mark switch fallthroughs with comments, in cases fallthroughs are intentional. The comments "/* fall through */" are interpreted by compilers and other tools, and they will not issue warnings in such cases. For gcc, the warning is turnend on by -Wimplicit-f

Re: [Qemu-devel] [PATCH v7 62/80] linux-user: Add syscall numbers for nanoMIPS

2018-08-12 Thread Aleksandar Markovic
ping From: Aleksandar Markovic Sent: Monday, August 6, 2018 7:00:29 PM To: qemu-devel@nongnu.org Cc: peter.mayd...@linaro.org; laur...@vivier.eu; riku.voi...@iki.fi; philippe.mathieu.da...@gmail.com; aurel...@aurel32.net; richard.hender...@linaro.org

[Qemu-devel] [PULL 09/19] target/mips: Add support for availability control via bit MT

2018-08-14 Thread Aleksandar Markovic
From: Aleksandar Rikalo Add a field in hflags for MT bit, and functions check_mt() and check_cp0_mt(). Reviewed-by: Aleksandar Markovic Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- target/mips/cpu.h | 3 ++- target/mips/internal.h | 6 +- target/mips

[Qemu-devel] [PULL 12/19] target/mips: Don't update BadVAddr register in Debug Mode

2018-08-14 Thread Aleksandar Markovic
From: Yongbok Kim BadVAddr should not be updated if (env->hflags & MIPS_HFLAG_DM) is set. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Yongbok Kim Signed-off-by: Aleksandar Markovic --- target/mips/helper.c| 4 +++- target/mips/op_helper

[Qemu-devel] [PULL 14/19] target/mips: Add gen_op_addr_addi()

2018-08-14 Thread Aleksandar Markovic
From: Stefan Markovic Add gen_op_addr_addi(). This function will be used in emulation of some nanoMIPS instructions. Reviewed-by: Richard Henderson Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- target/mips/translate.c | 12 1 file changed, 12 insertions

[Qemu-devel] [PULL 02/19] target/mips: Avoid case statements formulated by ranges - part 1

2018-08-14 Thread Aleksandar Markovic
From: Aleksandar Markovic Remove "range style" case statements to make code analysis easier. This is needed also for some upcoming nanoMIPS-related refactorings. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Aleksandar Markovic --- t

[Qemu-devel] [PULL 00/19] MIPS queue for QEMU upstream, August 14, 2018

2018-08-14 Thread Aleksandar Markovic
From: Aleksandar Markovic The following changes since commit 38441756b70eec5807b5f60dad11a93a91199866: Update version for v3.0.0 release (2018-08-14 16:38:43 +0100) are available in the git repository at: https://github.com/AMarkovic/qemu tags/mips-queue-aug-14-2018 for you to fetch

[Qemu-devel] [PULL 13/19] target/mips: Check ELPA flag only in some cases of MFHC0 and MTHC0

2018-08-14 Thread Aleksandar Markovic
. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Aleksandar Markovic Reviewed-by: Richard Henderson Signed-off-by: Yongbok Kim Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- target/mips/translate.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff

[Qemu-devel] [PULL 17/19] linux-user: Update MIPS syscall numbers up to kernel 4.18 headers

2018-08-14 Thread Aleksandar Markovic
From: Aleksandar Markovic Synchronize content of linux-user/mips/syscall_nr.h and linux-user/mips64/syscall_nr.h with Linux kernel 4.18 headers. This adds 9 new syscall numbers, the last being NR_io_pgetevents. Reviewed-by: Laurent Vivier Reviewed-by: Richard Henderson Signed-off

[Qemu-devel] [PULL 16/19] elf: Add ELF flags for MIPS machine variants

2018-08-14 Thread Aleksandar Markovic
From: Aleksandar Markovic Add MIPS machine variants ELF flags so that the emulation behavior can be adjusted if needed. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Laurent Vivier Reviewed-by: Richard Henderson Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic

[Qemu-devel] [PULL 06/19] target/mips: Update some CP0 registers bit definitions

2018-08-14 Thread Aleksandar Markovic
From: Aleksandar Markovic Update CP0 registers Config0, Config1, Config2, Config3, Config4, and Config5 bit definitions. Some of these bits will be utilized by upcoming nanoMIPS changes. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Aleksandar Markovic

[Qemu-devel] [PULL 08/19] target/mips: Add support for availability control via bit XNP

2018-08-14 Thread Aleksandar Markovic
From: Aleksandar Rikalo Add a field in hflags for XNP bit, and a function check_xnp(). Reviewed-by: Aleksandar Markovic Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- target/mips/cpu.h | 3 ++- target/mips/internal.h | 5 - target/mips/translate.c | 12

[Qemu-devel] [PULL 11/19] target/mips: Implement CP0 Config1.WR bit functionality

2018-08-14 Thread Aleksandar Markovic
From: Stefan Markovic Add testing Config1.WR bit into watch exception handling logic. Reviewed-by: Aleksandar Markovic Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- target/mips/translate.c | 8 1 file changed, 8 insertions(+) diff --git a/target/mips

[Qemu-devel] [PULL 07/19] target/mips: Add CP0 BadInstrX register

2018-08-14 Thread Aleksandar Markovic
From: Stefan Markovic Add CP0 BadInstrX register. This register will be used in nanoMIPS. Reviewed-by: Aleksandar Markovic Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Stefan Markovic Signed-off-by: Yongbok Kim Signed-off-by: Aleksandar Markovic

[Qemu-devel] [PULL 18/19] linux-user: Add preprocessor availability control to some syscalls

2018-08-14 Thread Aleksandar Markovic
iewed-by: Aleksandar Markovic Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- linux-user/strace.c | 14 +- linux-user/syscall.c | 29 + 2 files changed, 42 insertions(+), 1 deletion(-) diff --git a/linux-user/strace.c b/linux-user/st

[Qemu-devel] [PULL 15/19] elf: Remove duplicate preprocessor constant definition

2018-08-14 Thread Aleksandar Markovic
From: Aleksandar Markovic Remove duplicate preprocessor constant definition for EF_MIPS_ARCH. The duplicate was introduced in commit 45506bdd. It placed the constant EF_MIPS_ARCH in a better place, however it did not remove the original. This patch removes the original occurrence. Reviewed

[Qemu-devel] [PATCH v9 40/84] target/mips: Fix pre-nanoMIPS MT ASE instructions availability control

2018-08-16 Thread Aleksandar Markovic
From: Aleksandar Rikalo Use bits from configuration registers for availability control of MT ASE instructions, rather than only ISA_MT bit in insn_flags. This is done by adding a field in hflags for MT bit, and adding functions check_mt() and check_cp0_mt(). Reviewed-by: Aleksandar Markovic

[Qemu-devel] [PATCH v9 19/84] target/mips: Add placeholder and invocation of decode_nanomips_opc()

2018-08-16 Thread Aleksandar Markovic
From: Aleksandar Markovic Add empty body and invocation of decode_nanomips_opc() if the bit ISA_NANOMIPS32 is set in ctx->insn_flags. Reviewed-by: Richard Henderson Signed-off-by: Yongbok Kim Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- target/mips/translate.c |

[Qemu-devel] [PATCH v9 01/84] MAINTAINERS: Update target/mips maintainer's email addresses

2018-08-16 Thread Aleksandar Markovic
From: Aleksandar Markovic Update email addresses of Aleksandar Markovic and Paul Burton in the MAINTAINERS file. Also, add corresponding items in the .mailmap file. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Aleksandar Markovic --- .mailmap| 7

[Qemu-devel] [PATCH v9 04/84] target/mips: Mark switch fallthroughs with interpretable comments

2018-08-16 Thread Aleksandar Markovic
From: Aleksandar Markovic Mark switch fallthroughs with comments, in cases fallthroughs are intentional. The comments "/* fall through */" are interpreted by compilers and other tools, and they will not issue warnings in such cases. For gcc, the warning is turnend on by -Wimplicit-f

Re: [Qemu-devel] [PATCH v8 61/87] elf: On elf loading, treat both EM_MIPS and EM_NANOMIPS as legal for MIPS

2018-08-16 Thread Aleksandar Markovic
> From: Aleksandar Markovic > Sent: Monday, August 13, 2018 7:53 PM > > Subject: [PATCH v8 61/87] elf: On elf loading, treat both EM_MIPS and > EM_NANOMIPS as legal for MIPS > > From: Aleksandar Rikalo > > Modify load_elf32()/load_elf64() to treat EM_NAN

[Qemu-devel] [PATCH v9 00/84] Add nanoMIPS support to QEMU

2018-08-16 Thread Aleksandar Markovic
From: Aleksandar Markovic v8->v9: - reoganized (moved/squashed) patches so that clang build bisect works (as the result, number of patches dropped from 87 to 84) - re-examined and reworked 32-bit nanoMIPS branch instructions - minor improvements in commit messages - reba

[Qemu-devel] [PATCH v9 25/84] target/mips: Add emulation of nanoMIPS 16-bit load and store instructions

2018-08-16 Thread Aleksandar Markovic
From: Yongbok Kim Add emulation of LWXS16, LB16, SB16, LBU16, LH16, SH16, LHU16, LW16, LWSP16, LW4X4, SW4X4, LWGP16, SWSP16, SW16, and SWGP16 instructions. Signed-off-by: Yongbok Kim Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic Reviewed-by: Aleksandar Markovic

[Qemu-devel] [PATCH v9 18/84] target/mips: Add nanoMIPS DSP ASE opcodes

2018-08-16 Thread Aleksandar Markovic
From: Stefan Markovic Add nanoMIPS opcodes for DSP ASE instruction pools and instructions. Reviewed-by: Richard Henderson Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- target/mips/translate.c | 215 1 file changed, 215

[Qemu-devel] [PATCH v9 26/84] target/mips: Add emulation of nanoMIPS 16-bit logic instructions

2018-08-16 Thread Aleksandar Markovic
From: Yongbok Kim Add emulation of NOT16, AND16, XOR16, OR16 instructions. Reviewed-by: Richard Henderson Signed-off-by: Yongbok Kim Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- target/mips/translate.c | 28 1 file changed, 28

[Qemu-devel] [PATCH v9 02/84] target/mips: Avoid case statements formulated by ranges - part 1

2018-08-16 Thread Aleksandar Markovic
From: Aleksandar Markovic Remove "range style" case statements to make code analysis easier. This is needed also for some upcoming nanoMIPS-related refactorings. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Aleksandar Markovic --- t

Re: [Qemu-devel] [PATCH v8 62/87] mips_malta: Add basic nanoMIPS boot code for Malta board

2018-08-16 Thread Aleksandar Markovic
> From: Aleksandar Markovic > Sent: Monday, August 13, 2018 7:53 PM > > Subject: [PATCH v8 62/87] mips_malta: Add basic nanoMIPS boot code for Malta > board > > From: Matthew Fortune > > Add basic nanoMIPS boot code for Malta. > > Signed-off-by: Yongbok

Re: [Qemu-devel] [PATCH v8 55/87] target/mips: Adjust set_hflags_for_handler() for nanoMIPS

2018-08-16 Thread Aleksandar Markovic
> From: Aleksandar Markovic > Sent: Monday, August 13, 2018 7:53 PM > > Subject: [PATCH v8 55/87] target/mips: Adjust set_hflags_for_handler() for > nanoMIPS > > From: James Hogan > > We shouldn't clear M16 mode when entering an interrupt on nanoMIPS, > othe

[Qemu-devel] [PATCH v9 07/84] target/mips: Add CP0 BadInstrX register

2018-08-16 Thread Aleksandar Markovic
From: Stefan Markovic Add CP0 BadInstrX register. This register will be used in nanoMIPS. Reviewed-by: Aleksandar Markovic Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Stefan Markovic Signed-off-by: Yongbok Kim Signed-off-by: Aleksandar Markovic

[Qemu-devel] [PATCH v9 13/84] linux-user: Update MIPS syscall numbers up to kernel 4.18 headers

2018-08-16 Thread Aleksandar Markovic
From: Aleksandar Markovic Synchronize content of linux-user/mips/syscall_nr.h and linux-user/mips64/syscall_nr.h with Linux kernel 4.18 headers. This adds 9 new syscall numbers, the last being NR_io_pgetevents. Reviewed-by: Laurent Vivier Reviewed-by: Richard Henderson Signed-off

[Qemu-devel] [PATCH v9 10/84] target/mips: Check ELPA flag only in some cases of MFHC0 and MTHC0

2018-08-16 Thread Aleksandar Markovic
. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Aleksandar Markovic Reviewed-by: Richard Henderson Signed-off-by: Yongbok Kim Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- target/mips/translate.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff

[Qemu-devel] [PATCH v9 22/84] target/mips: Add emulation of nanoMIPS 16-bit branch instructions

2018-08-16 Thread Aleksandar Markovic
From: Yongbok Kim Add emulation of nanoMIPS 16-bit branch instructions. Reviewed-by: Richard Henderson Signed-off-by: Yongbok Kim Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- target/mips/translate.c | 36 1 file changed, 36

Re: [Qemu-devel] [PATCH v8 54/87] target/mips: Adjust exception_resume_pc() for nanoMIPS

2018-08-16 Thread Aleksandar Markovic
> From: Aleksandar Markovic > Sent: Monday, August 13, 2018 7:53 PM > > Subject: [PATCH v8 54/87] target/mips: Adjust exception_resume_pc() for > nanoMIPS > > From: James Hogan > > We shouldn't set the ISA bit in CP0_EPC for nanoMIPS. > > Signed-off-by: Jame

<    1   2   3   4   5   6   7   8   9   10   >