Mercurial > hg > Game > Cerium
changeset 462:ca987c0beb11 draft
show pc in get_segement.
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 29 Sep 2009 15:02:32 +0900 |
parents | 009a2db963de |
children | 60f44d3ea452 |
files | example/get_segment/spe/Hello.cc example/get_segment/spe/Hello1.cc example/get_segment/spe/spe-main.cc |
diffstat | 3 files changed, 10 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/example/get_segment/spe/Hello.cc Tue Sep 29 13:01:22 2009 +0900 +++ b/example/get_segment/spe/Hello.cc Tue Sep 29 15:02:32 2009 +0900 @@ -10,8 +10,11 @@ { int task_id = get_param(0); + unsigned int pc; + __asm__ __volatile__("ai %0,$0,0 ### here" : "=r" (pc)); + fprintf(stderr,"[%d] Hello, World!! Seg1 \n", task_id); - fprintf(stderr,"0x%0x\n", (unsigned int)&createTask_Hello); + fprintf(stderr,"pc=0x%0x 0x%0x\n",pc, (unsigned int)&createTask_Hello); return 0; }
--- a/example/get_segment/spe/Hello1.cc Tue Sep 29 13:01:22 2009 +0900 +++ b/example/get_segment/spe/Hello1.cc Tue Sep 29 15:02:32 2009 +0900 @@ -10,8 +10,12 @@ { int task_id = get_param(0); + unsigned int pc; + __asm__ __volatile__("ai %0,$0,0 ### here" : "=r" (pc)); + + fprintf(stderr,"[%d] Hello, World Seg 2!!\n", task_id); - fprintf(stderr,"0x%0x\n", (unsigned int)&createTask_Hello1); + fprintf(stderr,"pc=0x%0x 0x%0x\n",pc, (unsigned int)&createTask_Hello1); return 0; }
--- a/example/get_segment/spe/spe-main.cc Tue Sep 29 13:01:22 2009 +0900 +++ b/example/get_segment/spe/spe-main.cc Tue Sep 29 15:02:32 2009 +0900 @@ -17,7 +17,7 @@ { SchedRegisterDynamicTask(HELLO_TASK, Hello, 0); SchedRegisterDynamicTask(HELLO_TASK1, Hello1, 1); - createTask_Hello(scheduler); + // createTask_Hello(scheduler); scheduler->allocate_code_segment(1024,4); print_ovly_table(); }