comparison 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
comparison
equal deleted inserted replaced
625:60aa3f241b10 626:ab866bc8a624
20 20
21 21
22 static int 22 static int
23 run(SchedTask *smanager, void *rbuf, void *wbuf) 23 run(SchedTask *smanager, void *rbuf, void *wbuf)
24 { 24 {
25 int task_id = smanager->get_param(0); 25 int task_id = (long)smanager->get_param(0);
26 26
27 unsigned int pc; 27 unsigned int pc;
28 __asm__ __volatile__( 28 __asm__ __volatile__(
29 " brsl %0,____LLLL1\n" 29 " brsl %0,____LLLL1\n"
30 "____LLLL1:" 30 "____LLLL1:"
34 int offset = rel_offset(); 34 int offset = rel_offset();
35 35
36 smanager->fprintf(smanager->stderr_,fmt+offset, fmt, offset); 36 smanager->fprintf(smanager->stderr_,fmt+offset, fmt, offset);
37 37
38 smanager->fprintf(smanager->stderr_,"[%d] Hello, World!! Seg1 \n"+offset, task_id); 38 smanager->fprintf(smanager->stderr_,"[%d] Hello, World!! Seg1 \n"+offset, task_id);
39 smanager->fprintf(smanager->stderr_,"pc=0x%0x 0x%0x\n"+offset,pc, (unsigned int)&runTask_Hello); 39 smanager->fprintf(smanager->stderr_,"pc=0x%0x 0x%0lx\n"+offset,pc, (unsigned long)&runTask_Hello);
40 40
41 return 0; 41 return 0;
42 } 42 }