OSDN Git Service

cell: use different opcodes for spe_move() depending on even/odd address
authorBrian Paul <brian.paul@tungstengraphics.com>
Fri, 19 Sep 2008 23:55:54 +0000 (17:55 -0600)
committerBrian Paul <brian.paul@tungstengraphics.com>
Fri, 19 Sep 2008 23:56:45 +0000 (17:56 -0600)
src/gallium/auxiliary/rtasm/rtasm_ppc_spe.c

index 1c3e21b..491141f 100644 (file)
@@ -639,7 +639,13 @@ spe_complement(struct spe_function *p, unsigned rT, unsigned rA)
 void
 spe_move(struct spe_function *p, unsigned rT, unsigned rA)
 {
-   spe_ori(p, rT, rA, 0);
+   /* Use different instructions depending on the instruction address
+    * to take advantage of the dual pipelines.
+    */
+   if (p->num_inst & 1)
+      spe_shlqbyi(p, rT, rA, 0);  /* odd pipe */
+   else
+      spe_ori(p, rT, rA, 0);  /* even pipe */
 }