# HG changeset patch # User Shinji KONO # Date 1258765594 -32400 # Node ID 0692b08f1cd69eb8da1c548516e9fb2a2b5f48b4 # Parent a909c50081c202fe7091d1fe76fb22531434d10d Regression on Mac OS X diff -r a909c50081c2 -r 0692b08f1cd6 Renderer/Engine/Makefile.def --- a/Renderer/Engine/Makefile.def Fri Nov 20 23:12:34 2009 +0900 +++ b/Renderer/Engine/Makefile.def Sat Nov 21 10:06:34 2009 +0900 @@ -2,9 +2,10 @@ CERIUM = ../.. -ABI = # -m64 +ABIBIT = 32 +ABI = -m$(ABIBIT) CC = g++ CFLAGS = -g -Wall $(ABI) # -O9 -DDEBUG INCLUDE = -I$(CERIUM)/include/TaskManager -I. -LIBS = -L$(CERIUM)/TaskManager $(ABI) +# LIBS = -L$(CERIUM)/TaskManager -m$(ABIBIT) diff -r a909c50081c2 -r 0692b08f1cd6 Renderer/Test/Makefile.def --- a/Renderer/Test/Makefile.def Fri Nov 20 23:12:34 2009 +0900 +++ b/Renderer/Test/Makefile.def Sat Nov 21 10:06:34 2009 +0900 @@ -1,7 +1,8 @@ CERIUM = ../.. -ABI = # -m64 +ABIBIT = 32 +ABI = -m$(ABIBIT) CC = g++ CFLAGS = -g -Wall $(ABI) # -O -DDEBUG diff -r a909c50081c2 -r 0692b08f1cd6 TaskManager/Makefile.cell --- a/TaskManager/Makefile.cell Fri Nov 20 23:12:34 2009 +0900 +++ b/TaskManager/Makefile.cell Sat Nov 21 10:06:34 2009 +0900 @@ -35,7 +35,7 @@ EXTRA_CFLAGS = -D__CERIUM_CELL__ -DHAS_POSIX_MEMALIGN -fno-strict-aliasing -SPE_CFLAGS = -g -DSIMPLE_TASK -D__CERIUM_CELL__ -fno-exceptions -fno-rtti -Wall # -O9 +SPE_CFLAGS = -g $(SIMPLE_TASK) -D__CERIUM_CELL__ -fno-exceptions -fno-rtti -Wall # -O9 all: default diff -r a909c50081c2 -r 0692b08f1cd6 TaskManager/Makefile.def --- a/TaskManager/Makefile.def Fri Nov 20 23:12:34 2009 +0900 +++ b/TaskManager/Makefile.def Sat Nov 21 10:06:34 2009 +0900 @@ -29,8 +29,11 @@ ABIBIT = 32 +# SIMPLE_TASK=-DSIMPLE_TASK +SIMPLE_TASK= + CC = g++ -CFLAGS = -DSIMPLE_TASK -Wall `sdl-config --cflags` -g -m$(ABIBIT) # -O9 +CFLAGS = $(SIMPLE_TASK) -Wall `sdl-config --cflags` -g -m$(ABIBIT) # -O9 LIBS = -m$(ABIBIT) INCLUDE = -I../include/TaskManager diff -r a909c50081c2 -r 0692b08f1cd6 TaskManager/kernel/ppe/HTask.h --- a/TaskManager/kernel/ppe/HTask.h Fri Nov 20 23:12:34 2009 +0900 +++ b/TaskManager/kernel/ppe/HTask.h Sat Nov 21 10:06:34 2009 +0900 @@ -22,9 +22,9 @@ Task の入出力は dma などで copy される。 */ #ifdef SIPMLE_TASK -class HTask : public Task { +class HTask : public SimpleTask { #else -class HTask : public SimpleTask { +class HTask : public Task { #endif public: BASE_NEW_DELETE(HTask); diff -r a909c50081c2 -r 0692b08f1cd6 TaskManager/kernel/ppe/HTaskInfo.cc --- a/TaskManager/kernel/ppe/HTaskInfo.cc Fri Nov 20 23:12:34 2009 +0900 +++ b/TaskManager/kernel/ppe/HTaskInfo.cc Sat Nov 21 10:06:34 2009 +0900 @@ -85,9 +85,13 @@ HTaskInfo::create(int cmd, memaddr rbuf, int rs, memaddr wbuf, int ws) { HTaskPtr task = create(cmd); +#ifdef SIMPLE_TASK task->set_input(rbuf, rs); task->set_output(wbuf, ws); return task; +#else + return 0; +#endif } diff -r a909c50081c2 -r 0692b08f1cd6 TaskManager/kernel/ppe/SimpleTask.h --- a/TaskManager/kernel/ppe/SimpleTask.h Fri Nov 20 23:12:34 2009 +0900 +++ b/TaskManager/kernel/ppe/SimpleTask.h Sat Nov 21 10:06:34 2009 +0900 @@ -24,6 +24,7 @@ public: // functions SimpleTask() {}; +#ifdef SIMPLE_TASK SimpleTask(int r, memaddr read, int w, memaddr write) { r_size = r; rbuf = read; w_size = w; wbuf = write; @@ -31,6 +32,7 @@ void set_input(memaddr i,int size) { r_size = size; rbuf= i; } void set_output(memaddr o,int size) { w_size = size; wbuf= o; } +#endif }; diff -r a909c50081c2 -r 0692b08f1cd6 TaskManager/kernel/schedule/SchedTask.h --- a/TaskManager/kernel/schedule/SchedTask.h Fri Nov 20 23:12:34 2009 +0900 +++ b/TaskManager/kernel/schedule/SchedTask.h Sat Nov 21 10:06:34 2009 +0900 @@ -36,7 +36,7 @@ // read/write 用の ListData ListDataPtr inListData; ListDataPtr outListData; -#ifdef SIMPLE_TASK +#ifndef SIMPLE_TASK memaddr *param; #endif @@ -78,9 +78,7 @@ int read_size() { return task->r_size; } int write_size() { return task->w_size; } void set_write_size(int w) { task->w_size = w; } -#endif - int get_cpuid(); - +#else void* get_input(void *buff, int index); void* get_output(void *buff, int index); memaddr get_inputAddr(int index); @@ -89,6 +87,9 @@ int get_inputSize(int index); int get_outputSize(int index); memaddr get_param(int index); +#endif + + int get_cpuid(); void* global_alloc(int id, int size); void* global_get(int id); diff -r a909c50081c2 -r 0692b08f1cd6 example/Simple/Makefile.def --- a/example/Simple/Makefile.def Fri Nov 20 23:12:34 2009 +0900 +++ b/example/Simple/Makefile.def Sat Nov 21 10:06:34 2009 +0900 @@ -5,8 +5,11 @@ # ex linux/ps3 CERIUM = ../../../Cerium +# SIMPLE_TASK=-DSIMPLE_TASK +SIMPLE_TASK= + CC = g++ -CFLAGS = -g -Wall -O9 -DSIMPLE_TASK +CFLAGS = -g -Wall -O9 $(SIMPLE_TASK) INCLUDE = -I${CERIUM}/include/TaskManager -I. -I.. LIBS = -L${CERIUM}/TaskManager diff -r a909c50081c2 -r 0692b08f1cd6 example/Simple/spe/Makefile --- a/example/Simple/spe/Makefile Fri Nov 20 23:12:34 2009 +0900 +++ b/example/Simple/spe/Makefile Sat Nov 21 10:06:34 2009 +0900 @@ -6,7 +6,7 @@ SRCS = $(filter-out $(SRCS_EXCLUDE),$(SRCS_TMP)) OBJS = $(SRCS:.cc=.o) -CC = spu-g++ -DABIBIT=$(ABIBIT) -DSIMPLE_TASK +CC = spu-g++ -DABIBIT=$(ABIBIT) $(SIMPLE_TASK) CFLAGS = -g -Wall -fno-exceptions -fno-rtti #-DDEBUG INCLUDE = -I../${CERIUM}/include/TaskManager -I. -I.. LIBS = -L../${CERIUM}/TaskManager -lspemanager diff -r a909c50081c2 -r 0692b08f1cd6 example/basic/Makefile.def --- a/example/basic/Makefile.def Fri Nov 20 23:12:34 2009 +0900 +++ b/example/basic/Makefile.def Sat Nov 21 10:06:34 2009 +0900 @@ -1,14 +1,16 @@ TARGET = twice # include/library path -# ex: macosx +# ex macosx #CERIUM = /Users/gongo/Source/Cerium -# ex: linux/ps3 +# ex linux/ps3 CERIUM = ../../../Cerium CC = g++ CFLAGS = -g -Wall -O9 +ABIBIT = 32 + INCLUDE = -I${CERIUM}/include/TaskManager -I. -I.. LIBS = -L${CERIUM}/TaskManager diff -r a909c50081c2 -r 0692b08f1cd6 example/basic/Makefile.macosx --- a/example/basic/Makefile.macosx Fri Nov 20 23:12:34 2009 +0900 +++ b/example/basic/Makefile.macosx Sat Nov 21 10:06:34 2009 +0900 @@ -12,7 +12,7 @@ TASK_OBJS = $(TASK_SRCS:.cc=.o) LIBS += -lFifoManager `sdl-config --libs` -CC += -m64 +CC += -m$(ABIBIT) .SUFFIXES: .cc .o