Re: [Qemu-devel] [PATCH v3 00/11] tcg mips64 and mips r6 improvements

2016-11-25 Thread Aurelien Jarno
32-bit BE host during the week-end. Aurelien -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net

Re: [Qemu-devel] [PATCH] tcg/mips: Add support for mips64el backend

2016-11-14 Thread Aurelien Jarno
bit guests, but I guess that's something acceptable, as it's not a regression. Aurelien -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net

Re: [Qemu-devel] [PATCH v2] target-sh4: add atomic tas

2016-11-03 Thread Aurelien Jarno
Thanks, this look good. I have tried it with my test image, and it doesn't break it. Reviewed-by: Aurelien Jarno <aurel...@aurel32.net> Acked-by: Aurelien Jarno <aurel...@aurel32.net> I consider this as a bugfix, not a new feature, so that should be fine despite the soft freeze. Do

Re: [Qemu-devel] Provide safe_syscall for s390x

2016-10-18 Thread Aurelien Jarno
out the exact comand line that is > > > used to compile this file? > > > > Yes, lt was added with the extended immidiate facility. So either use > > -march=z9-109 (introduced in > > 2005) or replace the lt with an l + ltr to also run on older models. > > >

Re: [Qemu-devel] [PATCH] exec: fix tlb_vaddr_to_host()

2016-09-22 Thread Aurelien Jarno
; > #else > int index = (addr >> TARGET_PAGE_BITS) & (CPU_TLB_SIZE - 1); > CPUTLBEntry *tlbentry = >tlb_table[mmu_idx][index]; That looks fine to me, sorry for the typo. Reviewed-by: Aurelien Jarno <aurel...@aurel32.net> -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net

Re: [Qemu-devel] [PATCH v2] sh4: fix broken link to documentation

2016-08-31 Thread Aurelien Jarno
t;fullma...@gmail.com> > --- > Changes from v1: > * Add the 'https://' part to the link in hw/sh4/shix.c. > > hw/sh4/shix.c | 2 +- > target-sh4/README.sh4 | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) Thanks for the new version. Acked-by: Au

Re: [Qemu-devel] [PATCH] sh4: fix broken link to documentation

2016-08-31 Thread Aurelien Jarno
front. It will go over the 80 characters limits, but I think that's fine in such a case. I guess this will be merged through the trivial queue, that seems the best to me. Aurelien -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net

Re: [Qemu-devel] [PATCH] softfloat: Fix warn about implicit conversion from int to int8_t

2016-08-10 Thread Aurelien Jarno
-*/ > -void float_raise(int8_t flags, float_status *status); > +void float_raise(uint8_t flags, float_status *status); > > > /*-------- > | If `a' is denormal and we are in flush-to-zero mode

Re: [Qemu-devel] [PATCH 2/5] softfloat: Fix warn about implicit conversion from int to int8_t

2016-08-10 Thread Aurelien Jarno
On 2016-08-09 22:12, Peter Maydell wrote: > On 9 August 2016 at 20:16, Aurelien Jarno <aurel...@aurel32.net> wrote: > > On 2016-08-09 15:02, Pranith Kumar wrote: > >> Change the flag type to 'int' to fix the implicit conversion error. > >> > >> Suggested-b

Re: [Qemu-devel] [PATCH 2/5] softfloat: Fix warn about implicit conversion from int to int8_t

2016-08-09 Thread Aurelien Jarno
/* should denormalised results go to zero and set the inexact flag? */ > flag flush_to_zero; This changes the size of the structure, and thus of the CPU*State structures. I don't think it's something we want to do, especially given we currently only use 7 flags, so 7 bits an

Re: [Qemu-devel] [PATCH v4 for-2.7 2/7] tcg: Reorg TCGOp chaining

2016-08-05 Thread Aurelien Jarno
iewed-by: Aurelien Jarno <aurel...@aurel32.net> -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net

Re: [Qemu-devel] [PATCH v3 9/9] tcg: Lower indirect registers in a separate pass

2016-07-25 Thread Aurelien Jarno
the optimization time and the level of optimization. Nevertheless I think it's the correct way to go forward for now and this patch fixes real issues on hosts with limited registers. Maybe just add a note saying there *might* be better ways to do that. Reviewed-by: Aurelien Jarno <aurel

Re: [Qemu-devel] [PATCH v3 8/9] tcg: Include liveness info in the dumps

2016-07-25 Thread Aurelien Jarno
e logfile is the terminal. As such when not dumping to the file, the alignment is wrong. -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net

Re: [Qemu-devel] [PATCH v3 8/9] tcg: Include liveness info in the dumps

2016-07-25 Thread Aurelien Jarno
On 2016-06-23 20:48, Richard Henderson wrote: > Signed-off-by: Richard Henderson <r...@twiddle.net> > --- > tcg/tcg.c | 26 ++ > 1 file changed, 26 insertions(+) Reviewed-by: Aurelien Jarno <aurel...@aurel32.net> -- Aurelien Jarno

Re: [Qemu-devel] [PATCH v3 7/9] tcg: Compress dead_temps and mem_temps into a single array

2016-07-25 Thread Aurelien Jarno
e. The other alternative would have been to use the TCGTempSet with the bitmap functions like in optimize.c, and use only 2 bits per temp. That something that can be done later though. All that said and provided you change the name: Reviewed-by: Aurelien Jarno <aurel...@aurel32.net> -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net

Re: [Qemu-devel] [PATCH v3 6/9] tcg: Fold life data into TCGOp

2016-07-25 Thread Aurelien Jarno
> 2 files changed, 17 insertions(+), 18 deletions(-) This looks fine and goes in the right direction of having all the data at the same location. In the long term it might be useful to have the TCG stream and the associated data together to implement more agressive optimisations

Re: [Qemu-devel] [PATCH v3 5/9] tcg: Reorg TCGOp chaining

2016-07-25 Thread Aurelien Jarno
16; > -signed next : 16; > +/* Index of the prex/next op, or 0 for the end of the list. */ It's not introduced by your patch, but you might want to fix the typo prex -> prev. > +unsigned prev : 16; > +unsigned next : 16; > } TCGOp; > > -QEMU_BUILD_BUG_ON(NB_OPS > 0xff); > -QEMU_BUILD_BUG_ON(OPC_BUF_SIZE >= 0x7fff); > -QEMU_BUILD_BUG_ON(OPPARAM_BUF_SIZE >= 0x7fff); > +/* Make sure operands fit in the bitfields above. */ > +QEMU_BUILD_BUG_ON(NB_OPS > (1 << 8)); > +QEMU_BUILD_BUG_ON(OPC_BUF_SIZE > (1 << 16)); > +QEMU_BUILD_BUG_ON(OPPARAM_BUF_SIZE > (1 << 16)); > + > +/* Make sure that we don't overflow 64 bits without noticing. */ > +QEMU_BUILD_BUG_ON(sizeof(TCGOp) > 8); > > struct TCGContext { > uint8_t *pool_cur, *pool_end; It seems that gen_first_op_idx and gen_last_op_idx are now unused. Shouldn't they be removed? -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net

Re: [Qemu-devel] [PATCH v3 3/9] tcg: Require liveness analysis

2016-07-25 Thread Aurelien Jarno
re and given the kind of optimisations we are doing there it became quite difficult to compare the generated code with and without liveness. Reviewed-by: Aurelien Jarno <aurel...@aurel32.net> -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net

Re: [Qemu-devel] [PATCH v3 1/9] tcg: Fix name for high-half register

2016-07-25 Thread Aurelien Jarno
pstrcat(buf, sizeof(buf), "_1"); > -ts->name = strdup(buf); > +ts2->name = strdup(buf); > } else { > ts->base_type = type; > ts->type = type; Reviewed-by: Aurelien Jarno <aurel...@aurel32.net> -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net

Re: [Qemu-devel] [PATCH v3 4/9] tcg: Compress liveness data to 16 bits

2016-07-25 Thread Aurelien Jarno
A small improvement, probably for later: we can zero the s->op_arg_life structure, and then access it directly instead of using the arg_life temporary variable. Reviewed-by: Aurelien Jarno <aurel...@aurel32.net> -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net

Re: [Qemu-devel] [PATCH] gt64xxx: access right I/O port when activating byte swapping

2016-07-22 Thread Aurelien Jarno
On 2016-06-18 22:48, Hervé Poussineau wrote: > Hi Aurélien, > > Le 20/05/2016 à 21:56, Aurelien Jarno a écrit : > > On 2016-05-20 15:05, Hervé Poussineau wrote: > > > Incidentally, this fixes YAMON on big endian guest. > > > > > > Signed-off-

Re: [Qemu-devel] [PATCH v3 0/9] Third try at fixing sparc register allocation

2016-07-22 Thread Aurelien Jarno
ixed for 2.7, but this is > complex enough I'd prefer another set of eyes. I'll try to have a look during the week-end. Sorry about the delay. -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net

Re: [Qemu-devel] [PATCH] hw/mips_malta: Fix YAMON API print routine

2016-07-22 Thread Aurelien Jarno
uration mismatch but QEMU would previously > incorrectly jump & wind up printing a continuous stream of the letter E. > > Signed-off-by: Paul Burton <paul.bur...@imgtec.com> > Cc: Aurelien Jarno <aurel...@aurel32.net> > Cc: Leon Alrae <leon.al...@imgtec.com> >

Re: [Qemu-devel] [PATCH] target-sh4: Use glib allocator in movcal helper

2016-07-21 Thread Aurelien Jarno
ked at it and test it. It's all fine, sorry for the delay. Acked-by: Aurelien Jarno <aurel...@aurel32.net> -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net

Re: [Qemu-devel] [PATCH] hw/sh4: Add dtb support

2016-06-26 Thread Aurelien Jarno
qemu_fdt_setprop_string(fdt, "/chosen", "bootargs", > +kernel_cmdline); > +if (r < 0) { > +fprintf(stderr, "couldn't set /chosen/bootargs\n"); > +} > +} >

Re: [Qemu-devel] [PATCH] net: mipsnet: check transmit buffer size before sending

2016-06-13 Thread Aurelien Jarno
ister will now read > back as MAX_ETH_FRAME_SIZE rather than 0 if written with > an overlarge value. > > Do we have any documentation on how this (simulated) > device is supposed to behave in this case? This device is not supported by the linux kernel for more than 2.5 years (since v3.7). Do we want to keep this device in QEMU? Aurelien -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net

Re: [Qemu-devel] [PATCH 1/2] Fix confusing argument names of do_unaligned_access() functions

2016-06-13 Thread Aurelien Jarno
mes to avoid a confusion. Unless I missed something, it seems that the is_user/mmu_idx argument is never used. Should we maybe just drop it? Otherwise it looks fine. -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net

Re: [Qemu-devel] [PATCH] hw/sh4/sh_pci.c: Use ldl_le_p() and stl_le_p()

2016-06-13 Thread Aurelien Jarno
case 0x1c0: > return pcic->par; > case 0x1c4: Thanks for the patch. I confirm it builds and works fine. Acked-by: Aurelien Jarno <aurel...@aurel32.net> -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net

Re: [Qemu-devel] [PATCH 0/2] macio: switch over to new byte-aligned DMA helpers

2016-05-30 Thread Aurelien Jarno
ath as I know this is > something you've had issues with before and I couldn't quite figure out how to > reproduce your TRIM tests from before. I have just tested the TRIM path, all works fine with your 2 patches applied. Aurelien -- Aurelien Jarno GPG: 4096R/1DDD8C9

Re: [Qemu-devel] [PATCH v2 06/12] tcg/mips: Add support for fence

2016-05-30 Thread Aurelien Jarno
_op_call: /* Always emitted via tcg_out_call. */ > @@ -1716,6 +1720,8 @@ static const TCGTargetOpDef mips_op_defs[] = { > { INDEX_op_qemu_ld_i64, { "L", "L", "lZ", "lZ" } }, > { INDEX_op_qemu_st_i64, { "SZ", "SZ", "SZ&qu

Re: [Qemu-devel] [PATCH] gt64xxx: access right I/O port when activating byte swapping

2016-05-20 Thread Aurelien Jarno
(size == 2) { > +return lduw_le_p(buf); > +} else if (size == 4) { > +return ldl_le_p(buf); > +} else { > +g_assert_not_reached(); > + } The device is configured is little endian, and then the little endian value converted into native endianness. Wouldn't it be simple to declare it as DEVICE_NATIVE_ENDIAN? Aurelien -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net

[Qemu-devel] [PATCH] target-mips: fix call to memset in soft reset code

2016-05-09 Thread Aurelien Jarno
of sizeof(). Fix that. Cc: Stefan Weil <s...@weilnetz.de> Cc: Leon Alrae <leon.al...@imgtec.com> LP: https://bugs.launchpad.net/qemu/+bug/1577841 Signed-off-by: Aurelien Jarno <aurel...@aurel32.net> --- target-mips/helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) d

Re: [Qemu-devel] [Bug 1577841] [NEW] target-mips/helper.c:542: bad sizeof ?

2016-05-03 Thread Aurelien Jarno
ng)); > > > > ** Affects: qemu > > Importance: Undecided > > Status: New > > This might be an error. I think it should be > > memset(env->CP0_WatchLo, 0, sizeof(env->CP0_WatchLo)); > I confirm this is the correct version of the co

Re: [Qemu-devel] [PATCH] target-mips: Fix RDHWR exception host PC

2016-04-28 Thread Aurelien Jarno
ed to the inner guest. > > Fixes: b00c72180c36 ("target-mips: add PC, XNP reg numbers to RDHWR") > Signed-off-by: James Hogan <james.ho...@imgtec.com> > Cc: Leon Alrae <leon.al...@imgtec.com> > Cc: Yongbok Kim <yongbok@imgtec.com> > Cc: Aurelien

Re: [Qemu-devel] 'tcg fatal error' with qemu v2.6.0-rc3 (bisected)

2016-04-27 Thread Aurelien Jarno
fore by chance by loading a random value into the register. That said to look deeper into it, it would be better to be able to reproduce the issue. Aurelien -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net

Re: [Qemu-devel] [PATCH v2 10/11] tcg/mips: Make direct jump patching thread-safe

2016-04-22 Thread Aurelien Jarno
On 2016-04-22 20:00, Sergey Fedorov wrote: > On 22/04/16 19:51, Aurelien Jarno wrote: > > On 2016-04-22 18:47, Aurelien Jarno wrote: > >> On 2016-04-22 19:08, Sergey Fedorov wrote: > >>> From: Sergey Fedorov <serge.f...@gmail.com> > >>> > >>

Re: [Qemu-devel] [PATCH v2 10/11] tcg/mips: Make direct jump patching thread-safe

2016-04-22 Thread Aurelien Jarno
On 2016-04-22 18:47, Aurelien Jarno wrote: > On 2016-04-22 19:08, Sergey Fedorov wrote: > > From: Sergey Fedorov <serge.f...@gmail.com> > > > > Ensure direct jump patching in MIPS is atomic by using > > atomic_read()/atomic_set() for code patching. > > >

Re: [Qemu-devel] [PATCH v2 10/11] tcg/mips: Make direct jump patching thread-safe

2016-04-22 Thread Aurelien Jarno
t32_t *)jmp_addr; > -*ptr = deposit32(*ptr, 0, 26, addr >> 2); > +uint32_t insn = atomic_read(ptr); > +atomic_set(ptr, deposit32(insn, 0, 26, addr >> 2)); > flush_icache_range(jmp_addr, jmp_addr + 4); Does it really make sense to read and write the value at

[Qemu-devel] [PATCH 1/2] tcg: use tcg_debug_assert instead of assert (fix performance regression)

2016-04-21 Thread Aurelien Jarno
ces. This patch replaces all the calls to assert into calss to tcg_debug_assert. Cc: Peter Maydell <peter.mayd...@linaro.org> Cc: Richard Henderson <r...@twiddle.net> Signed-off-by: Aurelien Jarno <aurel...@aurel32.net> --- tcg/aarch64/tcg-target.inc.c | 24

[Qemu-devel] [PATCH 2/2] tcg: check for CONFIG_DEBUG_TCG instead of NDEBUG

2016-04-21 Thread Aurelien Jarno
Check for CONFIG_DEBUG_TCG instead of NDEBUG, drop now useless code. Cc: Richard Henderson <r...@twiddle.net> Signed-off-by: Aurelien Jarno <aurel...@aurel32.net> --- tcg/aarch64/tcg-target.inc.c | 4 ++-- tcg/arm/tcg-target.inc.c | 2 +- tcg/i386/tcg-target.inc.c| 2 +-

[Qemu-devel] [PATCH] cuda: fix off-by-one error in SET_TIME command

2016-04-18 Thread Aurelien Jarno
David Gibson <da...@gibson.dropbear.id.au> Signed-off-by: Aurelien Jarno <aurel...@aurel32.net> --- hw/misc/macio/cuda.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/misc/macio/cuda.c b/hw/misc/macio/cuda.c index c7472aa..f15f301 100644 --- a/hw/misc/macio/cuda.

Re: [Qemu-devel] [PATCH] tcg/mips: Fix type of tcg_target_reg_alloc_order[]

2016-04-01 Thread Aurelien Jarno
^ > > Make it an array of ints to fix the build and match other architectures. > > Fixes: 91478cefaaf2 ("tcg: Allocate indirect_base temporaries in a different > order") > Signed-off-by: James Hogan <james.ho...@imgtec.com> > Cc: Aurelien Jarno <au

Re: [Qemu-devel] [PATCH v2 01/16] tcg-mips: Always use tcg_debug_assert

2016-02-28 Thread Aurelien Jarno
; int msb = ctz32(~a2) - 1; > -assert(use_mips32r2_instructions); > - assert(is_p2m1(a2)); > +tcg_debug_assert(use_mips32r2_instructions); > +tcg_debug_assert(is_p2m1(a2)); > tcg_out_opc_bf(s, OPC_EXT, a0, a1, msb, 0); > break; > } Reviewed-by: Aurelien Jarno <aurel...@aurel32.net> -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net

Re: [Qemu-devel] [PATCH v2 00/16] tcg mips64 and mips r6 improvements

2016-02-28 Thread Aurelien Jarno
next days. I have a few comments on the individual patches, I'll send them asap. Note that I don't have an R6 machine, so I haven't been able to test that part. Aurelien -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net

Re: [Qemu-devel] [Qemu-ppc] [PULL 03/39] macio: use the existing IDEDMA aiocb to hold the active DMA aiocb

2016-01-29 Thread Aurelien Jarno
+++++ I don't think you want to add this file to the git. -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net

Re: [Qemu-devel] [PATCH] target-mips: Stop using uint_fast*_t types in r4k_tlb_t struct

2016-01-29 Thread Aurelien Jarno
+- > 1 file changed, 13 insertions(+), 13 deletions(-) Thanks for the cleanup. Reviewed-by: Aurelien Jarno <aurel...@aurel32.net> -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net

Re: [Qemu-devel] [PATCH 0/4] fpu: Remove use of int_fast*_t types

2016-01-29 Thread Aurelien Jarno
gt; ++-- > include/fpu/softfloat.h | 16 ++--- > include/qemu/osdep.h| 7 --- > 4 files changed, 104 insertions(+), 99 deletions(-) Great work. Reviewed-by: Aurelien Jarno <aurel...@aurel32.net> -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net

Re: [Qemu-devel] [PATCH] MAINTAINERS: Add section for FPU emulation

2016-01-29 Thread Aurelien Jarno
--- > Would anybody else like to be listed here (ie to be cc'd on softfloat > patches) ? Richard? Aurelien? As long as it is in "Odd Fixes" mode, it would like to get it listed please. I don't have time to follow the whole mailing list anymore, so being Cc'd n on softfloat pa

Re: [Qemu-devel] [PATCH RESEND] softfloat: fix return type of roundAndPackFloat16

2016-01-17 Thread Aurelien Jarno
On 2016-01-15 14:21, Peter Maydell wrote: > On 13 January 2016 at 16:03, Aurelien Jarno <aurel...@aurel32.net> wrote: > > The roundAndPackFloat16 function should return a float16 value, not a > > float32 one. Fix that. > > > > Cc: Peter Maydell <pete

Re: [Qemu-devel] [PATCH 0/6] Get rid of confusing softfloat-specific integer types

2016-01-13 Thread Aurelien Jarno
+- > hw/ppc/spapr_events.c | 4 +- > include/fpu/softfloat.h| 68 ++ > include/hw/i386/pc.h | 2 +- > migration/ram.c| 2 +- > target-alpha/fpu_helper.c | 2 +- > target-mips/kvm.c | 4 +- > target-mips/msa_helper.c

[Qemu-devel] [PATCH RESEND] softfloat: fix return type of roundAndPackFloat16

2016-01-13 Thread Aurelien Jarno
The roundAndPackFloat16 function should return a float16 value, not a float32 one. Fix that. Cc: Peter Maydell <peter.mayd...@linaro.org> Signed-off-by: Aurelien Jarno <aurel...@aurel32.net> --- fpu/softfloat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Peter, given you

Re: [Qemu-devel] [PATCH] target-mips: Fix ALIGN instruction when bp=0

2016-01-01 Thread Aurelien Jarno
TCGv t1 = tcg_temp_new(); > gen_load_gpr(t1, rs); The resulting binary code should be the same, but less #ifdef means less risk of breakage, as the code is always compiled. -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net

Re: [Qemu-devel] [PATCH v2 06/14] tcg: Change reg_to_temp to TCGTemp pointer

2015-12-31 Thread Aurelien Jarno
On 2015-12-17 12:00, Richard Henderson wrote: > Signed-off-by: Richard Henderson <r...@twiddle.net> > --- > tcg/tcg.c | 113 > ++ > tcg/tcg.h | 6 ++-- > 2 files changed, 57 insertions(+), 62 deletions(-) Rev

Re: [Qemu-devel] [PATCH 01/14] tcg: Change tcg_global_mem_new_* to take a TCGv_ptr

2015-12-31 Thread Aurelien Jarno
+-- > target-tricore/translate.c| 22 ++-- > target-unicore32/translate.c | 2 +- > target-xtensa/translate.c | 10 +++--- > tcg/tcg.c | 21 +++ > tcg/tcg.h | 38 +++- > 22 files changed, 282 insertions(+)

Re: [Qemu-devel] [PATCH v2 11/14] tcg: Implement indirect memory registers

2015-12-31 Thread Aurelien Jarno
veness analysis already ensures that temps are dead. > - Keep an assert for safety. */ > -assert(ts->val_type == TEMP_VAL_DEAD); > -#else > -temp_dead(s, ts); > +/* ??? Liveness does not yet incorporate indirect bases.

Re: [Qemu-devel] [PATCH v2 10/14] tcg: Introduce temp_load

2015-12-31 Thread Aurelien Jarno
: sign extend ? */ And here. > -tcg_out_movi(s, ts->type, reg, ts->val); > } else { > -tcg_abort(); > +TCGRegSet arg_set; > + > + tcg_regset_clear(arg_set); > + tcg_regset_set_reg(arg_set

Re: [Qemu-devel] [PATCH v2 02/14] tcg: Change ts->mem_reg to ts->mem_base

2015-12-31 Thread Aurelien Jarno
This is simple bar the existing reserved_regs check. > > Signed-off-by: Richard Henderson <r...@twiddle.net> > --- > tcg/tcg.c | 65 > +++ > tcg/tcg.h | 4 ++-- > 2 files changed, 38 insertions(+), 31 del

Re: [Qemu-devel] [PATCH v2 04/14] tcg: More use of TCGReg where appropriate

2015-12-31 Thread Aurelien Jarno
On 2015-12-17 12:00, Richard Henderson wrote: > Signed-off-by: Richard Henderson <r...@twiddle.net> > --- > tcg/tcg.c | 26 +++--- > tcg/tcg.h | 8 > 2 files changed, 19 insertions(+), 15 deletions(-) Reviewed-by: Aurelien Jarno <aurel...@au

Re: [Qemu-devel] [PATCH v2 03/14] tcg: Tidy temporary allocation

2015-12-31 Thread Aurelien Jarno
rming an abort() which can happen all the time in an assert which can happen only when TCG debug is enabled. Is it really something we want? Maybe we should add a tcg_assert() function. Otherwise it looks fine. Reviewed-by: Aurelien Jarno <aurel...@aurel32.net> -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net

Re: [Qemu-devel] [PATCH v2 05/14] tcg: Remove tcg_get_arg_str_i32/64

2015-12-31 Thread Aurelien Jarno
On 2015-12-17 12:00, Richard Henderson wrote: > Signed-off-by: Richard Henderson <r...@twiddle.net> > --- > tcg/tcg.c | 10 -- > tcg/tcg.h | 5 - > 2 files changed, 15 deletions(-) Reviewed-by: Aurelien Jarno <aurel...@aurel32.net> -- Aurelien Jarno

Re: [Qemu-devel] [PATCH v2 07/14] tcg: Change temp_dead argument to TCGTemp

2015-12-31 Thread Aurelien Jarno
On 2015-12-17 12:00, Richard Henderson wrote: > Signed-off-by: Richard Henderson <r...@twiddle.net> > --- > tcg/tcg.c | 48 +++- > 1 file changed, 23 insertions(+), 25 deletions(-) Reviewed-by: Aurelien Jarno <aurel...@aurel32.net

Re: [Qemu-devel] [PATCH v2 08/14] tcg: Change temp_sync argument to TCGTemp

2015-12-31 Thread Aurelien Jarno
On 2015-12-17 12:00, Richard Henderson wrote: > Signed-off-by: Richard Henderson <r...@twiddle.net> > --- > tcg/tcg.c | 55 --- > 1 file changed, 28 insertions(+), 27 deletions(-) Reviewed-by: Aurelien Jarno <aurel...@aurel

Re: [Qemu-devel] [PATCH v2 09/14] tcg: Change temp_save argument to TCGTemp

2015-12-31 Thread Aurelien Jarno
On 2015-12-17 12:00, Richard Henderson wrote: > Signed-off-by: Richard Henderson <r...@twiddle.net> > --- > tcg/tcg.c | 16 +++- > 1 file changed, 7 insertions(+), 9 deletions(-) Reviewed-by: Aurelien Jarno <aurel...@aurel32.net> -- Aurelien Jarno

Re: [Qemu-devel] [PATCH] tcg/arm: improve direct jump

2015-12-10 Thread Aurelien Jarno
On 2015-12-10 07:31, Richard Henderson wrote: > On 12/10/2015 12:02 AM, Aurelien Jarno wrote: > >Note: I don't really get the reason for the current 16MB limit. With the > >standard branch instructions the offset is coded on 24 bits, but shifted > >right by 2, which should gi

[Qemu-devel] [PATCH] tcg/arm: improve direct jump

2015-12-10 Thread Aurelien Jarno
ail.com> Signed-off-by: Aurelien Jarno <aurel...@aurel32.net> --- include/exec/exec-all.h | 24 tcg/arm/tcg-target.c| 8 +++- translate-all.c | 2 -- 3 files changed, 7 insertions(+), 27 deletions(-) Note: I don't really get the reason fo

Re: [Qemu-devel] tcg: improve MAX_CODE_GEN_BUFFER_SIZE for arm

2015-12-08 Thread Aurelien Jarno
TB linking. > Any suggest for this issue? I already posted a patch a long time ago to remove the 16MB limit on ARM hosts: http://lists.gnu.org/archive/html/qemu-devel/2012-10/msg01684.html However as you can see in the thread, it has been rejected as it doesn't not bring improvement in all

Re: [Qemu-devel] tcg: improve MAX_CODE_GEN_BUFFER_SIZE for arm

2015-12-08 Thread Aurelien Jarno
On 2015-12-08 11:51, Laurent Desnogues wrote: > Hello, > > On Tue, Dec 8, 2015 at 11:39 AM, Aurelien Jarno <aurel...@aurel32.net> wrote: > [...] > > I already posted a patch a long time ago to remove the 16MB limit on ARM > > hosts: > > > > http://lis

[Qemu-devel] [PATCH] target-mips: silence NaNs for cvt.s.d and cvt.d.s

2015-12-06 Thread Aurelien Jarno
cvt.s.d and cvt.d.s are FP operations and thus need to convert input sNaN into corresponding qNaN. Explicitely use the floatXX_maybe_silence_nan functions for that as the floatXX_to_floatXX functions do not do that. Cc: Leon Alrae <leon.al...@imgtec.com> Signed-off-by: Aurelien Jarno

Re: [Qemu-devel] [PATCH for-2.5] tcg: Increase the highwater reservation

2015-12-04 Thread Aurelien Jarno
On 2015-12-03 13:19, Aurelien Jarno wrote: > On 2015-12-02 10:36, Richard Henderson wrote: > > On 12/01/2015 08:32 AM, Aurelien Jarno wrote: > > >On 2015-12-01 08:19, Richard Henderson wrote: > > >>If there are a lot of guest memory ops in the TB, the

Re: [Qemu-devel] [PATCH for-2.5] tcg: Increase the highwater reservation

2015-12-03 Thread Aurelien Jarno
On 2015-12-02 10:36, Richard Henderson wrote: > On 12/01/2015 08:32 AM, Aurelien Jarno wrote: > >On 2015-12-01 08:19, Richard Henderson wrote: > >>If there are a lot of guest memory ops in the TB, the amount of > >>code generated by tcg_out_tb_finalize could be well mor

Re: [Qemu-devel] [PATCH for-2.5] tcg: Increase the highwater reservation

2015-12-01 Thread Aurelien Jarno
On 2015-12-01 08:19, Richard Henderson wrote: > If there are a lot of guest memory ops in the TB, the amount of > code generated by tcg_out_tb_finalize could be well more than 1k. > In the short term, increase the reservation larger than any TB > seen in practice. > > Reported-

Re: [Qemu-devel] [PATCH for-2.5] tcg: Increase the highwater reservation

2015-12-01 Thread Aurelien Jarno
In the short term, increase the reservation larger than any TB > > seen in practice. > > > > Reported-by: Aurelien Jarno <aurel...@aurel32.net> > > Signed-off-by: Richard Henderson <r...@twiddle.net> > > --- > > > > Reported and discussed with Aurelien on

Re: [Qemu-devel] [PATCH for-2.5] tcg: Increase the highwater reservation

2015-12-01 Thread Aurelien Jarno
On 2015-12-01 17:34, Aurelien Jarno wrote: > On 2015-12-01 16:28, Peter Maydell wrote: > > On 1 December 2015 at 16:19, Richard Henderson <r...@twiddle.net> wrote: > > > If there are a lot of guest memory ops in the TB, the amount of > > > code generated by tcg_o

Re: [Qemu-devel] [PATCH] hw/mips_malta: Fix KVM PC initialisation

2015-10-15 Thread Aurelien Jarno
t didn't update the PC initialisation for KVM to use > ram_low_size. Fix that now. > > Fixes: 71c199c81d29 ("mips_malta: provide ememsize env variable to kernels") > Signed-off-by: James Hogan <james.ho...@imgtec.com> > Cc: Paul Burton <paul.bur...@imgtec.com> &g

Re: [Qemu-devel] [PATCH v2] target-mips: remove wrong checks for recip.fmt and rsqrt.fmt

2015-10-11 Thread Aurelien Jarno
checks > that may break a program that uses these instructions. That is correct. That said these instructions do require at least a MIPS32R2 or a MIPS64R1 CPU. I guess we should add these checks now that check_cop1x do not guard them anymore. -- Aurelien Jarno GPG:

Re: [Qemu-devel] [PATCH v3 5/6] tcg/mips: Support r6 multiply/divide encodings

2015-10-08 Thread Aurelien Jarno
ng it into mul_i32 and > mul*h_i32 TCG ops. > > Signed-off-by: James Hogan <james.ho...@imgtec.com> > Reviewed-by: Richard Henderson <r...@twiddle.net> > Cc: Aurelien Jarno <aurel...@aurel32.net> > --- > Changes in v2: > - Use a common OPC_MUL definition. us

Re: [Qemu-devel] [PATCH v3 1/6] tcg-opc.h: Simplify debug_insn_start def

2015-10-08 Thread Aurelien Jarno
by: Richard Henderson <r...@twiddle.net> > --- > tcg/tcg-opc.h | 12 > 1 file changed, 4 insertions(+), 8 deletions(-) Reviewed-by: Aurelien Jarno <aurel...@aurel32.net> Note that it will conflict with the "tcg: Rename debug_insn_start to insn_start" p

Re: [Qemu-devel] [PATCH v3 4/6] tcg/mips: Support r6 JR encoding

2015-10-08 Thread Aurelien Jarno
; prediction stack hardware which may detect only particular encodings of > the return instruction. > > Signed-off-by: James Hogan <james.ho...@imgtec.com> > Reviewed-by: Richard Henderson <r...@twiddle.net> > Cc: Aurelien Jarno <aurel...@aurel32.net> > --- > Changes

Re: [Qemu-devel] [PATCH v3 2/6] disas/mips: Add R6 jr/jr.hb to disassembler

2015-10-08 Thread Aurelien Jarno
Reviewed-by: Richard Henderson <r...@twiddle.net> > Cc: Aurelien Jarno <aurel...@aurel32.net> > --- > Changes in v3: > - Whoops. Fix jr.hb r6 encoding (Leon) > --- > disas/mips.c | 2 ++ > 1 file changed, 2 insertions(+) Reviewed-by: Aurelien Jarno <aurel...@au

Re: [Qemu-devel] [PATCH v3 6/6] tcg/mips: Support r6 SEL{NE, EQ}Z instead of MOVN/MOVZ

2015-10-08 Thread Aurelien Jarno
usy, could you take them? (at the moment I don't have > anything handy to test the mips backend). Sorry I have been indeed a bit busy. I can send a pull request in the next days. As you prefer. -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net

Re: [Qemu-devel] [PATCH v3 6/6] tcg/mips: Support r6 SEL{NE, EQ}Z instead of MOVN/MOVZ

2015-10-08 Thread Aurelien Jarno
Z ret, v1, c1 > OR ret, ret, TMP1 > > Which does the following: > ret = cond ? v1 : v2 > > Signed-off-by: James Hogan <james.ho...@imgtec.com> > Cc: Richard Henderson <r...@twiddle.net> > Cc: Aurelien Jarno <aurel...@aurel32.net> > --- &g

Re: [Qemu-devel] [PATCH v3 3/6] tcg/mips: Add use_mips32r6_instructions definition

2015-10-08 Thread Aurelien Jarno
s.ho...@imgtec.com> > Reviewed-by: Richard Henderson <r...@twiddle.net> > Cc: Aurelien Jarno <aurel...@aurel32.net> > --- > tcg/mips/tcg-target.h | 7 +++ > 1 file changed, 7 insertions(+) Reviewed-by: Aurelien Jarno <aurel...@aurel32.net> > diff --gi

Re: [Qemu-devel] [PATCH] target-mips: Add enum for BREAK32

2015-10-08 Thread Aurelien Jarno
On 2015-10-02 17:50, Yongbok Kim wrote: > Add enum for BREAK32 > > Signed-off-by: Yongbok Kim <yongbok@imgtec.com> > --- > target-mips/translate.c |3 ++- > 1 files changed, 2 insertions(+), 1 deletions(-) Reviewed-by: Aurelien Jarno <aurel...@aurel

Re: [Qemu-devel] [PATCH v4 23/26] tcg: Emit prologue to the beginning of code_gen_buffer

2015-10-01 Thread Aurelien Jarno
_init(_ctx.tb_ctx.tb_lock); > } > > @@ -717,8 +709,6 @@ void tcg_exec_init(unsigned long tb_size) > { > cpu_gen_init(); > code_gen_alloc(tb_size); > -tcg_ctx.code_gen_ptr = tcg_ctx.code_gen_buffer; > -tcg_register_jit(tcg_ctx.code_gen_buffer, tcg_ctx.code_gen_buffer_size); > page_init(); > #if defined(CONFIG_SOFTMMU) > /* There's no guest base to take into account, so go ahead and Otherwise the patch looks fine to me. -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net

Re: [Qemu-devel] [PATCH v4 00/26] Do away with TB retranslation

2015-10-01 Thread Aurelien Jarno
hout any issue, except on SH4. I realized SH4 broken in some rare cases, but not directly by this patchset. There is an issue when a delay slot is split in two parts when reaching the maximum number of TCG ops. Given the patch 2 adds more TCG ops, it triggers more often. It is already possible to trigger

Re: [Qemu-devel] [PATCH v4 24/26] tcg: Allocate a guard page after code_gen_buffer

2015-10-01 Thread Aurelien Jarno
terpreted as a bug in the guest code. -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net

Re: [Qemu-devel] [PATCH v4 26/26] tcg: Adjust CODE_GEN_AVG_BLOCK_SIZE

2015-10-01 Thread Aurelien Jarno
| 11 ++- > 1 file changed, 6 insertions(+), 5 deletions(-) Reviewed-by: Aurelien Jarno <aurel...@aurel32.net> -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net

Re: [Qemu-devel] [PATCH v4 04/26] target-*: Introduce and use cpu_breakpoint_test

2015-10-01 Thread Aurelien Jarno
target-unicore32/translate.c | 24 ++-- > target-xtensa/translate.c | 25 +++------ > 18 files changed, 160 insertions(+), 239 deletions(-) Reviewed-by: Aurelien Jarno <aurel...@aurel32.net> -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net

Re: [Qemu-devel] [PATCH v4 25/26] tcg: Check for overflow via highwater mark

2015-10-01 Thread Aurelien Jarno
f the RAM, as the two do not seem that related. It happens that at some point we don't really increases performances anymore, and always defining it as 32MB might actually be a good idea. Personally I am using a patch that limits it to 128MB. -- Aurelien Jarno GPG: 4096R/1DDD8

Re: [Qemu-devel] [PATCH v3 20/25] tcg: Save insn data and use it in cpu_restore_state_from_tb

2015-09-25 Thread Aurelien Jarno
te_to_opc(env, tb, data); > > #ifdef CONFIG_PROFILER > -s->restore_time += profile_getclock() - ti; > -s->restore_count++; > +tcg_ctx.restore_time += profile_getclock() - ti; > +tcg_ctx.restore_count++; > #endif > return 0; > } > @@ -969,7 +1035,7 @@ TranslationBlock *tb_gen_code(CPUState *cpu, > tb_page_addr_t phys_pc, phys_page2; > target_ulong virt_page2; > tcg_insn_unit *gen_code_buf; > -int gen_code_size; > +int gen_code_size, search_size; > #ifdef CONFIG_PROFILER > int64_t ti; > #endif > @@ -1025,11 +1091,13 @@ TranslationBlock *tb_gen_code(CPUState *cpu, > #endif > > gen_code_size = tcg_gen_code(_ctx, gen_code_buf); > +search_size = encode_search(tb, (void *)gen_code_buf + gen_code_size); > > #ifdef CONFIG_PROFILER > tcg_ctx.code_time += profile_getclock(); > tcg_ctx.code_in_len += tb->size; > tcg_ctx.code_out_len += gen_code_size; > +tcg_ctx.search_out_len += search_size; > #endif > > #ifdef DEBUG_DISAS > @@ -1041,8 +1109,9 @@ TranslationBlock *tb_gen_code(CPUState *cpu, > } > #endif > > -tcg_ctx.code_gen_ptr = (void *)(((uintptr_t)gen_code_buf + > -gen_code_size + CODE_GEN_ALIGN - 1) & ~(CODE_GEN_ALIGN - 1)); > +tcg_ctx.code_gen_ptr = (void *) > +ROUND_UP((uintptr_t)gen_code_buf + gen_code_size + search_size, > + CODE_GEN_ALIGN); > > /* check next page if needed */ > virt_page2 = (pc + tb->size - 1) & TARGET_PAGE_MASK; If you fix the coding style issue I mentioned above, you get: Reviewed-by: Aurelien Jarno <aurel...@aurel32.net> -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net

Re: [Qemu-devel] [PATCH v3 21/25] tcg: Remove gen_intermediate_code_pc

2015-09-25 Thread Aurelien Jarno
re32/translate.c | 44 --- > target-xtensa/translate.c | 39 --- > tcg/tcg.h | 4 > 22 files changed, 90 insertions(+), 736 deletions(-) Reviewed-by: Aurelien Jarno <aurel...@aurel32.net> -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net

Re: [Qemu-devel] [PATCH v3 22/25] tcg: Remove tcg_gen_code_search_pc

2015-09-25 Thread Aurelien Jarno
> --- > tcg/tcg.c | 59 +++ > tcg/tcg.h | 2 -- > 2 files changed, 19 insertions(+), 42 deletions(-) Reviewed-by: Aurelien Jarno <aurel...@aurel32.net> -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net

Re: [Qemu-devel] [PATCH v3 19/25] tcg: Pass data argument to restore_state_to_opc

2015-09-24 Thread Aurelien Jarno
-- > target-unicore32/translate.c | 5 +++-- > target-xtensa/translate.c | 5 +++-- > tcg/tcg.c | 11 ++- > tcg/tcg.h | 2 ++ > translate-all.c | 2 +- > 22 files changed, 79 insertions(+), 66 deletions(-) Revi

Re: [Qemu-devel] [PATCH v3 16/25] tcg: Merge cpu_gen_code into tb_gen_code

2015-09-24 Thread Aurelien Jarno
t; translate-all.c | 131 > ++-- > 2 files changed, 59 insertions(+), 74 deletions(-) Reviewed-by: Aurelien Jarno <aurel...@aurel32.net> -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net

Re: [Qemu-devel] [PATCH v3 17/25] target-*: Drop cpu_gen_code define

2015-09-24 Thread Aurelien Jarno
target-ppc/cpu.h| 1 - > target-s390x/cpu.h | 1 - > target-sh4/cpu.h| 1 - > target-sparc/cpu.h | 1 - > target-tilegx/cpu.h | 1 - > target-xtensa/cpu.h | 1 - > 16 files changed, 16 deletions(-) Reviewed-by: Aurelien Jarno <aurel...@aurel32.net&g

Re: [Qemu-devel] [PATCH v3 15/25] target-sparc: Add npc state to insn_start

2015-09-24 Thread Aurelien Jarno
ns(+), 1 deletion(-) Reviewed-by: Aurelien Jarno <aurel...@aurel32.net> -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net

Re: [Qemu-devel] [PATCH v3 14/25] target-sparc: Remove gen_opc_jump_pc

2015-09-24 Thread Aurelien Jarno
ell <peter.mayd...@linaro.org> > Signed-off-by: Richard Henderson <r...@twiddle.net> > --- > target-sparc/translate.c | 19 ++- > 1 file changed, 10 insertions(+), 9 deletions(-) Reviewed-by: Aurelien Jarno <aurel...@aurel32.net> -- Aurelien Jarno

Re: [Qemu-devel] [PATCH v3 12/25] target-sparc: Tidy gen_branch_a interface

2015-09-24 Thread Aurelien Jarno
.net> > --- > target-sparc/translate.c | 21 ++--- > 1 file changed, 10 insertions(+), 11 deletions(-) > Reviewed-by: Aurelien Jarno <aurel...@aurel32.net> -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net

Re: [Qemu-devel] [PATCH v3 13/25] target-sparc: Split out gen_branch_n

2015-09-24 Thread Aurelien Jarno
derson <r...@twiddle.net> > --- > target-sparc/translate.c | 55 > > 1 file changed, 28 insertions(+), 27 deletions(-) Reviewed-by: Aurelien Jarno <aurel...@aurel32.net> -- Aurelien Jarno

Re: [Qemu-devel] [PATCH v3 18/25] tcg: Add TCG_MAX_INSNS

2015-09-24 Thread Aurelien Jarno
TCG_MAX_INSNS; > +} > > if (in_superpage(, pc_start)) { > pc_mask = (1ULL << 41) - 1; Given we have the same pattern in all targets, I do wonder if it wouldn't be better to just setup (cflags & CF_COUNT_MASK) to TCG_MAX_INSNS instead of 0

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