qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v4 2/3] target/s390x: exception on non-aligned L


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH v4 2/3] target/s390x: exception on non-aligned LPSW(E)
Date: Wed, 22 Aug 2018 08:34:27 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

On 08/22/2018 07:40 AM, Pavel Zbitskiy wrote:
> @@ -2828,9 +2828,13 @@ static DisasJumpType op_lpp(DisasContext *s, DisasOps 
> *o)
>  
>  static DisasJumpType op_lpsw(DisasContext *s, DisasOps *o)
>  {
> +    TCGv_i32 t0;
>      TCGv_i64 t1, t2;
>  
>      check_privileged(s);
> +    t0 = tcg_const_i32(8);
> +    gen_helper_check_alignment(cpu_env, o->in2, t0);
> +    tcg_temp_free_i32(t0);
>      per_breaking_event(s);

This can be done without an external call.

-    tcg_gen_qemu_ld32u(t1, o->in2, get_mem_index(s));
+    tcg_gen_qemu_ld_i64(t1, o->in2, get_mem_index(s),
+                        MO_TEUL | MO_ALIGN_8);

(Which, for annoying reasons, will only have effect in
system mode, but that's true of many other alignment
checks as well.)


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]