[Qemu-devel] [PATCH v7 33/80] target/mips: Implement emulation of nanoMIPS ROTX instruction

2018-08-06 Thread Aleksandar Markovic
From: Matthew Fortune Added a helper for ROTX based on the pseudocode from the architecture spec. This instraction was not present in previous MIPS instruction sets. Signed-off-by: Yongbok Kim Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic Reviewed-by: Aleksandar Markovic

[Qemu-devel] [PATCH v7 60/80] gdbstub: Add XML support for GDB for nanoMIPS

2018-08-06 Thread Aleksandar Markovic
From: Stefan Markovic Add XML support files for GDB for nanoMIPS. Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- MAINTAINERS| 3 ++- gdb-xml/nanomips-cp0.xml | 13 + gdb-xml/nanomips-cpu.xml | 44

[Qemu-devel] [PATCH v7 61/80] target/mips: Add definition of nanoMIPS I7200 CPU

2018-08-06 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 v7 64/80] linux-user: Add termbits.h header for nanoMIPS

2018-08-06 Thread Aleksandar Markovic
From: Aleksandar Rikalo Add termbits.h header for nanoMIPS. Reuse MIPS' termbits.h as the functionalities are almost identical. Signed-off-by: Aleksandar Rikalo Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- linux-user/mips/termbits.h | 4 linux-user/nanomips

[Qemu-devel] [PATCH v7 37/80] target/mips: Add emulation of nanoMIPS 32-bit branch instructions

2018-08-06 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 v7 66/80] linux-user: Add target_fcntl.h header for nanoMIPS

2018-08-06 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 v7 69/80] linux-user: Add target_cpu.h header for nanoMIPS

2018-08-06 Thread Aleksandar Markovic
From: Dimitrije Nikolic Add target_cpu.h header for nanoMIPS. Signed-off-by: Aleksandar Rikalo Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- linux-user/nanomips/target_cpu.h | 21 + 1 file changed, 21 insertions(+) create mode 100644 linux-user

[Qemu-devel] [PATCH v7 78/80] linux-user: Add nanoMIPS support in scripts/qemu-binfmt-conf.sh

2018-08-06 Thread Aleksandar Markovic
From: Aleksandar Rikalo Add support for nanomips[eb] variant in scripts/qemu-binfmt-conf.sh. Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- scripts/qemu-binfmt-conf.sh | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/scripts/qemu

[Qemu-devel] [PATCH v7 71/80] linux-user: Add target_elf.h header for nanoMIPS

2018-08-06 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 v7 39/80] target/mips: Add emulation of DSP ASE for nanoMIPS - part 1

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

[Qemu-devel] [PATCH v7 74/80] linux-user: Add cpu_loop.c for nanoMIPS

2018-08-06 Thread Aleksandar Markovic
From: Dimitrije Nikolic Amend regular MIPS' cpu_loop.c to include nanoMIPS support. Signed-off-by: Aleksandar Rikalo Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- linux-user/mips/cpu_loop.c | 8 +++- linux-user/nanomips/cpu_loop.c | 1 + 2 files changed, 8

[Qemu-devel] [PATCH v7 70/80] linux-user: Add target_structs.h header for nanoMIPS

2018-08-06 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 v7 73/80] linux-user: Add support for nanoMIPS signal trampoline

2018-08-06 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 v7 40/80] target/mips: Add emulation of DSP ASE for nanoMIPS - part 2

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

[Qemu-devel] [PATCH v7 68/80] linux-user: Add target_syscall.h header for nanoMIPS

2018-08-06 Thread Aleksandar Markovic
From: Aleksandar Rikalo Add target_syscall.h header for nanoMIPS. Signed-off-by: Aleksandar Rikalo Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- linux-user/nanomips/target_syscall.h | 30 ++ 1 file changed, 30 insertions(+) create mode

[Qemu-devel] [PATCH v7 41/80] target/mips: Add emulation of DSP ASE for nanoMIPS - part 3

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

[Qemu-devel] [PATCH v7 79/80] qemu-doc: Amend MIPS-related items

2018-08-06 Thread Aleksandar Markovic
From: Aleksandar Markovic Amend MIPS-related items in qemu-doc.texi 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 index abfd2db..8ea6bfa

[Qemu-devel] [PATCH v7 80/80] qemu-doc: Add nanoMIPS-related items

2018-08-06 Thread Aleksandar Markovic
From: Aleksandar Markovic Add nanoMIPS-related items in qemu-doc.texi 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 100644 --- a/qemu-doc.texi

[Qemu-devel] [PATCH v7 76/80] linux-user: Add support for statx() syscall for all platforms

2018-08-06 Thread Aleksandar Markovic
From: Aleksandar Rikalo Implement support for syscall statx(). The implementation is based on invoking other (more mature) syscalls (from the same 'stat' family) on the host side. This way, problems of availability of statx() on the host are avoided. Signed-off-by: Aleksandar Markovic Signed

[Qemu-devel] [PATCH v7 43/80] target/mips: Add emulation of DSP ASE for nanoMIPS - part 5

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

[Qemu-devel] [PATCH v7 46/80] target/mips: Add handling of branch delay slots for nanoMIPS

2018-08-06 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 v7 48/80] target/mips: Implement CP0 Config1.WR bit functionality

2018-08-06 Thread Aleksandar Markovic
From: Stefan Markovic Add testing Config1.WR bit into watch exception handling logic. 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/translate.c b/target/mips/translate.c

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

2018-08-06 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

Re: [Qemu-devel] [PATCH v7 53/80] elf: Add nanoMIPS specific variations in ELF header fields

2018-08-06 Thread Aleksandar Markovic
> From: Aleksandar Markovic > Sent: Monday, August 6, 2018 7:00 PM > Subject: [PATCH v7 53/80] elf: Add nanoMIPS specific variations in ELF header > fields > > From: Aleksandar Rikalo > > Add nanoMIPS-related values in ELF header fields as specified in > na

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

2018-08-06 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 v7 67/80] linux-user: Add sockbits.h header for nanoMIPS

2018-08-06 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 v7 72/80] linux-user: Add signal.c for nanoMIPS

2018-08-06 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

[Qemu-devel] [PATCH v7 65/80] linux-user: Update syscall_defs.h header for nanoMIPS

2018-08-06 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 v7 77/80] linux-user: Add nanoMIPS linux user mode configuration support

2018-08-06 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

Re: [Qemu-devel] [PATCH v7 23/80] target/mips: Add emulation of nanoMIPS 16-bit load and store instructions

2018-08-06 Thread Aleksandar Markovic
> From: Aleksandar Markovic > Sent: Monday, August 6, 2018 6:59 PM > > 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

[Qemu-devel] [PATCH v7 02/80] target/mips: Avoid case statements formulated by ranges

2018-08-06 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] [PATCH v7 01/80] MAINTAINERS: Update target/mips maintainer's email addresses

2018-08-06 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 v7 14/80] target/mips: Add preprocessor constants for nanoMIPS

2018-08-06 Thread Aleksandar Markovic
From: Aleksandar Markovic Add ISA_NANOMIPS32 and CPU_NANOMIPS32 preprocessor constants. Reviewed-by: Richard Henderson Signed-off-by: Yongbok Kim Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- target/mips/mips-defs.h | 4 1 file changed, 4 insertions(+) diff

[Qemu-devel] [PATCH v7 04/80] target/mips: Fix two instances of shadow variables

2018-08-06 Thread Aleksandar Markovic
From: Aleksandar Markovic Fix two instances of shadow variables. This cleans up entire file translate.c from shadow variables. Reviewed-by: Richard Henderson Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- target/mips/translate.c | 4 ++-- 1 file changed, 2 insertions

[Qemu-devel] [PATCH v7 21/80] target/mips: Add emulation of nanoMIPS 16-bit shift instructions

2018-08-06 Thread Aleksandar Markovic
From: Yongbok Kim Add emulation of nanoMIPS 16-bit shift instructions. Reviewed-by: Richard Henderson Signed-off-by: Yongbok Kim Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- target/mips/translate.c | 15 +++ 1 file changed, 15 insertions(+) diff --git

[Qemu-devel] [PATCH v7 27/80] target/mips: Add emulation of nanoMIPS instructions MOVE.P and MOVE.PREV

2018-08-06 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 v7 09/80] target/mips: Check ELPA flag only in some cases of MFHC0 and MTHC0

2018-08-06 Thread Aleksandar Markovic
. Reviewed-by: Aleksandar Markovic Reviewed-by: Richard Henderson Signed-off-by: Yongbok Kim Signed-off-by: Aleksandar Markovic --- target/mips/translate.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/target/mips/translate.c b/target/mips/translate.c index

[Qemu-devel] [PATCH v7 58/80] mips_malta: Fix semihosting argument passing for nanoMIPS bare metal

2018-08-06 Thread Aleksandar Markovic
From: Stefan Markovic Signed-off-by: Yongbok Kim Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- hw/mips/mips_malta.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c index d1a7c1f..8bb1686 100644

[Qemu-devel] [PATCH v7 55/80] elf: Don't check FCR31_NAN2008 bit for nanoMIPS

2018-08-06 Thread Aleksandar Markovic
From: Aleksandar Markovic nanoMIPS is always NaN2008 compliant, and rules for checking FCR31's NAN2008 bit are obsoleted. Reviewed-by: Richard Henderson Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- linux-user/mips/cpu_loop.c | 3 +++ 1 file changed, 3 insertions

[Qemu-devel] [PATCH v7 35/80] target/mips: Add emulation of nanoMIPS 32-bit load and store instructions

2018-08-06 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 v7 13/80] linux-user: Add preprocessor availability control to some syscalls

2018-08-06 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 v7 23/80] target/mips: Add emulation of nanoMIPS 16-bit load and store instructions

2018-08-06 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 --- target/mips/translate.c | 81

[Qemu-devel] [PATCH v7 32/80] target/mips: Add emulation of misc nanoMIPS instructions (p_lsx)

2018-08-06 Thread Aleksandar Markovic
From: Yongbok Kim Add emulation of nanoMIPS instructions situated in pool p_lsx, and emulation of LSA instruction as well. Reviewed-by: Aleksandar Markovic Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- target/mips/translate.c | 132

[Qemu-devel] [PATCH v7 36/80] target/mips: Implement emulation of nanoMIPS LLWP/SCWP pair

2018-08-06 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 v7 16/80] target/mips: Add nanoMIPS DSP ASE opcodes

2018-08-06 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 v7 34/80] target/mips: Implement emulation of nanoMIPS EXTW instruction

2018-08-06 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 v7 38/80] target/mips: Implement MT ASE support for nanoMIPS

2018-08-06 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 v7 28/80] target/mips: Add emulation of nanoMIPS 48-bit instructions

2018-08-06 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 v7 17/80] target/mips: Add placeholder and invocation of decode_nanomips_opc()

2018-08-06 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 v7 29/80] target/mips: Add emulation of nanoMIPS FP instructions

2018-08-06 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 v7 42/80] target/mips: Add emulation of DSP ASE for nanoMIPS - part 4

2018-08-06 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 | 378 1 file changed, 378 insertions(+) diff --git a/target/mips

[Qemu-devel] [PATCH v7 18/80] target/mips: Add nanoMIPS decoding and extraction utilities

2018-08-06 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 v7 49/80] target/mips: Adjust exception_resume_pc() for nanoMIPS

2018-08-06 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 v7 51/80] target/mips: Adjust set_pc() for nanoMIPS

2018-08-06 Thread Aleksandar Markovic
From: James Hogan ERET and ERETNC shouldn't clear MIPS_HFLAG_M16 for nanoMIPS since there is no ISA bit, so fix set_pc() to skip the hflags update. Signed-off-by: James Hogan Signed-off-by: Yongbok Kim Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic Reviewed-by: Aleksandar

[Qemu-devel] [PATCH v7 24/80] target/mips: Add emulation of nanoMIPS 16-bit logic instructions

2018-08-06 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 v7 50/80] target/mips: Adjust set_hflags_for_handler() for nanoMIPS

2018-08-06 Thread Aleksandar Markovic
From: James Hogan We shouldn't clear M16 mode when entering an interrupt on nanoMIPS, otherwise we'll start interpreting the code as normal MIPS code. Signed-off-by: James Hogan Signed-off-by: Yongbok Kim Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- target/mips

[Qemu-devel] [PATCH v7 44/80] target/mips: Add emulation of DSP ASE for nanoMIPS - part 6

2018-08-06 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 | 64 + 1 file changed, 64

[Qemu-devel] [PATCH v7 25/80] target/mips: Add emulation of nanoMIPS 16-bit save and restore instructions

2018-08-06 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 v7 53/80] elf: Add nanoMIPS specific variations in ELF header fields

2018-08-06 Thread Aleksandar Markovic
From: Aleksandar Rikalo Add nanoMIPS-related values in ELF header fields as specified in nanoMIPS' "ELF ABI Supplement". Acked-by: Richard Henderson Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- include/elf.h | 20 1 file changed, 20

[Qemu-devel] [PATCH v7 52/80] target/mips: Fix ERET/ERETNC behavior related to ADEL exception

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

[Qemu-devel] [PATCH v7 47/80] target/mips: Add updating BadInstr, BadInstrP, BadInstrX for nanoMIPS

2018-08-06 Thread Aleksandar Markovic
From: Stefan Markovic Update BadInstr, BadInstrP,and BadInstrX registers for nanoMIPS. The same support for pre-nanoMIPS remains unimplemented. Signed-off-by: Yongbok Kim Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- target/mips/helper.c | 25

[Qemu-devel] [PATCH v7 26/80] target/mips: Add emulation of some common nanoMIPS 32-bit instructions

2018-08-06 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 v7 56/80] mips_malta: Add basic nanoMIPS boot code for MIPS' Malta

2018-08-06 Thread Aleksandar Markovic
From: Matthew Fortune Added very very basic nanoMIPS boot code but this is hacked in unconditionally currently. Signed-off-by: Yongbok Kim Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- hw/mips/mips_malta.c | 75 +++- 1

[Qemu-devel] [PATCH v7 54/80] elf: Relax MIPS' elf_check_arch() to accept EM_NANOMIPS too

2018-08-06 Thread Aleksandar Markovic
From: Aleksandar Markovic Starting from nanoMIPS introduction, machine variant can be EM_MIPS or EM_NANOMIPS. Reviewed-by: Richard Henderson Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- linux-user/elfload.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/linux

[Qemu-devel] [PATCH v7 57/80] mips_malta: Setup GT64120 BARs in nanoMIPS bootloader

2018-08-06 Thread Aleksandar Markovic
Markovic Signed-off-by: Stefan Markovic Reviewed-by: Aleksandar Markovic --- hw/mips/mips_malta.c | 73 1 file changed, 73 insertions(+) diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c index 4bc9036..d1a7c1f 100644 --- a/hw/mips

[Qemu-devel] [PATCH v7 30/80] target/mips: Add emulation of misc nanoMIPS instructions (pool32a0)

2018-08-06 Thread Aleksandar Markovic
From: Yongbok Kim Add emulation of nanoMIPS instructions that are situated in pool32a0. Reviewed-by: Aleksandar Markovic Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- target/mips/translate.c | 185 1 file changed, 185

[Qemu-devel] [PATCH v7 31/80] target/mips: Add emulation of misc nanoMIPS instructions (pool32axf)

2018-08-06 Thread Aleksandar Markovic
From: Yongbok Kim Add emulation of misc nanoMIPS instructions situated in pool32axf. Reviewed-by: Richard Henderson Signed-off-by: Yongbok Kim Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- target/mips/translate.c | 89

[Qemu-devel] [PATCH v7 59/80] gdbstub: Disable handling of nanoMIPS ISA bit in the MIPS gdbstub

2018-08-06 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 v7 63/80] linux-user: Add target_signal.h header for nanoMIPS

2018-08-06 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

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

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

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

2018-08-14 Thread Aleksandar Markovic
> From: Aleksandar Markovic > Sent: Monday, August 13, 2018 7:52 PM > > Subject: [PATCH v8 03/87] target/mips: Avoid case statements formulated by > ranges - part 2 > > From: Aleksandar Rikalo > > Remove "range style" case statements to make code analys

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

2018-08-14 Thread Aleksandar Markovic
> From: Aleksandar Markovic > Sent: Monday, August 13, 2018 7:53 PM > > Subject: [PATCH v8 42/87] target/mips: Implement emulation of nanoMIPS > LLWP/SCWP > pair > > From: Aleksandar Rikalo > > Implement support for nanoMIPS LLWP/SCWP instruction pair. > &

[Qemu-devel] [PATCH v7 00/80] Add nanoMIPS support to QEMU

2018-08-06 Thread Aleksandar Markovic
From: Aleksandar Markovic v6->v7: - found better place for MIPS_ARCH in elf.h - improved patch for LLWP and SCWP - fixed missing availability control, alignment, usage of extract32() in DSP patches - added disassembler support for microMIPS and nanoMIPS - removed unnecess

[Qemu-devel] [PATCH v7 08/80] target/mips: Don't update BadVAddr register in Debug Mode

2018-08-06 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 v7 10/80] elf: Remove duplicate preprocessor constant definition

2018-08-06 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 occurence. Reviewed

[Qemu-devel] [PATCH v7 07/80] target/mips: Add gen_op_addr_addi()

2018-08-06 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 v7 19/80] target/mips: Add emulation of nanoMIPS 16-bit arithmetic instructions

2018-08-06 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 v7 05/80] target/mips: Update some CP0 registers bit definitions

2018-08-06 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 v7 03/80] target/mips: Mark switch fallthroughs with interpretable comments

2018-08-06 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

[Qemu-devel] [PATCH v7 06/80] target/mips: Add CP0 BadInstrX register

2018-08-06 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 v7 11/80] elf: Add ELF flags for MIPS machine variants

2018-08-06 Thread Aleksandar Markovic
From: Aleksandar Markovic Add MIPS machine variants ELF flags so that the emulation behavior can be adjusted if needed. Reviewed-by: Laurent Vivier Reviewed-by: Richard Henderson Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- include/elf.h | 23

[Qemu-devel] [PATCH v7 15/80] target/mips: Add nanoMIPS base instruction set opcodes

2018-08-06 Thread Aleksandar Markovic
-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- target/mips/translate.c | 670 1 file changed, 670 insertions(+) diff --git a/target/mips/translate.c b/target/mips/translate.c index bc1f21f..bbe8b8a 100644 --- a/target/mips/translate.c +++ b

[Qemu-devel] [PATCH v7 12/80] linux-user: Update MIPS syscall numbers up to kernel 4.18 headers

2018-08-06 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 v7 20/80] target/mips: Add emulation of nanoMIPS 16-bit branch instructions

2018-08-06 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

[Qemu-devel] [PATCH v7 22/80] target/mips: Add emulation of nanoMIPS 16-bit misc instructions

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

Re: [Qemu-devel] [PATCH v7 36/80] target/mips: Implement emulation of nanoMIPS LLWP/SCWP pair

2018-08-06 Thread Aleksandar Markovic
> From: Aleksandar Markovic > Sent: Monday, August 6, 2018 7:00 PM > To: qemu-devel@nongnu.org > > From: Aleksandar Rikalo > > Implement support for nanoMIPS LLWP/SCWP instruction pair. > > Signed-off-by: Dimitrije Nikolic > Signed-off-by: Aleksandar Mar

Re: [Qemu-devel] [PATCH v7 40/80] target/mips: Add emulation of DSP ASE for nanoMIPS - part 2

2018-08-06 Thread Aleksandar Markovic
> From: Aleksandar Markovic > Sent: Monday, August 6, 2018 7:00 PM > > Subject: [PATCH v7 40/80] target/mips: Add emulation of DSP ASE for nanoMIPS > - part 2 > > From: Stefan Markovic > > Add emulation of DSP ASE instructions for nanoMIPS - part 2. > > S

Re: [Qemu-devel] [PATCH v7 39/80] target/mips: Add emulation of DSP ASE for nanoMIPS - part 1

2018-08-06 Thread Aleksandar Markovic
> From: Aleksandar Markovic > Sent: Monday, August 6, 2018 7:00 PM > > From: Stefan Markovic > > Add emulation of DSP ASE instructions for nanoMIPS - part 1. > > Signed-off-by: Aleksandar Markovic > Signed-off-by: Stefan Markovic > --- &

Re: [Qemu-devel] [PATCH v7 41/80] target/mips: Add emulation of DSP ASE for nanoMIPS - part 3

2018-08-06 Thread Aleksandar Markovic
> From: Aleksandar Markovic > Sent: Monday, August 6, 2018 7:00 PM > > Subject: [PATCH v7 41/80] target/mips: Add emulation of DSP ASE for nanoMIPS > - part 3 > > From: Stefan Markovic > > Add emulation of DSP ASE instructions for nanoMIPS - part 3. > > S

Re: [Qemu-devel] [PATCH v7 42/80] target/mips: Add emulation of DSP ASE for nanoMIPS - part 4

2018-08-06 Thread Aleksandar Markovic
> From: Aleksandar Markovic > Sent: Monday, August 6, 2018 7:00 PM > From: Stefan Markovic > > Add emulation of DSP ASE instructions for nanoMIPS - part 4. > > Signed-off-by: Aleksandar Markovic > Signed-off-by: Stefan Markovic > --- >

Re: [Qemu-devel] [PATCH v7 39/80] target/mips: Add emulation of DSP ASE for nanoMIPS - part 1

2018-08-06 Thread Aleksandar Markovic
r2(). Please fix in next version. ________ From: Aleksandar Markovic Sent: Monday, August 6, 2018 7:00:06 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; rich

Re: [Qemu-devel] [PATCH v7 45/80] disas: Add support for microMIPS and nanoMIPS

2018-08-06 Thread Aleksandar Markovic
> From: Aleksandar Markovic > Sent: Monday, August 6, 2018 7:00 PM > > From: Matthew Fortune > > Modify disassembler engine to execute a separate disassembler > for microMIPS and nanoMIPS platforms. > > Signed-off-by: Aleksandar Markovic > Signed-off-by: S

[Qemu-devel] [PATCH v11 38/46] target/mips: Fix ERET/ERETNC behavior related to ADEL exception

2018-08-20 Thread Aleksandar Markovic
From: Yongbok Kim Fix ERET/ERETNC so that ADEL exception can be raised. 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/op_helper.c | 4 +++- 1 file changed, 3

[Qemu-devel] [PATCH v11 42/46] elf: Don't check FCR31_NAN2008 bit for nanoMIPS

2018-08-20 Thread Aleksandar Markovic
From: Aleksandar Markovic nanoMIPS is always NaN2008 compliant, and rules for checking FCR31's NAN2008 bit are obsoleted. Reviewed-by: Richard Henderson Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- linux-user/mips/cpu_loop.c | 3 +++ 1 file changed, 3 insertions

[Qemu-devel] [PATCH v11 22/46] target/mips: Implement emulation of nanoMIPS EXTW instruction

2018-08-20 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 v11 11/46] target/mips: Add emulation of nanoMIPS 16-bit load and store instructions

2018-08-20 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 v11 06/46] target/mips: Add nanoMIPS decoding and extraction utilities

2018-08-20 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 | 11 +++ 1 file changed, 11

[Qemu-devel] [PATCH v11 00/46] Add nanoMIPS support - core functionality and system mode

2018-08-20 Thread Aleksandar Markovic
From: Aleksandar Markovic v10->v11: - all user-mode patches removed (separate series will be created for them) - added capability to implement availability control via CP0 Config3 and Config5 bits - refactored accordingly availability control via XNP and MT - ad

[Qemu-devel] [PATCH v11 29/46] target/mips: Add emulation of DSP ASE for nanoMIPS - part 1

2018-08-20 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 | 554 1 file changed, 554

[Qemu-devel] [PATCH v11 35/46] target/mips: Add availability control via bit NMS

2018-08-20 Thread Aleksandar Markovic
From: Dimitrije Nikolic A set of nanoMIPS instructions is not available if Config5 bit NMS is set. Signed-off-by: Aleksandar Markovic --- target/mips/translate.c | 46 -- 1 file changed, 44 insertions(+), 2 deletions(-) diff --git a/target/mips

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