Mercurial > hg > Members > kono > Cerium
diff example/get_segment/spe/Hello.cc @ 626:ab866bc8a624
64bit mode compatibility on Cell
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 16 Nov 2009 11:37:26 +0900 |
parents | 7777761e8e02 |
children | cc06efc75ad9 |
line wrap: on
line diff
--- a/example/get_segment/spe/Hello.cc Mon Nov 16 10:59:55 2009 +0900 +++ b/example/get_segment/spe/Hello.cc Mon Nov 16 11:37:26 2009 +0900 @@ -22,7 +22,7 @@ static int run(SchedTask *smanager, void *rbuf, void *wbuf) { - int task_id = smanager->get_param(0); + int task_id = (long)smanager->get_param(0); unsigned int pc; __asm__ __volatile__( @@ -36,7 +36,7 @@ smanager->fprintf(smanager->stderr_,fmt+offset, fmt, offset); smanager->fprintf(smanager->stderr_,"[%d] Hello, World!! Seg1 \n"+offset, task_id); - smanager->fprintf(smanager->stderr_,"pc=0x%0x 0x%0x\n"+offset,pc, (unsigned int)&runTask_Hello); + smanager->fprintf(smanager->stderr_,"pc=0x%0x 0x%0lx\n"+offset,pc, (unsigned long)&runTask_Hello); return 0; }