I'll
fix the conflicts at that time, depending in which orders the other
series are going in.
Aurelien Jarno (26):
target/s390x: remove dead code in translate.c
target/s390x: make IPTE SMP aware
target/s390x: implement TEST AND SET
target/s390x: implement TEST ADDRESSING MODE
target/s390x
Signed-off-by: Aurelien Jarno <aurel...@aurel32.net>
---
target/s390x/helper.h | 1 +
target/s390x/insn-data.def | 5 +
target/s390x/mem_helper.c | 37 +
target/s390x/translate.c | 8
4 files changed, 51 insertions(+)
diff
Signed-off-by: Aurelien Jarno <aurel...@aurel32.net>
---
target/s390x/translate.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/target/s390x/translate.c b/target/s390x/translate.c
index 4bd16d9f99..850df26ce1 100644
--- a/target/s390x/translate.c
+++ b/target
On 2017-05-24 12:22, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <r...@twiddle.net>
> ---
> target/s390x/insn-data.def | 1 +
> target/s390x/translate.c | 1 +
> 2 files changed, 2 insertions(+)
Reviewed-by: Aurelien Jarno <aurel...@aurel32.
et/s390x/mem_helper.c | 32
> target/s390x/translate.c | 42 ++
> 4 files changed, 48 insertions(+), 30 deletions(-)
Reviewed-by: Aurelien Jarno <aurel...@aurel32.net>
--
Aurelien Jarno G
4 ++--
> target/s390x/translate.c | 14 +-
> 2 files changed, 15 insertions(+), 3 deletions(-)
Reviewed-by: Aurelien Jarno <aurel...@aurel32.net>
--
Aurelien Jarno GPG: 4096R/1DDD8C9B
aurel...@aurel32.net http://www.aurel32.net
unctional interface.
>
> Signed-off-by: Richard Henderson <r...@twiddle.net>
> ---
> target/s390x/helper.h | 2 +-
> target/s390x/mem_helper.c | 135
> +-
> target/s390x/translate.c | 8 +--
> 3 files changed, 78 ins
changed, 3 insertions(+), 4 deletions(-)
Reviewed-by: Aurelien Jarno <aurel...@aurel32.net>
--
Aurelien Jarno GPG: 4096R/1DDD8C9B
aurel...@aurel32.net http://www.aurel32.net
On 2017-05-24 12:22, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <r...@twiddle.net>
> ---
> target/s390x/mem_helper.c | 25 +++--
> target/s390x/translate.c | 1 -
> 2 files changed, 15 insertions(+), 11 deletions(-)
Reviewed-by:
On 2017-05-24 12:22, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <r...@twiddle.net>
> ---
> target/s390x/mem_helper.c | 29 +
> target/s390x/translate.c | 1 -
> 2 files changed, 17 insertions(+), 13 deletions(-)
Reviewed-by:
On 2017-05-24 12:22, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <r...@twiddle.net>
> ---
> target/s390x/mem_helper.c | 30 ++
> target/s390x/translate.c | 1 -
> 2 files changed, 18 insertions(+), 13 deletions(-)
Reviewed-by:
Reviewed-by: Aurelien Jarno <aurel...@aurel32.net>
--
Aurelien Jarno GPG: 4096R/1DDD8C9B
aurel...@aurel32.net http://www.aurel32.net
On 2017-05-24 12:22, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <r...@twiddle.net>
> ---
> target/s390x/mem_helper.c | 31 ++-
> target/s390x/translate.c | 1 -
> 2 files changed, 18 insertions(+), 14 deletions(-)
Reviewed-by:
On 2017-05-24 12:22, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <r...@twiddle.net>
> ---
> target/s390x/mem_helper.c | 31 ++-
> target/s390x/translate.c | 1 -
> 2 files changed, 18 insertions(+), 14 deletions(-)
Reviewed-by:
file changed, 81 insertions(+), 80 deletions(-)
>
Reviewed-by: Aurelien Jarno <aurel...@aurel32.net>
--
Aurelien Jarno GPG: 4096R/1DDD8C9B
aurel...@aurel32.net http://www.aurel32.net
On 2017-05-23 16:21, Richard Henderson wrote:
> On 05/23/2017 10:28 AM, Aurelien Jarno wrote:
> > > Something like this, as a delta patch.
I confirm this patch is really needed, otherwise the executed
instruction seems to be executed at the next instruction.
> > Unfortunately i
On 2017-05-23 09:31, Richard Henderson wrote:
> On 05/23/2017 05:28 AM, Aurelien Jarno wrote:
> > On 2017-05-22 20:03, Richard Henderson wrote:
> > > +/* flush global tlb */
> > > +void HELPER(purge)(CPUS390XState *env)
> > > +{
> >
On 2017-05-23 08:54, Richard Henderson wrote:
> On 05/23/2017 03:48 AM, Aurelien Jarno wrote:
> > On 2017-05-22 20:02, Richard Henderson wrote:
> > > Previously, helper_ex would construct the insn and then implement
> > > the insn via direct calls other helpers. This w
On 2017-05-23 09:33, Richard Henderson wrote:
> On 05/23/2017 04:12 AM, Aurelien Jarno wrote:
> > On 2017-05-22 20:03, Richard Henderson wrote:
> > > Signed-off-by: Richard Henderson <r...@twiddle.net>
> > > ---
> > > target/s390x/insn-data.def
On 2017-05-23 12:48, Aurelien Jarno wrote:
> On 2017-05-22 20:02, Richard Henderson wrote:
> > Previously, helper_ex would construct the insn and then implement
> > the insn via direct calls other helpers. This was sufficient to
> > boot Linux but that is all.
> >
hat it happens before the
> + following branch, so that we don't need local temps. */
> +if ((mop & MO_SIZE) == MO_32) {
> +tcg_gen_deposit_i64(o->out, o->out, old, 0, 32);
> +} else {
> +tcg_gen_mov_i64(o->out, old);
> +}
> +tcg_t
d the while loop in
cpu_exec() will trigger the exception after the TB.
--
Aurelien Jarno GPG: 4096R/1DDD8C9B
aurel...@aurel32.net http://www.aurel32.net
On 2017-05-22 20:03, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <r...@twiddle.net>
> ---
> target/s390x/mem_helper.c | 8 ++--
> target/s390x/translate.c | 2 --
> 2 files changed, 6 insertions(+), 4 deletions(-)
Reviewed-by: Aurelien Jarno
Z, r1_o, ra2, r1_P, 0, csp, 0, MO_TEQ)
CSPG is part of the of the DAT-enhancement facility. I called it DAT_ENH
in my local patches to match the name we have in the CPU features.
--
Aurelien Jarno GPG: 4096R/1DDD8C9B
aurel...@aurel32.net http://www.aurel32.net
On 2017-05-22 20:03, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <r...@twiddle.net>
> ---
> target/s390x/mem_helper.c | 1 -
> target/s390x/translate.c | 1 -
> 2 files changed, 2 deletions(-)
Reviewed-by: Aurelien Jarno <aurel...@aurel32.
On 2017-05-22 20:03, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <r...@twiddle.net>
> ---
> target/s390x/mem_helper.c | 3 +++
> target/s390x/translate.c | 1 -
> 2 files changed, 3 insertions(+), 1 deletion(-)
Reviewed-by: Aurelien Jarno <aurel...@au
On 2017-05-22 20:03, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <r...@twiddle.net>
> ---
> target/s390x/mem_helper.c | 10 ++
> target/s390x/translate.c | 2 --
> 2 files changed, 6 insertions(+), 6 deletions(-)
Reviewed-by: Aurelien Jarno
On 2017-05-22 20:03, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <r...@twiddle.net>
> ---
> target/s390x/mem_helper.c | 10 +-
> target/s390x/translate.c | 1 -
> 2 files changed, 5 insertions(+), 6 deletions(-)
Reviewed-by: Aurelien Jarno
On 2017-05-22 20:03, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <r...@twiddle.net>
> ---
> target/s390x/mem_helper.c | 9 +
> target/s390x/translate.c | 1 -
> 2 files changed, 5 insertions(+), 5 deletions(-)
Reviewed-by: Aurelien Jarno
On 2017-05-22 20:02, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <r...@twiddle.net>
> ---
> target/s390x/mem_helper.c | 11 ++-
> target/s390x/translate.c | 1 -
> 2 files changed, 6 insertions(+), 6 deletions(-)
Reviewed-by: Aurelien Jarno
On 2017-05-22 20:03, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <r...@twiddle.net>
> ---
> target/s390x/mem_helper.c | 9 +
> target/s390x/translate.c | 1 -
> 2 files changed, 5 insertions(+), 5 deletions(-)
Reviewed-by: Aurelien Jarno
On 2017-05-22 20:03, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <r...@twiddle.net>
> ---
> target/s390x/mem_helper.c | 8
> target/s390x/translate.c | 1 -
> 2 files changed, 4 insertions(+), 5 deletions(-)
Reviewed-by: Aurelien Jarno
On 2017-05-22 20:02, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <r...@twiddle.net>
> ---
> target/s390x/mem_helper.c | 3 ++-
> target/s390x/translate.c | 1 -
> 2 files changed, 2 insertions(+), 2 deletions(-)
Reviewed-by: Aurelien Jarno <aurel...@au
On 2017-05-22 20:03, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <r...@twiddle.net>
> ---
> target/s390x/mem_helper.c | 9 +
> target/s390x/translate.c | 1 -
> 2 files changed, 5 insertions(+), 5 deletions(-)
Reviewed-by: Aurelien Jarno
On 2017-05-22 20:02, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <r...@twiddle.net>
> ---
> target/s390x/mem_helper.c | 5 +++--
> target/s390x/translate.c | 1 -
> 2 files changed, 3 insertions(+), 3 deletions(-)
Reviewed-by: Aurelien Jarno <aurel...@au
On 2017-05-22 20:03, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <r...@twiddle.net>
> ---
> target/s390x/mem_helper.c | 15 ---
> target/s390x/translate.c | 1 -
> 2 files changed, 8 insertions(+), 8 deletions(-)
Reviewed-by: Aurelien Jarno
On 2017-05-22 20:02, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <r...@twiddle.net>
> ---
> target/s390x/mem_helper.c | 6 +++---
> target/s390x/translate.c | 1 -
> 2 files changed, 3 insertions(+), 4 deletions(-)
Reviewed-by: Aurelien Jarno <aurel...@au
)
Reviewed-by: Aurelien Jarno <aurel...@aurel32.net>
--
Aurelien Jarno GPG: 4096R/1DDD8C9B
aurel...@aurel32.net http://www.aurel32.net
On 2017-05-22 20:02, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <r...@twiddle.net>
> ---
> target/s390x/mem_helper.c | 7 ---
> target/s390x/translate.c | 1 -
> 2 files changed, 4 insertions(+), 4 deletions(-)
Reviewed-by: Aurelien Jarno
On 2017-05-22 20:02, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <r...@twiddle.net>
> ---
> target/s390x/mem_helper.c | 7 ---
> target/s390x/translate.c | 1 -
> 2 files changed, 4 insertions(+), 4 deletions(-)
Reviewed-by: Aurelien Jarno
On 2017-05-22 20:02, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <r...@twiddle.net>
> ---
> target/s390x/mem_helper.c | 5 +++--
> target/s390x/translate.c | 1 -
> 2 files changed, 3 insertions(+), 3 deletions(-)
Reviewed-by: Aurelien Jarno <aurel...@au
On 2017-05-22 20:02, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <r...@twiddle.net>
> ---
> target/s390x/mem_helper.c | 3 ++-
> target/s390x/translate.c | 1 -
> 2 files changed, 2 insertions(+), 2 deletions(-)
Reviewed-by: Aurelien Jarno <aurel...@au
On 2017-05-22 20:02, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <r...@twiddle.net>
> ---
> target/s390x/mem_helper.c | 18 +-
> target/s390x/translate.c | 1 -
> 2 files changed, 9 insertions(+), 10 deletions(-)
Reviewed-by: Aurelien Jarno
On 2017-05-22 20:02, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <r...@twiddle.net>
> ---
> target/s390x/mem_helper.c | 11 ++-
> target/s390x/translate.c | 1 -
> 2 files changed, 6 insertions(+), 6 deletions(-)
Reviewed-by: Aurelien Jarno
On 2017-05-22 20:02, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <r...@twiddle.net>
> ---
> target/s390x/mem_helper.c | 3 ++-
> target/s390x/translate.c | 1 -
> 2 files changed, 2 insertions(+), 2 deletions(-)
Reviewed-by: Aurelien Jarno <aurel...@au
On 2017-05-22 20:02, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <r...@twiddle.net>
> ---
> target/s390x/mem_helper.c | 18 +-
> target/s390x/translate.c | 1 -
> 2 files changed, 9 insertions(+), 10 deletions(-)
Reviewed-by: Aurelien Jarno
On 2017-05-22 20:02, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <r...@twiddle.net>
> ---
> target/s390x/mem_helper.c | 18 +-
> target/s390x/translate.c | 1 -
> 2 files changed, 9 insertions(+), 10 deletions(-)
Reviewed-by: Aurelien Jarno
2 files changed, 12 insertions(+), 14 deletions(-)
Reviewed-by: Aurelien Jarno <aurel...@aurel32.net>
--
Aurelien Jarno GPG: 4096R/1DDD8C9B
aurel...@aurel32.net http://www.aurel32.net
On 2017-05-22 20:02, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <r...@twiddle.net>
> ---
> target/s390x/mem_helper.c | 19 ++-
> target/s390x/translate.c | 1 -
> 2 files changed, 10 insertions(+), 10 deletions(-)
Reviewed-by: Aurelien Ja
deletions(-)
This looks good on the principle, and finally removes a big hack. That
said it prevent my test system to boot. I haven't investigated why yet.
--
Aurelien Jarno GPG: 4096R/1DDD8C9B
aurel...@aurel32.net http://www.aurel32.net
changed, 9 insertions(+), 10 deletions(-)
Reviewed-by: Aurelien Jarno <aurel...@aurel32.net>
--
Aurelien Jarno GPG: 4096R/1DDD8C9B
aurel...@aurel32.net http://www.aurel32.net
On 2017-05-22 20:02, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <r...@twiddle.net>
> ---
> target/s390x/mem_helper.c | 10 ++
> 1 file changed, 2 insertions(+), 8 deletions(-)
>
Reviewed-by: Aurelien Jarno <aurel...@aurel32.
t;reboot: Restarting system\nUnauthorized
> access" and then hangs eating 100% cpu, but maybe I can fix that with
> kernel configuration changes.
I guess you mean rebooting the linux instance. This is because you do
not use a bootloader to load the kernel and the initrd. Then you might
be interested in:
http://lists.nongnu.org/archive/html/qemu-devel/2017-05/msg03881.html
Aurelien
--
Aurelien Jarno GPG: 4096R/1DDD8C9B
aurel...@aurel32.net http://www.aurel32.net
On 2017-05-18 17:37, Rob Landley wrote:
>
>
> On 05/18/2017 02:00 PM, Aurelien Jarno wrote:
> > On 2017-05-18 11:08, Rob Landley wrote:
> >> Serial input hangs after the first character in the 4.11 kernel:
> >>
> >> http://www.spinics.net/list
fter 1.5 frames (so the exact
timing depends on the actual baud rate), and that also triggers an
interrupt if the RIE bit is set to 1. I haven't checked yet if the
kernel relies on the bit or the interrupt or both.
Aurelien
--
Aurelien Jarno GPG: 4096R/1DDD8C9B
aurel...@aurel32.net http://www.aurel32.net
d on the baud rate which
we don't really emulate.
I'll try to have a look, that said my test environment is stuck with
kernel 4.8 due to the broken futex support on UP in kernel 4.9 (and
that's not QEMU specific). I'll try to build a more recent kernel with
additional patches.
Aure
On 2017-05-18 08:42, Richard Henderson wrote:
> On 05/18/2017 06:20 AM, Aurelien Jarno wrote:
> > > +DEF_HELPER_FLAGS_2(testblock, TCG_CALL_NO_WG, i32, env, i64)
> > As the helper does not read any values from the global, you can even use
> > TCG_CALL_NO_RWG.
> >
>
> target/s390x/mmu_helper.c | 2 +-
> target/s390x/translate.c | 11 +++
> 6 files changed, 44 insertions(+), 1 deletion(-)
>
Reviewed-by: Aurelien Jarno <aurel...@aurel32.net>
--
Aurelien Jarno GPG: 4096R/1DDD8C9B
aurel...@aurel32.net http://www.aurel32.net
ccurs, the condition code and the con-
> tents of bit positions 32-63 of general register 0 are
> unpredictable in the 24-bit or 31-bit addressing
> mode, or the condition code and bits 0-63 of the reg-
> ister are unpredictable in the 64-bit addressing mode."
>
> So setting CC=1 seems a valid behavior here ;-)
Actually program_interrupt will never return, so CC is left unchanged in
case of an exception. It's also matches the unpredictable value
described in the PoP ;-).
--
Aurelien Jarno GPG: 4096R/1DDD8C9B
aurel...@aurel32.net http://www.aurel32.net
ntext *s, DisasOps *o)
> }
>
> #ifndef CONFIG_USER_ONLY
> +
> +static ExitStatus op_testblock(DisasContext *s, DisasOps *o)
> +{
> +check_privileged(s);
You should also call potential_page_fault as the helper can trigger an
exception.
> +gen_helper_testblock(c
ve reproduced it locally with qemu/NetBSD-7.99.71 ver. 2.9 git HEAD
> (rev. cdece0467c7cf8e3).
>
> 464 const char *
> 465 pcib_isa_intr_string(void *v, int irq, char *buf, size_t len)
> 466 {
> 467 if (irq == 0 || irq >= ICU_LEN || irq == 2)
> 468 panic("%s: bogus isa irq 0x%x", __func__, irq);
> 469
> 470 snprintf(buf, len, "isa irq %d", irq);
> 471 return buf;
> 472 }
>
> Generates: "panic: pcib_isa_intr_string: bogus isa irq 0x0".
I haven't look in details, but it looks like that the PCI initialization
hasn't been done. This should be the responsibility of the firmware, but
the Malta emulation doesn't use any firmware when booting with -kernel. It
works with the Linux kernel because there is some fixup code which does
the work if it hasn't been done in the firmware. See:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/mips/pci/fixup-malta.c
One option would be to implement the same on the NetBSD side. The other
option is to use YAMON or U-Boot to load the NetBSD kernel.
Aurelien
--
Aurelien Jarno GPG: 4096R/1DDD8C9B
aurel...@aurel32.net http://www.aurel32.net
signature.asc
Description: PGP signature
ity 2 is installed in the
> z/Architecture architectural mode."
No that is different. IBM has chosen very confusing names for the DAT
related facilities:
- DAT-Enhancement Facility 1 => bits 3, 4 & 5
- DAT-Enhancement Facility 2
- Enhanced-DAT Facility 1=> bit 8
- Enhanced-DAT Facility 2=> bit 78
Aurelien
--
Aurelien Jarno GPG: 4096R/1DDD8C9B
aurel...@aurel32.net http://www.aurel32.net
odel = g_malloc0(sizeof(*cpu->model));
> -/* TCG emulates a z900 */
> -cpu->model->def = _cpu_defs[0];
> +/* TCG emulates a z900 (with some additional features) */
> +memcpy(_qemu_cpu_defs, _cpu_defs[0],
> sizeof(s390_qemu_cpu_defs));
> +add_qemu_cpu_model_features(s390_qe
Instead of byteswapping individual 16-bit words one by one, work on the
whole register at the same time using shifts and mask. This is the same
strategy than the aarch32 version of rev16 and is much more efficient
in the case sf=1.
Signed-off-by: Aurelien Jarno <aurel...@aurel32.net>
---
Use the same mask to avoid having to load two different constants, as
suggested by Richard Henderson.
Signed-off-by: Aurelien Jarno <aurel...@aurel32.net>
---
target/arm/translate.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/target/arm/translate.c b/targ
Use the same mask to avoid having to load two different constants, as
suggest by Richard Henderson. Also use one less temp.
Signed-off-by: Aurelien Jarno <aurel...@aurel32.net>
---
target/cris/translate.c | 15 +++
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/
mized even
more. Richard Henderson then suggested an even more optimized version.
Aurelien Jarno (4):
target/arm: optimize aarch32 rev16
target/arm: simplify and optimize aarch64 rev16
target/cris: optimize swap
target/mips: optimize WSBH, DSBH and DSHD
target/arm/translate-
Use the same mask to avoid having to load two different constants, as
suggested by Richard Henderson.
Signed-off-by: Aurelien Jarno <aurel...@aurel32.net>
---
target/mips/translate.c | 18 --
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/target/mips/transla
This will make easier the introduction of a new flag in the next
patches.
Signed-off-by: Aurelien Jarno <aurel...@aurel32.net>
---
target/sh4/cpu.h | 3 ++-
target/sh4/helper.c| 4 ++--
target/sh4/translate.c | 17 -
3 files changed, 12 insertions(+), 12 del
This patch series fix two issues with the SH4 system emulation:
- reboot does not work when using -kernel and -initrd
- the RTE instruction is not correctly emulated in some very rare
cases, causing userland processes to receive a segmentation fault.
Aurelien Jarno (5):
target/sh4: log
slot instruction is always fetched in privileged mode. It is therefore
enough to to check for this flag in cpu_mmu_index.
Signed-off-by: Aurelien Jarno <aurel...@aurel32.net>
---
target/sh4/cpu.h | 13 ++---
target/sh4/translate.c | 8 ++--
2 files changed, 16 insertions
Delay slots are indivisible, therefore avoid scheduling an interrupt in
the delay slot. However exceptions are possible.
Signed-off-by: Aurelien Jarno <aurel...@aurel32.net>
---
target/sh4/helper.c | 12 ++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/targ
(and there is no guarantee the kernel and initrd
haven't been overwritten).
Therefore call qemu_system_reset_request to reload the kernel and initrd
and load the program counter to the kernel entry point.
Signed-off-by: Aurelien Jarno <aurel...@aurel32.net>
---
target/sh4/helper.c | 10 +-
qemu_log_mask() is preferred over fprintf() for logging errors.
Signed-off-by: Aurelien Jarno <aurel...@aurel32.net>
---
target/sh4/helper.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/sh4/helper.c b/target/sh4/helper.c
index 8f8ce81401..4c024f9529
_PAGE_SIZE; i += 8) {
> +stq_phys(cs->as, addr + i, 0);
> +}
> +env->cc_op = 0;
> +}
> +
From what I understand the resulting condition code should depends if
the block is usable or not. Shouldn't there be a check to see if the
address actually targets the RAM?
--
Aurelien Jarno GPG: 4096R/1DDD8C9B
aurel...@aurel32.net http://www.aurel32.net
address 0xb800. This
address corresponds to kseg1 (Kernel Unmapped Uncached) and is mapped
to the physical address 0x1800. See the MIPS32 Privileged Resource
Architecture Manual for more details how the virtual to physical mapping
works.
Aurelien
--
Aurelien Jarno
dé <f4...@amsat.org>
Reviewed-by: Richard Henderson <r...@twiddle.net>
Signed-off-by: Aurelien Jarno <aurel...@aurel32.net>
---
target/sh4/cpu.h | 3 +--
target/sh4/helper.c| 2 --
target/sh4/translate.c | 17 +
3 files changed, 6 insertions(+), 16 deletions(-)
This doesn't change the generated code on x86, but optimizes it on most
RISC architectures and makes the code simpler to read.
Reviewed-by: Philippe Mathieu-Daudé <f4...@amsat.org>
Reviewed-by: Richard Henderson <r...@twiddle.net>
Signed-off-by: Aurelien Jarno <aurel...@aurel32.n
Using extr and avoiding intermediate temps.
Reviewed-by: Philippe Mathieu-Daudé <f4...@amsat.org>
Reviewed-by: Richard Henderson <r...@twiddle.net>
Signed-off-by: Aurelien Jarno <aurel...@aurel32.net>
---
target/sh4/translate.c | 8 +---
1 file changed, 1 insertion(+), 7
synco is a SH4-A only instruction.
Reviewed-by: Philippe Mathieu-Daudé <f4...@amsat.org>
Reviewed-by: Richard Henderson <r...@twiddle.net>
Signed-off-by: Aurelien Jarno <aurel...@aurel32.net>
---
target/sh4/translate.c | 9 +
1 file changed, 5 insertions(+), 4 deleti
nc
with env->flags using TCG instructions. ctx->envflags now only contains
the part that of env->flags that is contained in the TB state, i.e. the
DELAY_SLOT* flags.
Reviewed-by: Philippe Mathieu-Daudé <f4...@amsat.org>
Reviewed-by: Richard Henderson <r...@twiddle.net>
Signed
ed-off-by: Aurelien Jarno <aurel...@aurel32.net>
---
target/sh4/translate.c | 69 --
1 file changed, 33 insertions(+), 36 deletions(-)
diff --git a/target/sh4/translate.c b/target/sh4/translate.c
index f608e314b6..8cee7d333f 100644
--- a/target/sh4
;
Signed-off-by: Aurelien Jarno <aurel...@aurel32.net>
---
target/sh4/cpu.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/target/sh4/cpu.h b/target/sh4/cpu.h
index 9445cc779f..da8d15f1b9 100644
--- a/target/sh4/cpu.h
+++ b/target/sh4/cpu.h
@@ -382,8 +382,7 @@
order to be
able to discard the global before the brcond.
Reviewed-by: Richard Henderson <r...@twiddle.net>
Signed-off-by: Aurelien Jarno <aurel...@aurel32.net>
---
target/sh4/cpu.h | 10 ++
target/sh4/helper.c| 2 +-
target/sh4/translate.c | 22 +
In case of exception, there is no need to call tcg_gen_exit_tb as the
exception helper won't return.
Also fix a few cases where BS_BRANCH is called instead of BS_EXCP.
Reviewed-by: Philippe Mathieu-Daudé <f4...@amsat.org>
Reviewed-by: Richard Henderson <r...@twiddle.net>
Signed-off-
When stopping the translation because the state has changed, goto_tb
should not be used as it might link TB with different flags.
Reviewed-by: Richard Henderson <r...@twiddle.net>
Reviewed-by: Philippe Mathieu-Daudé <f4...@amsat.org>
Signed-off-by: Aurelien Jarno <aurel
SH4 requires that memory accesses are naturally aligned, except for the
SH4-A movua.l instructions which can do unaligned loads.
Reviewed-by: Philippe Mathieu-Daudé <f4...@amsat.org>
Reviewed-by: Richard Henderson <r...@twiddle.net>
Signed-off-by: Aurelien Jarno <aurel...@aurel32.n
Use cpu_loop_exit_restore when using cpu_restore_state and cpu_loop_exit
together.
Reviewed-by: Richard Henderson <r...@twiddle.net>
Signed-off-by: Aurelien Jarno <aurel...@aurel32.net>
---
target/sh4/op_helper.c | 10 ++
1 file changed, 2 insertions(+), 8 deletions(-)
At the same time change the comment describing the instruction the same
way than other instruction, so that the code is easier to read and search.
Reviewed-by: Philippe Mathieu-Daudé <f4...@amsat.org>
Reviewed-by: Richard Henderson <r...@twiddle.net>
Signed-off-by: Aurelien
Reviewed-by: Richard Henderson <r...@twiddle.net>
Reviewed-by: Philippe Mathieu-Daudé <f4...@amsat.org>
Signed-off-by: Aurelien Jarno <aurel...@aurel32.net>
---
target/sh4/translate.c | 9 +++--
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/target/sh4/transl
We only emulate UP SH4, however as the tas.b instruction is used in the GNU
libc, this improve linux-user emulation.
Reviewed-by: Richard Henderson <r...@twiddle.net>
Signed-off-by: Aurelien Jarno <aurel...@aurel32.net>
---
target/sh4/translate.c | 19 +++
1 fil
to 57e2d417d3108a6e28e705f4a9d6ff22ab79af16:
target/sh4: use cpu_loop_exit_restore (2017-05-13 11:18:27 +0200)
Queued target/sh4 patches
Aurelien Jarno (15):
target/sh4
On 2017-05-12 12:05, Richard Henderson wrote:
> On 05/12/2017 11:21 AM, Aurelien Jarno wrote:
> > +uint64_t mask1 = sf ? 0x00ff00ff00ff00ffull : 0x00ff00ff;
> > +uint64_t mask2 = sf ? 0xff00ff00ff00ff00ull : 0xff00ff00;
> > +
> > +tcg_gen_
9f7aeb93e7: mov$0xff00ff00ff00ff,%r13
0x559f7aeb93f1: and%r13,%r12
0x559f7aeb93f4: shl$0x8,%rbx
0x559f7aeb93f8: mov$0xff00ff00ff00ff00,%r13
0x559f7aeb9402: and%r13,%rbx
0x559f7aeb9405: or %r12,%rbx
Aurelien
--
Aurelien Jarno
nc
with env->flags using TCG instructions. ctx->envflags now only contains
the part that of env->flags that is contained in the TB state, i.e. the
DELAY_SLOT* flags.
Reviewed-by: Philippe Mathieu-Daudé <f4...@amsat.org>
Reviewed-by: Richard Henderson <r...@twiddle.net>
Signed
ed-off-by: Aurelien Jarno <aurel...@aurel32.net>
---
target/sh4/translate.c | 69 --
1 file changed, 33 insertions(+), 36 deletions(-)
diff --git a/target/sh4/translate.c b/target/sh4/translate.c
index f608e314b6..8cee7d333f 100644
--- a/target/sh4
Reviewed-by: Richard Henderson <r...@twiddle.net>
Signed-off-by: Aurelien Jarno <aurel...@aurel32.net>
---
target/sh4/translate.c | 9 +++--
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/target/sh4/translate.c b/target/sh4/translate.c
index 8cee7d333f..a4c7a
SH4 requires that memory accesses are naturally aligned, except for the
SH4-A movua.l instructions which can do unaligned loads.
Reviewed-by: Philippe Mathieu-Daudé <f4...@amsat.org>
Signed-off-by: Aurelien Jarno <aurel...@aurel32.net>
---
target/sh4/cpu.c | 1 +
targ
order to be
able to discard the global before the brcond.
Reviewed-by: Richard Henderson <r...@twiddle.net>
Signed-off-by: Aurelien Jarno <aurel...@aurel32.net>
---
target/sh4/cpu.h | 10 ++
target/sh4/helper.c| 2 +-
target/sh4/translate.c | 22 +
Using extr and avoiding intermediate temps.
Signed-off-by: Aurelien Jarno <aurel...@aurel32.net>
---
target/sh4/translate.c | 8 +---
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/target/sh4/translate.c b/target/sh4/translate.c
index a4c7a0895b..fe8bff54a6 100644
--- a/
301 - 400 of 4024 matches
Mail list logo