[Qemu-devel] [PATCH] mips/malta: prevent writes to reset flash mapping faulting

2013-08-23 Thread Leon Alrae
to a bios device with a nop write callback. Signed-off-by: James Hogan Cc: Paul Burton Cc: Leon Alrae Cc: Aurelien Jarno Signed-off-by: Leon Alrae --- hw/mips/mips_malta.c | 14 -- 1 files changed, 12 insertions(+), 2 deletions(-) diff --git a/hw/mips/mips_malta.c b/hw/mips/mi

[Qemu-devel] [PATCH v2] mips/malta: allow volatile writes to reset flash

2013-08-28 Thread Leon Alrae
s fixed by making the bios copy ram writeable, but loaded via rom_add_blob_fixed() so that it it restored on reset. That's not as volatile as real hardware but should be good enough. Signed-off-by: James Hogan Cc: Paul Burton Cc: Leon Alrae Cc: Aurelien Jarno Cc: Andreas Färber Signed-off

Re: [Qemu-devel] [PATCH v2] target-mips: fix broken MIPS16 and microMIPS

2014-09-22 Thread Leon Alrae
& MIPS_HFLAG_BDS16) && > + !(ctx.hflags & MIPS_HFLAG_BDS32)) { IMHO it would look nicer if you made this condition shorter by ORing BDS hflags. Feel free to add: Reviewed-by: Leon Alrae Regards, Leon

Re: [Qemu-devel] [PATCH v3 00/21] target-mips: add MIPS64R6 Instruction Set support

2014-09-24 Thread Leon Alrae
ping - would anyone help me and review the remaining patches in this series? On 22/08/2014 12:26, Leon Alrae wrote: > ping > > Anybody? There hasn't been any feedback on this patchset for almost 2 > months now... > > On 12/08/2014 12:36, Leon Alrae wrote: >> ping &g

Re: [Qemu-devel] [PATCH v3 03/21] target-mips: add SELEQZ and SELNEZ instructions

2014-09-26 Thread Leon Alrae
Hi James, On 26/09/2014 13:03, James Hogan wrote: > Hi Leon, > > On 27/06/14 16:21, Leon Alrae wrote: >> /* MIPS64 MIPS-3D ASE support. */ >> #define I16 INSN_MIPS16 >> @@ -1209,6 +1215,8 @@ const struct mips_opcode mips_builtin_opcodes[] = >> them f

Re: [Qemu-devel] [PATCH v3 04/21] target-mips: move LL and SC instructions

2014-09-26 Thread Leon Alrae
Hi James, On 26/09/2014 13:44, James Hogan wrote: > Hi Leon, > > On 27/06/14 16:21, Leon Alrae wrote: >> @@ -1215,6 +1217,8 @@ const struct mips_opcode mips_builtin_opcodes[] = >> them first. The assemblers uses a hash table based on the >> instruction n

[Qemu-devel] pending target-mips patches

2014-10-01 Thread Leon Alrae
Hi All, I noticed that it's quite difficult to get target-mips changes reviewed/accepted. There is already a queue of relatively big features and bug fixes which are stuck for months. Does anyone have an idea how to improve this situation? Wouldn't it help to have a target-mips co-maintainer assis

Re: [Qemu-devel] pending target-mips patches

2014-10-02 Thread Leon Alrae
Hi Peter, On 01/10/2014 17:32, Peter Maydell wrote: > On 1 October 2014 16:35, Leon Alrae wrote: >> I noticed that it's quite difficult to get target-mips changes >> reviewed/accepted. There is already a queue of relatively big features >> and bug fixes which are stu

Re: [Qemu-devel] [PATCH v3 16/21] target-mips: add new Floating Point instructions

2014-10-03 Thread Leon Alrae
Hi Yongbok, On 02/10/2014 17:10, Yongbok Kim wrote: > Hi, > > Overall looking good but has issues with not freeing tcg_temps and some > style problem which > failed with the checkpatch.pl script. I remember that checkpatch.pl just hung on this patch, probably due to macros. Regards, Leon

[Qemu-devel] [PATCH v4 01/21] target-mips: define ISA_MIPS64R6

2014-10-08 Thread Leon Alrae
Signed-off-by: Leon Alrae Reviewed-by: Aurelien Jarno --- v2: * move new CPU definition to a separate patch --- target-mips/mips-defs.h | 28 +++- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/target-mips/mips-defs.h b/target-mips/mips-defs.h index

[Qemu-devel] [PATCH v4 00/21] target-mips: add MIPS64R6 Instruction Set support

2014-10-08 Thread Leon Alrae
elien. More detailed changelog included in the separate patches. * added missing zero register case for LSA, ALIGN and BITSWAP instructions Leon Alrae (17): target-mips: define ISA_MIPS64R6 target-mips: signal RI Exception on instructions removed in R6 target-mips: add SELEQZ and SELNEZ instructions

[Qemu-devel] [PATCH v4 07/21] target-mips: signal RI Exception on DSP and Loongson instructions

2014-10-08 Thread Leon Alrae
Move DSP and Loongson instruction to *_legacy functions as they have been removed in R6. Signed-off-by: Leon Alrae Reviewed-by: Aurelien Jarno --- target-mips/translate.c | 195 1 file changed, 98 insertions(+), 97 deletions(-) diff --git a

[Qemu-devel] [PATCH v4 08/21] target-mips: move PREF, CACHE, LLD and SCD instructions

2014-10-08 Thread Leon Alrae
The encoding of PREF, CACHE, LLD and SCD instruction changed in MIPS32R6. Additionally, the hint codes in PREF instruction greater than or equal to 24 generate Reserved Instruction Exception. Signed-off-by: Leon Alrae Reviewed-by: Aurelien Jarno --- disas/mips.c| 4 target

[Qemu-devel] [PATCH v4 04/21] target-mips: move LL and SC instructions

2014-10-08 Thread Leon Alrae
The encoding of LL and SC instruction has changed in MIPS32 Release 6. Signed-off-by: Leon Alrae Reviewed-by: Aurelien Jarno Reviewed-by: James Hogan --- v4: * fix disas mask for ll and sc * remove unnecessary check_insn_opc_removed line --- disas/mips.c| 9 - target-mips

[Qemu-devel] [PATCH v4 03/21] target-mips: add SELEQZ and SELNEZ instructions

2014-10-08 Thread Leon Alrae
Signed-off-by: Leon Alrae Reviewed-by: Aurelien Jarno Reviewed-by: James Hogan --- v4: * remove OPC_SPECIAL35_RESERVED and OPC_SPECIAL37_RESERVED v2: * correct conditions to match instruction name --- disas/mips.c| 8 target-mips/translate.c | 18 -- 2

[Qemu-devel] [PATCH v4 09/21] target-mips: redefine Integer Multiply and Divide instructions

2014-10-08 Thread Leon Alrae
Use "R6_" prefix in front of all new Multiply / Divide instructions for easier differentiation between R6 and preR6. Signed-off-by: Leon Alrae Reviewed-by: Aurelien Jarno --- v2: * use tcg_gen_mul_* for cases where the high part is discarded --- disas/mips.c| 16 +++ t

[Qemu-devel] [PATCH v2 00/22] target-mips: add MIPS64R6 Instruction Set support

2014-06-11 Thread Leon Alrae
, ALIGN and BITSWAP instructions Leon Alrae (18): target-mips: define ISA_MIPS64R6 target-mips: signal RI Exception on instructions removed in R6 target-mips: add SELEQZ and SELNEZ instructions target-mips: move LL and SC instructions target-mips: extract decode_opc_special* from

[Qemu-devel] [PATCH v2 04/22] target-mips: move LL and SC instructions

2014-06-11 Thread Leon Alrae
The encoding of LL and SC instruction has changed in MIPS32 Release 6. Signed-off-by: Leon Alrae Reviewed-by: Aurelien Jarno --- disas/mips.c|9 - target-mips/translate.c | 29 +++-- 2 files changed, 35 insertions(+), 3 deletions(-) diff --git

[Qemu-devel] [PATCH v2 06/22] target-mips: split decode_opc_special* into *_r6 and *_legacy

2014-06-11 Thread Leon Alrae
functions will contain instructions which were removed in R6. Signed-off-by: Leon Alrae --- v2: * imm contains shifted value --- target-mips/translate.c | 227 +-- 1 files changed, 159 insertions(+), 68 deletions(-) diff --git a/target-mips/translate.

[Qemu-devel] [PATCH v2 11/22] target-mips: Status.UX/SX/KX enable 32-bit address wrapping

2014-06-11 Thread Leon Alrae
In R6 the special behaviour for data references is also specified for Kernel and Supervisor mode. Therefore MIPS_HFLAG_UX is replaced by generic MIPS_HFLAG_AWRAP indicating enabled 32-bit address wrapping. Signed-off-by: Leon Alrae --- v2: * set hflag indicating 32-bit wrapping in compute_hflags

[Qemu-devel] [PATCH v2 08/22] target-mips: move PREF, CACHE, LLD and SCD instructions

2014-06-11 Thread Leon Alrae
The encoding of PREF, CACHE, LLD and SCD instruction changed in MIPS32R6. Additionally, the hint codes in PREF instruction greater than or equal to 24 generate Reserved Instruction Exception. Signed-off-by: Leon Alrae Reviewed-by: Aurelien Jarno --- disas/mips.c|4 target

[Qemu-devel] [PATCH v2 10/22] target-mips: move CLO, DCLO, CLZ, DCLZ, SDBBP and free special2 in R6

2014-06-11 Thread Leon Alrae
Also consider OPC_SPIM instruction as deleted in R6 because it is overlaping with MIPS32R6 SDBBP. Signed-off-by: Leon Alrae Reviewed-by: Aurelien Jarno --- v2: * check_insn_opc_removed() moved to decode_opc_special2_legacy() --- disas/mips.c|5 ++ target-mips/translate.c | 121

[Qemu-devel] [PATCH v2 03/22] target-mips: add SELEQZ and SELNEZ instructions

2014-06-11 Thread Leon Alrae
Signed-off-by: Leon Alrae Reviewed-by: Aurelien Jarno --- v2: * correct conditions to match instruction name --- disas/mips.c|8 target-mips/translate.c | 16 2 files changed, 24 insertions(+), 0 deletions(-) diff --git a/disas/mips.c b/disas/mips.c

[Qemu-devel] [PATCH v2 09/22] target-mips: redefine Integer Multiply and Divide instructions

2014-06-11 Thread Leon Alrae
Use "R6_" prefix in front of all new Multiply / Divide instructions for easier differentiation between R6 and preR6. Signed-off-by: Leon Alrae --- v2: * use tcg_gen_mul_* for cases where the high part is discarded --- disas/mips.c| 16 +++ target-mips/translat

[Qemu-devel] [PATCH v2 07/22] target-mips: signal RI Exception on DSP and Loongson instructions

2014-06-11 Thread Leon Alrae
Move DSP and Loongson instruction to *_legacy functions as they have been removed in R6. Signed-off-by: Leon Alrae Reviewed-by: Aurelien Jarno --- target-mips/translate.c | 195 --- 1 files changed, 98 insertions(+), 97 deletions(-) diff --git a

[Qemu-devel] [PATCH v2 16/22] target-mips: add new Floating Point instructions

2014-06-11 Thread Leon Alrae
. Signed-off-by: Leon Alrae --- disas/mips.c| 22 +++ target-mips/helper.h| 21 +++ target-mips/op_helper.c | 108 +++ target-mips/translate.c | 449 ++- 4 files changed, 552 insertions(+), 48 deletions(-) diff --git a/disas

[Qemu-devel] [PATCH v2 13/22] target-mips: add Compact Branches

2014-06-11 Thread Leon Alrae
From: Yongbok Kim Introduce MIPS32R6 Compact Branch instructions which do not have delay slot - they have forbidden slot instead. However, current implementation does not support forbidden slot yet. Signed-off-by: Yongbok Kim Signed-off-by: Leon Alrae --- v2: * rename "handle_delay_slo

[Qemu-devel] [PATCH v2 12/22] target-mips: add ALIGN, DALIGN, BITSWAP and DBITSWAP instructions

2014-06-11 Thread Leon Alrae
From: Yongbok Kim Signed-off-by: Yongbok Kim Signed-off-by: Leon Alrae --- v2: * have separate bitswap and dbitswap helpers and use common function * use TCG_CALL_NO_RWG_SE flag for bitswap and dbitswap helpers * remove useless shift in ALIGN and DALIGN * improve ALIGN implementation by

[Qemu-devel] [PATCH v2 22/22] target-mips: define a new generic CPU supporting MIPS64R6

2014-06-11 Thread Leon Alrae
Signed-off-by: Leon Alrae --- target-mips/translate_init.c | 29 + 1 files changed, 29 insertions(+), 0 deletions(-) diff --git a/target-mips/translate_init.c b/target-mips/translate_init.c index 29dc2ef..0adbb19 100644 --- a/target-mips/translate_init.c +++ b

[Qemu-devel] [PATCH v2 14/22] target-mips: add Addressing and PC-relative instructions

2014-06-11 Thread Leon Alrae
Signed-off-by: Leon Alrae --- disas/mips.c| 42 +- target-mips/translate.c | 198 --- 2 files changed, 227 insertions(+), 13 deletions(-) diff --git a/disas/mips.c b/disas/mips.c index bee39d8..e041858 100644 --- a/disas/mips.c

[Qemu-devel] [PATCH v2 18/22] target-mips: do not allow Status.FR=0 mode in 64-bit FPU

2014-06-11 Thread Leon Alrae
Status.FR bit must be ignored on write and read as 1 when an implementation of Release 6 of the Architecture in which a 64-bit floating point unit is implemented. Signed-off-by: Leon Alrae --- target-mips/translate.c |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a

[Qemu-devel] [PATCH v2 01/22] target-mips: define ISA_MIPS64R6

2014-06-11 Thread Leon Alrae
Signed-off-by: Leon Alrae --- v2: * move new CPU definition to a separate patch --- target-mips/mips-defs.h | 28 +++- 1 files changed, 19 insertions(+), 9 deletions(-) diff --git a/target-mips/mips-defs.h b/target-mips/mips-defs.h index 9dfa516..6cb62b2 100644 --- a

[Qemu-devel] [PATCH v2 19/22] target-mips: remove JR, BLTZAL, BGEZAL and add NAL, BAL instructions

2014-06-11 Thread Leon Alrae
From: Yongbok Kim Signed-off-by: Yongbok Kim Signed-off-by: Leon Alrae --- disas/mips.c|2 ++ target-mips/translate.c | 18 -- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/disas/mips.c b/disas/mips.c index dd2473e..e3e253f 100644 --- a

[Qemu-devel] [PATCH v2 17/22] target-mips: add new Floating Point Comparison instructions

2014-06-11 Thread Leon Alrae
From: Yongbok Kim Signed-off-by: Yongbok Kim Signed-off-by: Leon Alrae --- disas/mips.c| 44 ++ target-mips/helper.h| 27 ++ target-mips/op_helper.c | 111 + target-mips/translate.c | 206

[Qemu-devel] [PATCH v2 15/22] softfloat: add functions corresponding to IEEE-2008 min/maxNumMag

2014-06-11 Thread Leon Alrae
returns y if |y| > |x|, otherwise maxnum(x,y) Signed-off-by: Leon Alrae --- fpu/softfloat.c | 37 +++-- include/fpu/softfloat.h |4 2 files changed, 35 insertions(+), 6 deletions(-) diff --git a/fpu/softfloat.c b/fpu/softf

[Qemu-devel] [PATCH v2 21/22] target-mips: use pointers referring to appropriate decoding function

2014-06-11 Thread Leon Alrae
After selecting CPU in QEMU the base ISA will not change. Therefore introducing *_arch function pointers that are set in cpu_state_reset to point at the appropriate SPECIAL and SPECIAL3 decoding functions, and avoid unnecessary 'if' statements. Signed-off-by: Leon Alrae --- t

[Qemu-devel] [PATCH v2 20/22] mips_malta: update malta's pseudo-bootloader - replace JR with JALR

2014-06-11 Thread Leon Alrae
JR has been removed in R6 and now this instruction will cause Reserved Instruction Exception. Therefore use JALR with rd=0 which is equivalent to JR. Signed-off-by: Leon Alrae --- hw/mips/mips_malta.c | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/mips

[Qemu-devel] [PATCH v2 02/22] target-mips: signal RI Exception on instructions removed in R6

2014-06-11 Thread Leon Alrae
loads / stores - traps - legacy accumulator instructions - COP1X - MIPS-3D Signed-off-by: Leon Alrae Reviewed-by: Aurelien Jarno --- target-mips/translate.c | 64 +-- 1 files changed, 56 insertions(+), 8 deletions(-) diff --git a/target-mips

Re: [Qemu-devel] [PATCH v2 12/22] target-mips: add ALIGN, DALIGN, BITSWAP and DBITSWAP instructions

2014-06-12 Thread Leon Alrae
On 11/06/2014 17:39, Richard Henderson wrote: > On 06/11/2014 08:19 AM, Leon Alrae wrote: >> * add missing zero register case > > What missing zero register case? > >> +if (rd == 0) { >> +/* Treat as NOP. */ >> +break; >>

Re: [Qemu-devel] [v4 PATCH] target-mips: implement UserLocal Register

2014-06-18 Thread Leon Alrae
Hi Petar, >> @@ -4214,7 +4215,17 @@ static void gen_mfc0(DisasContext *ctx, TCGv arg, int >> reg, int sel) >> case 1: >> //gen_helper_mfc0_contextconfig(arg); /* SmartMIPS ASE */ >> rn = "ContextConfig"; >> +goto die; >> //break; >> +

[Qemu-devel] [PATCH 00/12] implement features required in MIPS64 Release 6

2014-06-19 Thread Leon Alrae
comments / suggestions are more than welcome! Thanks, Leon Leon Alrae (12): target-mips: add KScratch registers target-mips: update cpu_save/cpu_load to support KScratch registers target-mips: distinguish between data load and instruction fetch target-mips: add RI and XI fields to TLB

[Qemu-devel] [PATCH 01/12] target-mips: add KScratch registers

2014-06-19 Thread Leon Alrae
CP0_KScratch1-6 registers. For Release 6, all KScratch registers are required. Signed-off-by: Leon Alrae --- target-mips/cpu.h |3 +++ target-mips/translate.c | 27 +++ 2 files changed, 30 insertions(+), 0 deletions(-) diff --git a/target-mips/cpu.h b/target

[Qemu-devel] [PATCH 04/12] target-mips: add RI and XI fields to TLB entry

2014-06-19 Thread Leon Alrae
In Revision 3 of the architecture, the RI and XI bits were added to the TLB to enable more secure access of memory pages. These bits (along with the Dirty bit) allow the implementation of read-only, write-only, no-execute access policies for mapped pages. Signed-off-by: Leon Alrae --- target

[Qemu-devel] [PATCH 08/12] target-mips: add BadInstr and BadInstrP support

2014-06-19 Thread Leon Alrae
is in a branch delay slot. The BadInstr and BadInstrP registers are provided to allow acceleration of instruction emulation. Signed-off-by: Leon Alrae --- target-mips/cpu.h |6 +++ target-mips/helper.c| 23 +++ target-mips/translate.c | 102

[Qemu-devel] [PATCH 06/12] target-mips: add new Read-Inhibit and Execute-Inhibit exceptions

2014-06-19 Thread Leon Alrae
when the virtual address of a memory load reference matches a TLB entry whose RI bit is set. This exception type can only occur if the RI bit is implemented within the TLB and is enabled, this is denoted by the PageGrain RIE bit. Signed-off-by: Leon Alrae --- target-mips/cpu.h|5

[Qemu-devel] [PATCH 03/12] target-mips: distinguish between data load and instruction fetch

2014-06-19 Thread Leon Alrae
Signed-off-by: Leon Alrae --- target-mips/helper.c | 27 --- 1 files changed, 16 insertions(+), 11 deletions(-) diff --git a/target-mips/helper.c b/target-mips/helper.c index 064622c..b59ac13 100644 --- a/target-mips/helper.c +++ b/target-mips/helper.c @@ -26,6 +26,12

[Qemu-devel] [PATCH 07/12] target-mips: add TLBINV support

2014-06-19 Thread Leon Alrae
support for Config4.IE == 3 only (i.e. TLBINV* instructions operate on entire MMU). Single TLB entry can be marked as invalid on TLB entry write by having EntryHi.EHINV set to 1. Signed-off-by: Leon Alrae --- disas/mips.c |2 + target-mips/cpu.h|7 target

[Qemu-devel] [PATCH 05/12] target-mips: update PageGrain and m{t, f}c0 EntryLo{0, 1}

2014-06-19 Thread Leon Alrae
PageGrain needs rw bitmask which differs between MIPS architectures. In pre-R6 if RIXI is supported, PageGrain.XIE and PageGrain.RIE are writeable, whereas in R6 they are read-only 1. Signed-off-by: Leon Alrae --- target-mips/cpu.h|4 target-mips/helper.h |5

[Qemu-devel] [PATCH 11/12] target-mips: enable features in MIPS32R5-generic core

2014-06-19 Thread Leon Alrae
Signed-off-by: Leon Alrae --- target-mips/translate_init.c |9 +++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/target-mips/translate_init.c b/target-mips/translate_init.c index 561eeb0..1f199fd 100644 --- a/target-mips/translate_init.c +++ b/target-mips

[Qemu-devel] [PATCH 10/12] target-mips: update cpu_save/cpu_load to support BadInstr registers

2014-06-19 Thread Leon Alrae
Signed-off-by: Leon Alrae --- target-mips/machine.c |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/target-mips/machine.c b/target-mips/machine.c index 966c5ef..a51b344 100644 --- a/target-mips/machine.c +++ b/target-mips/machine.c @@ -26,6 +26,10 @@ static void

[Qemu-devel] [PATCH 09/12] target-mips: save cpu state if instruction can cause an exception

2014-06-19 Thread Leon Alrae
Execution of these instructions can trigger exceptions which are supposed to update BadInstr/BadInstrP. Therefore saving cpu state in order capture the opcode. Signed-off-by: Leon Alrae --- target-mips/translate.c | 19 +++ 1 files changed, 19 insertions(+), 0 deletions

[Qemu-devel] [PATCH 02/12] target-mips: update cpu_save/cpu_load to support KScratch registers

2014-06-19 Thread Leon Alrae
Signed-off-by: Leon Alrae --- target-mips/machine.c |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/target-mips/machine.c b/target-mips/machine.c index 0496faa..966c5ef 100644 --- a/target-mips/machine.c +++ b/target-mips/machine.c @@ -144,6 +144,9 @@ void

[Qemu-devel] [PATCH 12/12] target-mips: enable features in MIPS64R6-generic core

2014-06-19 Thread Leon Alrae
Signed-off-by: Leon Alrae --- target-mips/translate_init.c |7 ++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/target-mips/translate_init.c b/target-mips/translate_init.c index 1f199fd..0deaee7 100644 --- a/target-mips/translate_init.c +++ b/target-mips

Re: [Qemu-devel] [PATCH v2 14/22] target-mips: add Addressing and PC-relative instructions

2014-06-24 Thread Leon Alrae
On 20/06/2014 21:50, Aurelien Jarno wrote: > The patch subject is a bit misleading, as it also includes the AUI family. Thanks for pointing this out. >> +#if defined(TARGET_MIPS64) >> +case R6_OPC_LDPC: /* bits 18 and 19 are part of immediate */ >> +case R6_OPC_LDPC + (1 << 16): >

Re: [Qemu-devel] [PATCH v2 22/22] target-mips: define a new generic CPU supporting MIPS64R6

2014-06-24 Thread Leon Alrae
On 19/06/2014 23:16, Aurelien Jarno wrote: > On Wed, Jun 11, 2014 at 04:19:52PM +0100, Leon Alrae wrote: >> Signed-off-by: Leon Alrae >> --- >> target-mips/translate_init.c | 29 + >> 1 files changed, 29 insertions(+), 0 deletions(-) >

Re: [Qemu-devel] [PATCH v2 16/22] target-mips: add new Floating Point instructions

2014-06-24 Thread Leon Alrae
On 20/06/2014 22:14, Aurelien Jarno wrote: >> In R6 all Floating Point instructions are supposed to be IEEE-2008 compliant >> i.e. FIR.HAS2008 always 1. However, QEMU softfloat for MIPS has not been >> updated yet. > > I don't think we can "update" softfloat. The existing version has to > stay to

Re: [Qemu-devel] [PATCH v2 13/22] target-mips: add Compact Branches

2014-06-24 Thread Leon Alrae
On 11/06/2014 17:52, Richard Henderson wrote: > On 06/11/2014 08:19 AM, Leon Alrae wrote: >> +case OPC_BEQZC: >> +tcg_gen_setcondi_tl(TCG_COND_EQ, bcond, t0, 0); >> +break; > ... >> +/* Compact branches don't have dela

Re: [Qemu-devel] [PATCH v3 00/21] target-mips: add MIPS64R6 Instruction Set support

2014-08-12 Thread Leon Alrae
ping On 05/08/2014 10:26, Leon Alrae wrote: > ping > > http://patchwork.ozlabs.org/patch/365066/ > http://patchwork.ozlabs.org/patch/365042/ > http://patchwork.ozlabs.org/patch/365046/ > http://patchwork.ozlabs.org/patch/365056/ > http://patchwork.ozlabs.org/patch/365059/

Re: [Qemu-devel] [PATCH v3 00/21] target-mips: add MIPS64R6 Instruction Set support

2014-08-22 Thread Leon Alrae
ping Anybody? There hasn't been any feedback on this patchset for almost 2 months now... On 12/08/2014 12:36, Leon Alrae wrote: > ping > > On 05/08/2014 10:26, Leon Alrae wrote: >> ping >> >> http://patchwork.ozlabs.org/patch/365066/ >> http://patc

[Qemu-devel] [PATCH] target-mips: fix decoding of microMIPS POOL32Axf instructions

2013-08-01 Thread Leon Alrae
These are not DSP instructions, thus there is no "ac" field. For more details please refer to instruction encoding of MULT, MULTU, MADD, MADDU, MSUB, MSUBU, MFHI, MFLO, MTHI, MTLO in MIPS Architecture for Programmers Volume II-B: The microMIPS32 Instruction Set Signed-off-by:

Re: [Qemu-devel] [PATCH] target-mips: fix decoding of microMIPS POOL32Axf instructions

2013-08-05 Thread Leon Alrae
On 03/08/13 23:01, Aurelien Jarno wrote: > On Thu, Aug 01, 2013 at 11:02:27AM +0100, Leon Alrae wrote: >> These are not DSP instructions, thus there is no "ac" field. >> >> For more details please refer to instruction encoding of >> MULT, MULTU, MADD, MADDU, M

Re: [Qemu-devel] [PATCH] target-mips: fix decoding of microMIPS POOL32Axf instructions

2013-08-05 Thread Leon Alrae
On 05/08/13 11:50, Aurelien Jarno wrote: > On Mon, Aug 05, 2013 at 08:41:52AM +0100, Leon Alrae wrote: >> On 03/08/13 23:01, Aurelien Jarno wrote: >>> On Thu, Aug 01, 2013 at 11:02:27AM +0100, Leon Alrae wrote: >>>> These are not DSP instructions, thus there is no

[Qemu-devel] [PATCH v2] target-mips: fix decoding of microMIPS POOL32Axf instructions

2013-08-05 Thread Leon Alrae
: The microMIPS32 Instruction Set MIPS Architecture for Programmers Volume IV-e: The MIPS DSP Module for the microMIPS32 Architecture Signed-off-by: Leon Alrae --- target-mips/translate.c | 58 ++ 1 files changed, 53 insertions(+), 5 deletions

[Qemu-devel] [PATCH v3] target-mips: fix decoding of microMIPS POOL32Axf instructions

2013-08-06 Thread Leon Alrae
: The microMIPS32 Instruction Set MIPS Architecture for Programmers Volume IV-e: The MIPS DSP Module for the microMIPS32 Architecture Signed-off-by: Leon Alrae --- Changes from v2: Do not ignore bits 14 and 15 for case 0x35 Changes from v1: Add DSP version of listed instructions target-mips

[Qemu-devel] [PATCH v4 11/21] target-mips: Status.UX/SX/KX enable 32-bit address wrapping

2014-10-08 Thread Leon Alrae
In R6 the special behaviour for data references is also specified for Kernel and Supervisor mode. Therefore MIPS_HFLAG_UX is replaced by generic MIPS_HFLAG_AWRAP indicating enabled 32-bit address wrapping. Signed-off-by: Leon Alrae Reviewed-by: Aurelien Jarno --- v2: * set hflag indicating 32

[Qemu-devel] [PATCH v4 05/21] target-mips: extract decode_opc_special* from decode_opc

2014-10-08 Thread Leon Alrae
Creating separate decode functions for special, special2 and special3 instructions to ease adding new R6 instructions and removing legacy instructions. Signed-off-by: Leon Alrae Reviewed-by: Aurelien Jarno --- target-mips/translate.c | 1678 --- 1

[Qemu-devel] [PATCH v4 02/21] target-mips: signal RI Exception on instructions removed in R6

2014-10-08 Thread Leon Alrae
loads / stores - traps - legacy accumulator instructions - COP1X - MIPS-3D Signed-off-by: Leon Alrae Reviewed-by: Aurelien Jarno --- target-mips/translate.c | 64 ++--- 1 file changed, 56 insertions(+), 8 deletions(-) diff --git a/target-mips/translate.c

[Qemu-devel] [PATCH v4 10/21] target-mips: move CLO, DCLO, CLZ, DCLZ, SDBBP and free special2 in R6

2014-10-08 Thread Leon Alrae
Also consider OPC_SPIM instruction as deleted in R6 because it is overlaping with MIPS32R6 SDBBP. Signed-off-by: Leon Alrae Reviewed-by: Aurelien Jarno --- v2: * check_insn_opc_removed() moved to decode_opc_special2_legacy() --- disas/mips.c| 5 ++ target-mips/translate.c | 121

[Qemu-devel] [PATCH v4 14/21] target-mips: add AUI, LSA and PCREL instruction families

2014-10-08 Thread Leon Alrae
Signed-off-by: Leon Alrae --- v3: * use sextract32 instead of open coding the bit field extraction * replace _i64 with _tl in DAHI, DATI and DAUI * fix misleading LDPC comment --- disas/mips.c| 42 ++- target-mips/translate.c | 197

[Qemu-devel] [PATCH v4 06/21] target-mips: split decode_opc_special* into *_r6 and *_legacy

2014-10-08 Thread Leon Alrae
functions will contain instructions which were removed in R6. Signed-off-by: Leon Alrae Reviewed-by: Aurelien Jarno --- v2: * imm contains shifted value --- target-mips/translate.c | 228 +--- 1 file changed, 160 insertions(+), 68 deletions(-) diff --gi

[Qemu-devel] [PATCH v4 18/21] target-mips: do not allow Status.FR=0 mode in 64-bit FPU

2014-10-08 Thread Leon Alrae
Status.FR bit must be ignored on write and read as 1 when an implementation of Release 6 of the Architecture in which a 64-bit floating point unit is implemented. Signed-off-by: Leon Alrae Reviewed-by: Yongbok Kim --- v3: * remove line modifying CP0_Status_rw_bitmask as this is done while

[Qemu-devel] [PATCH v4 15/21] softfloat: add functions corresponding to IEEE-2008 min/maxNumMag

2014-10-08 Thread Leon Alrae
returns y if |y| > |x|, otherwise maxnum(x,y) Signed-off-by: Leon Alrae Reviewed-by: Aurelien Jarno --- v3: * rename abs argument to ismag --- fpu/softfloat.c | 37 +++-- include/fpu/softfloat.h | 4 2 files changed, 35 insertions(+),

[Qemu-devel] [PATCH v4 21/21] target-mips: define a new generic CPU supporting MIPS64 Release 6 ISA

2014-10-08 Thread Leon Alrae
Signed-off-by: Leon Alrae --- v3: * add comment to make it clear that the current definition of MIPS64R6-generic CPU does not contain support for all MIPS64R6 features yet. --- target-mips/translate_init.c | 30 ++ 1 file changed, 30 insertions(+) diff --git a

[Qemu-devel] [PATCH v4 12/21] target-mips: add ALIGN, DALIGN, BITSWAP and DBITSWAP instructions

2014-10-08 Thread Leon Alrae
From: Yongbok Kim Signed-off-by: Yongbok Kim Signed-off-by: Leon Alrae Reviewed-by: Aurelien Jarno --- v3: * bitswap: use gen_load_gpr instead of optimizing very unlikely case and making it less readable v2: * have separate bitswap and dbitswap helpers and use common function * use

[Qemu-devel] [PATCH v4 20/21] mips_malta: update malta's pseudo-bootloader - replace JR with JALR

2014-10-08 Thread Leon Alrae
JR has been removed in R6 and now this instruction will cause Reserved Instruction Exception. Therefore use JALR with rd=0 which is equivalent to JR. Signed-off-by: Leon Alrae Reviewed-by: Aurelien Jarno --- hw/mips/mips_malta.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions

[Qemu-devel] [PATCH v4 19/21] target-mips: remove JR, BLTZAL, BGEZAL and add NAL, BAL instructions

2014-10-08 Thread Leon Alrae
From: Yongbok Kim Signed-off-by: Yongbok Kim Signed-off-by: Leon Alrae Reviewed-by: Aurelien Jarno --- disas/mips.c| 2 ++ target-mips/translate.c | 18 -- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/disas/mips.c b/disas/mips.c index 9d13bc0

[Qemu-devel] [PATCH v4 13/21] target-mips: add compact and CP1 branches

2014-10-08 Thread Leon Alrae
From: Yongbok Kim Introduce MIPS32R6 Compact Branch instructions which do not have delay slot - they have forbidden slot instead. However, current implementation does not support forbidden slot yet. Add also BC1EQZ and BC1NEZ instructions. Signed-off-by: Yongbok Kim Signed-off-by: Leon Alrae

[Qemu-devel] [PATCH v4 17/21] target-mips: add new Floating Point Comparison instructions

2014-10-08 Thread Leon Alrae
From: Yongbok Kim Signed-off-by: Yongbok Kim Signed-off-by: Leon Alrae Reviewed-by: Aurelien Jarno --- disas/mips.c| 44 +++ target-mips/helper.h| 27 +++ target-mips/op_helper.c | 111 ++ target-mips/translate.c | 206

[Qemu-devel] [PATCH v4 16/21] target-mips: add new Floating Point instructions

2014-10-08 Thread Leon Alrae
. Signed-off-by: Leon Alrae Reviewed-by: Yongbok Kim --- v4: * in gen_sel_d and gen_sel_s: do not 'return' on invalid instruction, so temps are always freed * fix style issue v3: * use FOP_PROTO for new instructions and create FLOAT_RINT macro to be consistent * use TCG_CALL_NO_RWG_S

Re: [Qemu-devel] [PATCH 03/20] target-mips: move common funcs to cpu.h

2014-10-10 Thread Leon Alrae
Hi Yongbok, On 14/07/2014 10:55, Yongbok Kim wrote: > +#include "exec/cpu_ldst.h" > + > +#if defined(CONFIG_USER_ONLY) > +#define HELPER_LD(name, insn, type) \ > +static inline type do_##name(CPUMIPSState *env, target_ulong addr, \ > +

Re: [Qemu-devel] [PATCH 04/20] target-mips: add 8, 16, 32, 64 bits load and store

2014-10-10 Thread Leon Alrae
On 14/07/2014 10:55, Yongbok Kim wrote: > add 8, 16, 32, 64 bits load and store > > Signed-off-by: Yongbok Kim > --- > target-mips/cpu.h |8 > 1 files changed, 8 insertions(+), 0 deletions(-) > > diff --git a/target-mips/cpu.h b/target-mips/cpu.h > index 68ce383..51d1c88 100644 > -

Re: [Qemu-devel] [PATCH 06/20] target-mips: add MSA opcode enum

2014-10-10 Thread Leon Alrae
+OPC_MSA_FSOR_df = (0x9 << 22) | OPC_MSA_3RF_1C, > +OPC_MSA_FSEQ_df = (0xA << 22) | OPC_MSA_3RF_1A, > +OPC_MSA_FTQ_df = (0xA << 22) | OPC_MSA_3RF_1B, > +OPC_MSA_FSUNE_df= (0xA << 22) | OPC_MSA_3RF_1C, > +OPC_MSA_FSUEQ_df= (0xB << 22) | OPC_MSA_3RF_1A, > +OPC_MSA_FSNE_df = (0xB << 22) | OPC_MSA_3RF_1C, > +OPC_MSA_FSLT_df = (0xC << 22) | OPC_MSA_3RF_1A, > +OPC_MSA_FMIN_df = (0xC << 22) | OPC_MSA_3RF_1B, > +OPC_MSA_MULR_Q_df = (0xC << 22) | OPC_MSA_3RF_1C, > +OPC_MSA_FSULT_df= (0xD << 22) | OPC_MSA_3RF_1A, > +OPC_MSA_FMIN_A_df = (0xD << 22) | OPC_MSA_3RF_1B, > +OPC_MSA_MADDR_Q_df = (0xD << 22) | OPC_MSA_3RF_1C, > +OPC_MSA_FSLE_df = (0xE << 22) | OPC_MSA_3RF_1A, > +OPC_MSA_FMAX_df = (0xE << 22) | OPC_MSA_3RF_1B, > +OPC_MSA_MSUBR_Q_df = (0xE << 22) | OPC_MSA_3RF_1C, > +OPC_MSA_FSULE_df= (0xF << 22) | OPC_MSA_3RF_1A, > +OPC_MSA_FMAX_A_df = (0xF << 22) | OPC_MSA_3RF_1B, > + > +/* BIT instruction df(bits 22..16) = _B _H _W _D */ > +OPC_MSA_SLLI_df = (0x0 << 23) | OPC_MSA_BIT_09, > +OPC_MSA_SAT_S_df= (0x0 << 23) | OPC_MSA_BIT_0A, > +OPC_MSA_SRAI_df = (0x1 << 23) | OPC_MSA_BIT_09, > +OPC_MSA_SAT_U_df= (0x1 << 23) | OPC_MSA_BIT_0A, > +OPC_MSA_SRLI_df = (0x2 << 23) | OPC_MSA_BIT_09, > +OPC_MSA_SRARI_df= (0x2 << 23) | OPC_MSA_BIT_0A, > +OPC_MSA_BCLRI_df= (0x3 << 23) | OPC_MSA_BIT_09, > +OPC_MSA_SRLRI_df= (0x3 << 23) | OPC_MSA_BIT_0A, > +OPC_MSA_BSETI_df= (0x4 << 23) | OPC_MSA_BIT_09, > +OPC_MSA_BNEGI_df= (0x5 << 23) | OPC_MSA_BIT_09, > +OPC_MSA_BINSLI_df = (0x6 << 23) | OPC_MSA_BIT_09, > +OPC_MSA_BINSRI_df = (0x7 << 23) | OPC_MSA_BIT_09, > +}; > + > /* global register indices */ > static TCGv_ptr cpu_env; > static TCGv cpu_gpr[32], cpu_PC; > Otherwise it looks good to me: Reviewed-by: Leon Alrae Leon

Re: [Qemu-devel] [PATCH 08/20] target-mips: add msa_helper.c

2014-10-10 Thread Leon Alrae
On 14/07/2014 10:55, Yongbok Kim wrote: > add msa_helper.c > > Signed-off-by: Yongbok Kim > --- > target-mips/Makefile.objs |2 +- > target-mips/msa_helper.c | 196 > + > 2 files changed, 197 insertions(+), 1 deletions(-) > create mode 100644 t

Re: [Qemu-devel] [PATCH 09/20] target-mips: add MSA branch instructions

2014-10-10 Thread Leon Alrae
On 14/07/2014 10:55, Yongbok Kim wrote: > add MSA branch instructions > > Signed-off-by: Yongbok Kim > --- > target-mips/translate.c | 107 > ++- > 1 files changed, 105 insertions(+), 2 deletions(-) > > diff --git a/target-mips/translate.c b/target-

Re: [Qemu-devel] [PATCH v4 14/21] target-mips: add AUI, LSA and PCREL instruction families

2014-10-14 Thread Leon Alrae
Hi Yongbok, On 13/10/2014 14:37, Yongbok Kim wrote: >> +OPC_PCREL= (0x3B << 26), >> +}; >> + >> +/* PC-relative address computation / loads */ >> +#define MASK_OPC_PCREL_TOP2BITS(op) (MASK_OP_MAJOR(op) | (op & (3 << >> 19))) >> +#define MASK_OPC_PCREL_TOP5BITS(op) (MASK_OP_MAJOR(op) | (

[Qemu-devel] [PULL 01/28] target-mips: define ISA_MIPS64R6

2014-10-15 Thread Leon Alrae
Signed-off-by: Leon Alrae Reviewed-by: Aurelien Jarno --- target-mips/mips-defs.h | 28 +++- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/target-mips/mips-defs.h b/target-mips/mips-defs.h index 9dfa516..6cb62b2 100644 --- a/target-mips/mips-defs.h +++ b

[Qemu-devel] [PULL 00/28] target-mips queue

2014-10-15 Thread Leon Alrae
MIPS16 and microMIPS * SYNCI improvement * unused MIPS code removal Dongxue Zhang (1): target-mips/translate.c: Update OPC_SYNCI Leon Alrae (17): target-mips: define ISA_MIPS64R6 target-mips: signal RI Exception on instructio

[Qemu-devel] [PULL 03/28] target-mips: add SELEQZ and SELNEZ instructions

2014-10-15 Thread Leon Alrae
Signed-off-by: Leon Alrae Reviewed-by: Aurelien Jarno Reviewed-by: James Hogan --- disas/mips.c| 8 target-mips/translate.c | 18 -- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/disas/mips.c b/disas/mips.c index 2106b57..b950e53 100644

[Qemu-devel] [PULL 08/28] target-mips: move PREF, CACHE, LLD and SCD instructions

2014-10-15 Thread Leon Alrae
The encoding of PREF, CACHE, LLD and SCD instruction changed in MIPS32R6. Additionally, the hint codes in PREF instruction greater than or equal to 24 generate Reserved Instruction Exception. Signed-off-by: Leon Alrae Reviewed-by: Aurelien Jarno --- disas/mips.c| 4 target

[Qemu-devel] [PULL 11/28] target-mips: Status.UX/SX/KX enable 32-bit address wrapping

2014-10-15 Thread Leon Alrae
In R6 the special behaviour for data references is also specified for Kernel and Supervisor mode. Therefore MIPS_HFLAG_UX is replaced by generic MIPS_HFLAG_AWRAP indicating enabled 32-bit address wrapping. Signed-off-by: Leon Alrae Reviewed-by: Aurelien Jarno --- target-mips/cpu.h | 18

[Qemu-devel] [PULL 05/28] target-mips: extract decode_opc_special* from decode_opc

2014-10-15 Thread Leon Alrae
Creating separate decode functions for special, special2 and special3 instructions to ease adding new R6 instructions and removing legacy instructions. Signed-off-by: Leon Alrae Reviewed-by: Aurelien Jarno --- target-mips/translate.c | 1678 --- 1

[Qemu-devel] [PULL 02/28] target-mips: signal RI Exception on instructions removed in R6

2014-10-15 Thread Leon Alrae
loads / stores - traps - legacy accumulator instructions - COP1X - MIPS-3D Signed-off-by: Leon Alrae Reviewed-by: Aurelien Jarno --- target-mips/translate.c | 64 ++--- 1 file changed, 56 insertions(+), 8 deletions(-) diff --git a/target-mips/translate.c

[Qemu-devel] [PULL 04/28] target-mips: move LL and SC instructions

2014-10-15 Thread Leon Alrae
The encoding of LL and SC instruction has changed in MIPS32 Release 6. Signed-off-by: Leon Alrae Reviewed-by: Aurelien Jarno Reviewed-by: James Hogan --- disas/mips.c| 9 - target-mips/translate.c | 28 ++-- 2 files changed, 34 insertions(+), 3

[Qemu-devel] [PULL 09/28] target-mips: redefine Integer Multiply and Divide instructions

2014-10-15 Thread Leon Alrae
Use "R6_" prefix in front of all new Multiply / Divide instructions for easier differentiation between R6 and preR6. Signed-off-by: Leon Alrae Reviewed-by: Aurelien Jarno --- disas/mips.c| 16 +++ target-mips/translate.c | 343 +

[Qemu-devel] [PULL 15/28] softfloat: add functions corresponding to IEEE-2008 min/maxNumMag

2014-10-15 Thread Leon Alrae
returns y if |y| > |x|, otherwise maxnum(x,y) Signed-off-by: Leon Alrae Reviewed-by: Aurelien Jarno --- fpu/softfloat.c | 37 +++-- include/fpu/softfloat.h | 4 2 files changed, 35 insertions(+), 6 deletions(-) diff --git a/fpu/softf

[Qemu-devel] [PULL 06/28] target-mips: split decode_opc_special* into *_r6 and *_legacy

2014-10-15 Thread Leon Alrae
functions will contain instructions which were removed in R6. Signed-off-by: Leon Alrae Reviewed-by: Aurelien Jarno --- target-mips/translate.c | 228 +--- 1 file changed, 160 insertions(+), 68 deletions(-) diff --git a/target-mips/translate.c b/t

[Qemu-devel] [PULL 10/28] target-mips: move CLO, DCLO, CLZ, DCLZ, SDBBP and free special2 in R6

2014-10-15 Thread Leon Alrae
Also consider OPC_SPIM instruction as deleted in R6 because it is overlaping with MIPS32R6 SDBBP. Signed-off-by: Leon Alrae Reviewed-by: Aurelien Jarno --- disas/mips.c| 5 ++ target-mips/translate.c | 121 +--- 2 files changed, 67

[Qemu-devel] [PULL 07/28] target-mips: signal RI Exception on DSP and Loongson instructions

2014-10-15 Thread Leon Alrae
Move DSP and Loongson instruction to *_legacy functions as they have been removed in R6. Signed-off-by: Leon Alrae Reviewed-by: Aurelien Jarno --- target-mips/translate.c | 195 1 file changed, 98 insertions(+), 97 deletions(-) diff --git a

[Qemu-devel] [PULL 19/28] target-mips: remove JR, BLTZAL, BGEZAL and add NAL, BAL instructions

2014-10-15 Thread Leon Alrae
From: Yongbok Kim Signed-off-by: Yongbok Kim Signed-off-by: Leon Alrae Reviewed-by: Aurelien Jarno --- disas/mips.c| 2 ++ target-mips/translate.c | 18 -- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/disas/mips.c b/disas/mips.c index 5ebb5fd

[Qemu-devel] [PULL 12/28] target-mips: add ALIGN, DALIGN, BITSWAP and DBITSWAP instructions

2014-10-15 Thread Leon Alrae
From: Yongbok Kim Signed-off-by: Yongbok Kim Signed-off-by: Leon Alrae Reviewed-by: Aurelien Jarno --- disas/mips.c| 4 ++ target-mips/helper.h| 5 ++ target-mips/op_helper.c | 23 ++ target-mips/translate.c | 120

  1   2   3   4   5   6   7   8   9   10   >