[PATCH 2/2] powerpc: Move VSX load/stores into ppc-opcode.h

Kumar Gala galak at kernel.crashing.org
Wed Apr 29 22:38:41 EST 2009


On Apr 29, 2009, at 2:20 AM, Michael Neuling wrote:

> Index: linux-2.6-ozlabs/arch/powerpc/include/asm/ppc-opcode.h
> ===================================================================
> --- linux-2.6-ozlabs.orig/arch/powerpc/include/asm/ppc-opcode.h
> +++ linux-2.6-ozlabs/arch/powerpc/include/asm/ppc-opcode.h
> @@ -49,6 +49,7 @@
> /* macros to insert fields into opcodes */
> #define __PPC_RA(a)	(((a) & 0x1f) << 16)
> #define __PPC_RB(b)	(((b) & 0x1f) << 11)
> +#define __PPC_XS(s)	((((s) & 0x1f) << 21) | (((s) & 0x20) >> 5))
> #define __PPC_T_TLB(t)	(((t) & 0x3) << 21)
> #define __PPC_WC(w)	(((w) & 0x3) << 21)
>
> @@ -70,4 +71,12 @@
> #define PPC_WAIT(w)		stringify_in_c(.long PPC_INST_WAIT | \
> 					__PPC_WC(w))
>
> +/*
> + * Define what the VSX XX1 form instructions will look like, then add
> + * the 128 bit load store instructions based on that.
> + */
> +#define VSX_XX1(s, a, b)	(__PPC_XS(s) | __PPC_RA(a) | __PPC_RB(b))
> +#define STXVD2X(s, a, b)	.long (0x7c000798 | VSX_XX1((s), (a), (b)))
> +#define LXVD2X(s, a, b)		.long (0x7c000698 | VSX_XX1((s), (a), (b)))
> +

previous gripe of matching style of file for the .long 0x7c000798

- k



More information about the Linuxppc-dev mailing list