Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux
[linux-2.6-block.git] / arch / powerpc / include / asm / ppc-opcode.h
index 4436887bc415baf3e69d6f284b14a82ca3a07648..665af14850e4249c01153c200a85eff609f1a09d 100644 (file)
@@ -12,8 +12,7 @@
 #ifndef _ASM_POWERPC_PPC_OPCODE_H
 #define _ASM_POWERPC_PPC_OPCODE_H
 
-#include <linux/stringify.h>
-#include <asm/asm-compat.h>
+#include <asm/asm-const.h>
 
 #define        __REG_R0        0
 #define        __REG_R1        1
 #define PPC_INST_STFDX                 0x7c0005ae
 #define PPC_INST_LVX                   0x7c0000ce
 #define PPC_INST_STVX                  0x7c0001ce
+#define PPC_INST_VCMPEQUD              0x100000c7
+#define PPC_INST_VCMPEQUB              0x10000006
 
 /* macros to insert fields into opcodes */
 #define ___PPC_RA(a)   (((a) & 0x1f) << 16)
 #define __PPC_BI(s)    (((s) & 0x1f) << 16)
 #define __PPC_CT(t)    (((t) & 0x0f) << 21)
 #define __PPC_SPR(r)   ((((r) & 0x1f) << 16) | ((((r) >> 5) & 0x1f) << 11))
+#define __PPC_RC21     (0x1 << 10)
 
 /*
  * Only use the larx hint bit on 64bit CPUs. e500v1/v2 based CPUs will treat a
                                       ((IH & 0x7) << 21))
 #define PPC_INVALIDATE_ERAT    PPC_SLBIA(7)
 
+#define VCMPEQUD_RC(vrt, vra, vrb)     stringify_in_c(.long PPC_INST_VCMPEQUD | \
+                             ___PPC_RT(vrt) | ___PPC_RA(vra) | \
+                             ___PPC_RB(vrb) | __PPC_RC21)
+
+#define VCMPEQUB_RC(vrt, vra, vrb)     stringify_in_c(.long PPC_INST_VCMPEQUB | \
+                             ___PPC_RT(vrt) | ___PPC_RA(vra) | \
+                             ___PPC_RB(vrb) | __PPC_RC21)
+
 #endif /* _ASM_POWERPC_PPC_OPCODE_H */