[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 1/3] s390x/tcg: Implement Miscellaneous-Instruction-Extens
From: |
David Hildenbrand |
Subject: |
Re: [PATCH v3 1/3] s390x/tcg: Implement Miscellaneous-Instruction-Extensions Facility 3 for the s390x |
Date: |
Wed, 16 Feb 2022 11:59:25 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.4.0 |
On 16.02.22 11:31, David Hildenbrand wrote:
>> +static DisasJumpType op_sel(DisasContext *s, DisasOps *o)
>> +{
>> + DisasCompare c;
>> + disas_jcc(s, &c, get_field(s, m4));
>> + tcg_gen_movcond_i64(c.cond, o->out, c.u.s64.a, c.u.s64.b,
>> + o->in1, o->in2);
>> + free_compare(&c);
>> + return DISAS_NEXT;
>> +}
>
>
> I realize that SELECT really is mostly identical to LOAD ON CONDITION,
> except that we have a second input.
>
> The following on top would unify both
>
>
> diff --git a/target/s390x/tcg/insn-data.def b/target/s390x/tcg/insn-data.def
> index fb482b08b7..493f1d669c 100644
> --- a/target/s390x/tcg/insn-data.def
> +++ b/target/s390x/tcg/insn-data.def
> @@ -781,8 +781,8 @@
> /* SEARCH STRING UNICODE */
> C(0xb9be, SRSTU, RRE, ETF3, 0, 0, 0, 0, srstu, 0)
> /* SELECT */
> - C(0xb9f0, SELR, RRF_a, MIE3, r2, r3, new, r1_32, sel, 0)
> - C(0xb9e3, SELGR, RRF_a, MIE3, r2, r3, r1, 0, sel, 0)
> + C(0xb9f0, SELR, RRF_a, MIE3, r3, r2, new, r1_32, loc, 0)
> + C(0xb9e3, SELGR, RRF_a, MIE3, r3, r2, r1, 0, loc, 0)
I forgot SELECT HIGH, requires similar adjustment.
--
Thanks,
David / dhildenb