From b0d551327f38fb2ddeaa68848d478cf90ded1eec Mon Sep 17 00:00:00 2001 From: jzhou Date: Sat, 16 May 2009 00:47:37 +0000 Subject: [PATCH] changes for multicore version runtime according to latest update of class library --- Robust/src/Runtime/multicoreruntime.c | 36 +++++++++++++++++++++++++++ Robust/src/buildscript | 10 ++++---- 2 files changed, 41 insertions(+), 5 deletions(-) diff --git a/Robust/src/Runtime/multicoreruntime.c b/Robust/src/Runtime/multicoreruntime.c index 2836a4e3..d413383d 100644 --- a/Robust/src/Runtime/multicoreruntime.c +++ b/Robust/src/Runtime/multicoreruntime.c @@ -93,6 +93,42 @@ void injectinstructionfailure() { #endif } +#ifdef D___Double______nativeparsedouble____L___String___ +double CALL01(___Double______nativeparsedouble____L___String___,struct ___String___ * ___str___) { + int length=VAR(___str___)->___count___; + int maxlength=(length>60)?60:length; + char str[maxlength+1]; + struct ArrayObject * chararray=VAR(___str___)->___value___; + int i; + int offset=VAR(___str___)->___offset___; + for(i=0; i___length___)+sizeof(int)))[i+offset]; + } + str[i]=0; + double d=atof(str); + return d; +} +#endif + +#ifdef D___String______convertdoubletochar____D__AR_C +int CALL12(___String______convertdoubletochar____D__AR_C, double ___val___, double ___val___, struct ArrayObject ___chararray___) { + int length=VAR(___chararray___)->___length___; + char str[length]; + int i; + int num=snprintf(str, length, "%f",___val___); + if (num>=length) + num=length-1; + for(i=0; i___length___)+sizeof(int)))[i]=(short)str[i]; + } + return num; +} +#else +int CALL12(___String______convertdoubletochar____D__AR_C, double ___val___, double ___val___, struct ArrayObject ___chararray___) { + return 0; +} +#endif + void CALL11(___System______exit____I,int ___status___, int ___status___) { #ifdef MULTICORE BAMBOO_EXIT(___status___); diff --git a/Robust/src/buildscript b/Robust/src/buildscript index b16fb290..c0c6f936 100755 --- a/Robust/src/buildscript +++ b/Robust/src/buildscript @@ -539,9 +539,9 @@ then #INTERRUPT version TILERACFLAGS="${TILERACFLAGS} -DINTERRUPT" fi #INTERRUPT version -cp $ROBUSTROOT/Runtime/Tilera/$MAKEFILE ./Makefile -cp $ROBUSTROOT/Runtime/Tilera/$SIMHVC ./sim.hvc -cp $ROBUSTROOT/Runtime/Tilera/$PCIHVC ./pci.hvc +cp $ROBUSTROOT/Tilera/Runtime/$MAKEFILE ./Makefile +cp $ROBUSTROOT/Tilera/Runtime/$SIMHVC ./sim.hvc +cp $ROBUSTROOT/Tilera/Runtime/$PCIHVC ./pci.hvc cp ../Runtime/multicoretask.c ./ cp ../Runtime/multicoreruntime.c ./ cp ../Runtime/Queue.c ./ @@ -561,8 +561,8 @@ cp ../Runtime/ObjectHash.h ./ cp ../Runtime/Queue.h ./ cp ../Runtime/runtime.h ./ cp ../Runtime/SimpleHash.h ./ -cp ../Runtime/Tilera/*.c ./ -cp ../Runtime/Tilera/*.h ./ +cp ../Tilera/Runtime/*.c ./ +cp ../Tilera/Runtime/*.h ./ cp ../tmpbuilddirectory/*.c ./ cp ../tmpbuilddirectory/*.h ./ -- 2.34.1