[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 4/5] target/s390x: Fix shifting 32-bit values for more tha
From: |
David Hildenbrand |
Subject: |
Re: [PATCH v3 4/5] target/s390x: Fix shifting 32-bit values for more than 31 bits |
Date: |
Wed, 12 Jan 2022 16:56:01 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.4.0 |
> static DisasJumpType help_goto_direct(DisasContext *s, uint64_t dest)
> {
> if (dest == s->pc_tmp) {
> @@ -4113,9 +4099,15 @@ static DisasJumpType op_soc(DisasContext *s, DisasOps
> *o)
>
> static DisasJumpType op_sla(DisasContext *s, DisasOps *o)
> {
> + TCGv_i64 t;
> uint64_t sign = 1ull << s->insn->data;
> - enum cc_op cco = s->insn->data == 31 ? CC_OP_SLA_32 : CC_OP_SLA_64;
> - gen_op_update2_cc_i64(s, cco, o->in1, o->in2);
> + if (s->insn->data == 31) {
> + t = tcg_temp_new_i64();
> + tcg_gen_shli_i64(t, o->in1, 32);
> + } else {
> + t = o->in1;
> + }
Are you missing to free the temp in case you allocated one?
--
Thanks,
David / dhildenb
- [PATCH v3 0/5] target/s390x: Fix shift instructions, Ilya Leoshkevich, 2022/01/12
- [PATCH v3 3/5] target/s390x: Fix cc_calc_sla_64() missing overflows, Ilya Leoshkevich, 2022/01/12
- [PATCH v3 4/5] target/s390x: Fix shifting 32-bit values for more than 31 bits, Ilya Leoshkevich, 2022/01/12
- Re: [PATCH v3 4/5] target/s390x: Fix shifting 32-bit values for more than 31 bits,
David Hildenbrand <=
- [PATCH v3 2/5] target/s390x: Fix SRDA CC calculation, Ilya Leoshkevich, 2022/01/12
- [PATCH v3 1/5] target/s390x: Fix SLDA sign bit index, Ilya Leoshkevich, 2022/01/12
- [PATCH v3 5/5] tests/tcg/s390x: Test shift instructions, Ilya Leoshkevich, 2022/01/12