From fbdc87e8175289bba82765189c6ae53ce88c9ae5 Mon Sep 17 00:00:00 2001 From: jzhou Date: Wed, 17 Mar 2010 22:24:23 +0000 Subject: [PATCH] TILERA_ZLINUX mode for BAMBOO can be compiled now, but still has segmentation fault --- Robust/src/IR/Flat/BuildCodeMultiCore.java | 4 ++-- Robust/src/Runtime/multicoreruntime.c | 6 ++++-- Robust/src/Runtime/multicoreruntime.h | 6 ++++++ Robust/src/buildscript | 5 ++++- 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/Robust/src/IR/Flat/BuildCodeMultiCore.java b/Robust/src/IR/Flat/BuildCodeMultiCore.java index 89bc6530..1ed0244c 100644 --- a/Robust/src/IR/Flat/BuildCodeMultiCore.java +++ b/Robust/src/IR/Flat/BuildCodeMultiCore.java @@ -677,7 +677,7 @@ public class BuildCodeMultiCore extends BuildCode { output.println("BAMBOO_DEBUGPRINT_REG(tmpsum);"); } else { //output.println("BAMBOO_ENTER_RUNTIME_MODE_FROM_CLIENT();"); - output.println("tprintf(\"Process %x(%d): task %s\\n\", corenum, corenum, \"" + task.getSymbol() + "\");"); + output.println("printf(\"(%x,%x) Process %x(%d): task %s\\n\", udn_tile_coord_x(), udn_tile_coord_y(), corenum, corenum, \"" + task.getSymbol() + "\");"); //output.println("BAMBOO_ENTER_CLIENT_MODE_FROM_RUNTIME();"); } //output.println("BAMBOO_DEBUGPRINT(BAMBOO_GET_EXE_TIME());"); @@ -688,7 +688,7 @@ public class BuildCodeMultiCore extends BuildCode { output.println("BAMBOO_DEBUGPRINT_REG(tmpsum);"); } else { //output.println("BAMBOO_ENTER_RUNTIME_MODE_FROM_CLIENT();"); - output.println("tprintf(\"Process %x(%d): task %s\\n\", corenum, corenum, \"" + task.getSymbol() + "\");"); + output.println("printf(\"(%x,%x) Process %x(%d): task %s\\n\", udn_tile_coord_x(), udn_tile_coord_y(), corenum, corenum, \"" + task.getSymbol() + "\");"); //output.println("BAMBOO_ENTER_CLIENT_MODE_FROM_RUNTIME();"); } output.println("#endif"); diff --git a/Robust/src/Runtime/multicoreruntime.c b/Robust/src/Runtime/multicoreruntime.c index 9f4a825c..7c9cba8e 100644 --- a/Robust/src/Runtime/multicoreruntime.c +++ b/Robust/src/Runtime/multicoreruntime.c @@ -212,7 +212,8 @@ void CALL01(___System______printString____L___String___,struct ___String___ * __ void * allocate_new(void * ptr, int type) { struct ___Object___ * v=(struct ___Object___ *)FREEMALLOC((struct garbagelist *) ptr, classsize[type]); #ifdef DEBUG - tprintf("new object: %x \n", v); + printf("(%x,%x): new object: %x \n", udn_tile_coord_x(), + udn_tile_coord_y(), v); #endif v->type=type; v->version = 0; @@ -227,7 +228,8 @@ void * allocate_new(void * ptr, int type) { struct ArrayObject * allocate_newarray(void * ptr, int type, int length) { struct ArrayObject * v=(struct ArrayObject *)FREEMALLOC((struct garbagelist *) ptr, sizeof(struct ArrayObject)+length*classsize[type]); #ifdef DEBUG - tprintf("new array object: %x \n", v); + printf("(%x,%x): new array object: %x \n", udn_tile_coord_x(), + udn_tile_coord_y(), v); #endif v->type=type; v->version = 0; diff --git a/Robust/src/Runtime/multicoreruntime.h b/Robust/src/Runtime/multicoreruntime.h index dfbd9e88..b83a8974 100644 --- a/Robust/src/Runtime/multicoreruntime.h +++ b/Robust/src/Runtime/multicoreruntime.h @@ -5,6 +5,12 @@ #define INLINE inline __attribute__((always_inline)) #endif +#ifndef bool +#define bool int +#define true 1 +#define false 0 +#endif + //////////////////////////////////////////////////////////////// // global variables // /////////////////////////////////////////////////////////////// diff --git a/Robust/src/buildscript b/Robust/src/buildscript index c6621f58..c8fd48ba 100755 --- a/Robust/src/buildscript +++ b/Robust/src/buildscript @@ -662,7 +662,7 @@ SIMHVC="sim.hvc.$TILERACONFIG" PCIHVC="pci.hvc.$TILERACONFIG" elif $TILERAZLINUXFLAG then # TILERAZLINUXFLAG -TILERA_INDIR="ZLINUX" +TILERA_INDIR="ZLinux" MAKEFILE="Makefile.tilera.$TILERACONFIG" fi mkdir $TILERADIR @@ -761,7 +761,10 @@ cp ../Tilera/Runtime/*.c ./ cp ../Tilera/Runtime/*.h ./ cp ../Tilera/Runtime/$TILERA_INDIR/*.c ./ cp ../Tilera/Runtime/$TILERA_INDIR/*.h ./ +if $TILERAZLINUXFLAG +then # TILERAZLINUXFLAG cp ../Tilera/Runtime/$TILERA_INDIR/*.S ./ +fi cp ../Tilera/lib/* ./ cp ../$tmpbuilddirectory/*.c ./ cp ../$tmpbuilddirectory/*.h ./ -- 2.34.1