[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v1 02/14] target-ppc: Add xxinsertw instruction
From: |
David Gibson |
Subject: |
Re: [Qemu-devel] [PATCH v1 02/14] target-ppc: Add xxinsertw instruction |
Date: |
Sat, 7 Jan 2017 12:02:49 +1100 |
User-agent: |
Mutt/1.7.1 (2016-10-04) |
On Fri, Jan 06, 2017 at 01:58:19PM +0530, Nikunj A Dadhania wrote:
> David Gibson <address@hidden> writes:
>
> > [ Unknown signature status ]
> > On Fri, Jan 06, 2017 at 11:44:44AM +0530, Nikunj A Dadhania wrote:
> >> xxinsertw: VSX Vector Insert Word
> >>
> >> Signed-off-by: Nikunj A Dadhania <address@hidden>
> >
> > The comments I had about out of bounds shifts don't seem to have been
> > addressed here.
>
> Bounds are addressed inside the for condition:
>
> #if defined(HOST_WORDS_BIGENDIAN)
> ins_index = index;
> for (i = 0; i < es && ins_index < 16; i++, ins_index++) {
> ^^^^^^^^^^^^^^
> xt.u8[ins_index] = xb.u8[8 - es + i];
> }
> #else
> ins_index = 15 - index;
> for (i = es - 1; i >= 0 && ins_index >= 0; i--, ins_index--) {
> ^^^^^^^^^^^^^^
> xt.u8[ins_index] = xb.u8[8 + i];
> }
> #endif
>
> That way ins_index will be within 0 - 15. Let me know if I have missed
> something.
Oh, yes, I missed that. Sorry.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
signature.asc
Description: PGP signature
- [Qemu-devel] [PATCH v1 00/14] POWER9 TCG enablements - part10, Nikunj A Dadhania, 2017/01/06
- [Qemu-devel] [PATCH v1 03/14] target-ppc: Use float64 arg in helper_compute_fprf(), Nikunj A Dadhania, 2017/01/06
- [Qemu-devel] [PATCH v1 04/14] target-ppc: Replace isden by float64_is_zero_or_denormal, Nikunj A Dadhania, 2017/01/06
- [Qemu-devel] [PATCH v1 05/14] target-ppc: Rename helper_compute_fprf to helper_compute_fprf_float64, Nikunj A Dadhania, 2017/01/06
- [Qemu-devel] [PATCH v1 06/14] target-ppc: Add xsaddqp instructions, Nikunj A Dadhania, 2017/01/06
- [Qemu-devel] [PATCH v1 07/14] target-ppc: Add xscvdphp, xscvhpdp, Nikunj A Dadhania, 2017/01/06
- [Qemu-devel] [PATCH v1 08/14] target-ppc: Use correct precision for FPRF setting, Nikunj A Dadhania, 2017/01/06
- [Qemu-devel] [PATCH v1 09/14] target-ppc: Add xscvdpqp instruction, Nikunj A Dadhania, 2017/01/06
- [Qemu-devel] [PATCH v1 10/14] target-ppc: Add xscvqpdp instruction, Nikunj A Dadhania, 2017/01/06
- [Qemu-devel] [PATCH v1 11/14] target-ppc: Add xsxexpdp instruction, Nikunj A Dadhania, 2017/01/06