[Cbe-oss-dev] [PATCH] libspe2: fix parameter passing

Kazunori Asayama asayama at sm.sony.co.jp
Wed Dec 6 21:43:20 EST 2006


Attached is a patch to fix the following problem in libspe2 2.0.1:

  - Parameters are not passed to SPEs correctly.

----
Index: libspe2/spebase/run.c
===================================================================
--- libspe2.orig/spebase/run.c
+++ libspe2/spebase/run.c
@@ -152,11 +152,11 @@ int _base_spe_context_run(spe_context_pt
 				gprs.reg.r3[0] = tid64.ui[0];
 				gprs.reg.r3[1] = tid64.ui[1];
 				
-				gprs.reg.r4[0] = argp64.ui[1];
-				gprs.reg.r4[1] = argp64.ui[0];
+				gprs.reg.r4[0] = argp64.ui[0];
+				gprs.reg.r4[1] = argp64.ui[1];
 				
-			 	gprs.reg.r5[0] = envp64.ui[1];
-				gprs.reg.r5[1] = envp64.ui[0];
+			 	gprs.reg.r5[0] = envp64.ui[0];
+				gprs.reg.r5[1] = envp64.ui[1];
 			}
 			if (set_regs(spe, gprs.array)) {
 				return -1;



More information about the cbe-oss-dev mailing list