Code: Select all
processTile_n(chanend c1, chanend c2)
{ int dest1, dest2;
asm("getd %0,res[%1]" : "=r" (dest1) : "r" (c1));
asm("getd %0,res[%1]" : "=r" (dest2) : "r" (c2));
asm("setd res[%0],%1" :: "r" (c1), "r" (dest2));
asm("setd res[%0],%1" :: "r" (c2), "r" (dest1));
}
Code: Select all
processTile_0(chanend c1){ //can NOT refer the destination of c2, right?}
processTile_1(chanend c1){ //can NOT refer the destination of c2, right?}
processTile_2(chanend c2){ //can NOT refer the destination of c1, right?}
processTile_3(chanend c2){ //can NOT refer the destination of c1, right? }