Mercurial > hg > Game > Cerium
changeset 611:e4c355211bd7 draft
cell fix memaddr
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 10 Nov 2009 20:24:07 +0900 |
parents | d38d9896dfa4 |
children | fb88a682109e |
files | TaskManager/Cell/SpeThreads.cc TaskManager/Cell/spe/CellDmaManager.h TaskManager/Makefile.cell TaskManager/Makefile.def |
diffstat | 4 files changed, 12 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/TaskManager/Cell/SpeThreads.cc Sun Nov 08 03:30:06 2009 +0900 +++ b/TaskManager/Cell/SpeThreads.cc Tue Nov 10 20:24:07 2009 +0900 @@ -6,7 +6,7 @@ SpeThreads::~SpeThreads(void) { - unsigned int mail = MY_SPE_COMMAND_EXIT; + memaddr mail = MY_SPE_COMMAND_EXIT; int ret; for (int i = 0; i < spe_num; i++) { @@ -159,12 +159,13 @@ * @param [num] The number of messages */ void -SpeThreads::send_mail(int speid, int num, memaddr *data) +SpeThreads::send_mail(int speid, int num, memaddr *data1) { + unsigned int *data = (unsigned int *) data1; spe_in_mbox_write(spe_ctx[speid], data, num, SPE_MBOX_ALL_BLOCKING); - if (sizeof(memaddr)>4) { - spe_in_mbox_write(spe_ctx[speid], data>>4, num, SPE_MBOX_ALL_BLOCKING); - } +// if (sizeof(memaddr)>4) { +// spe_in_mbox_write(spe_ctx[speid], (data>>4), num, SPE_MBOX_ALL_BLOCKING); +// } } void
--- a/TaskManager/Cell/spe/CellDmaManager.h Sun Nov 08 03:30:06 2009 +0900 +++ b/TaskManager/Cell/spe/CellDmaManager.h Tue Nov 10 20:24:07 2009 +0900 @@ -2,6 +2,7 @@ #define INCLUDED_CELL_DMA_MANAGER #include "base.h" +#include "types.h" #include "DmaManager.h" #include <spu_mfcio.h> @@ -29,8 +30,8 @@ void end_dmawait_profile(); void show_dma_wait(int cpu); - void mail_write(uint32 data); - uint32 mail_read(void); + void mail_write(memaddr data); + memaddr mail_read(); void dma_loadList(ListDataPtr list, void *buff, uint32 mask); void dma_storeList(ListDataPtr, void *buff, uint32 mask); };
--- a/TaskManager/Makefile.cell Sun Nov 08 03:30:06 2009 +0900 +++ b/TaskManager/Makefile.cell Tue Nov 10 20:24:07 2009 +0900 @@ -35,7 +35,7 @@ EXTRA_CFLAGS = -D__CERIUM_CELL__ -fno-strict-aliasing -SPE_CFLAGS = -fno-exceptions -fno-rtti +SPE_CFLAGS = -fno-exceptions -fno-rtti -Wall -O9 all: default @@ -58,7 +58,7 @@ cp kernel/ppe/{TaskList.cc,TaskQueue.cc,Task.cc} $(CELL_SPE_DIR)/ $(CELL_SPE_OBJS): %.o : %.cc - $(SPUCC) $(CFLAGS) $(SPE_CFLAGS) $(INCLUDE) -c $< -o $@ + $(SPUCC) $(SPE_CFLAGS) $(INCLUDE) -c $< -o $@ celldistclean: cellclean rm -f $(TARGET)
--- a/TaskManager/Makefile.def Sun Nov 08 03:30:06 2009 +0900 +++ b/TaskManager/Makefile.def Tue Nov 10 20:24:07 2009 +0900 @@ -30,7 +30,7 @@ ABI = -m32 CC = g++ -CFLAGS = -Wall `sdl-config --cflags` -g $(ABI) # -O9 +CFLAGS = -Wall `sdl-config --cflags` -g $(ABI) -O9 LIBS = INCLUDE = -I../include/TaskManager