[PATCH, rs6000] power8 patches, patch #7, quad/byte/half-word atomic instructions
Michael Meissner
meissner@linux.vnet.ibm.com
Wed May 29 20:36:00 GMT 2013
On Wed, May 29, 2013 at 04:29:07PM -0400, David Edelsohn wrote:
> - if (mode == QImode || mode == HImode)
> + /* On power8, we want to use SImode for the operation. On previoius systems,
> + use the operation in a subword and shift/mask to get the proper byte or
> + halfword. */
> + if (TARGET_SYNC_HI_QI && (mode == QImode || mode == HImode))
> + {
> + val = convert_modes (SImode, mode, val, 1);
> +
> + /* Prepare to adjust the return value. */
> + before = gen_reg_rtx (SImode);
> + if (after)
> + after = gen_reg_rtx (SImode);
> + mode = SImode;
> + }
> + else if (mode == QImode || mode == HImode)
>
> Spelling: previoius.
Thanks.
> This logic is redundant. Why not
>
> if (mode == QImode || mode == HImode)
> {
> if (TARGET_SYNC_HI_QI)
> {
> new code
> }
> else
> {
> original code
> }
>
> The rest of this patch is okay.
I can do that. I think earlier versions did it that way.
--
Michael Meissner, IBM
IBM, M/S 2506R, 550 King Street, Littleton, MA 01460, USA
email: meissner@linux.vnet.ibm.com, phone: +1 (978) 899-4797
More information about the Gcc-patches
mailing list