changes for multicore version runtime according to latest update of class library
authorjzhou <jzhou>
Sat, 16 May 2009 00:47:37 +0000 (00:47 +0000)
committerjzhou <jzhou>
Sat, 16 May 2009 00:47:37 +0000 (00:47 +0000)
Robust/src/Runtime/multicoreruntime.c
Robust/src/buildscript

index 2836a4e39e5f993345acca59955907caeff34976..d413383deb9d41a30b69c0ee496bac783ae8e88b 100644 (file)
@@ -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<maxlength; i++) {
+    str[i]=((short *)(((char *)&chararray->___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; i++) {
+    ((short *)(((char *)&VAR(___chararray___)->___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___);
index b16fb29042a9b200e914a5344cdbaa750edbc8f5..c0c6f9369b08730e06de134bd42b8e6be77c46cc 100755 (executable)
@@ -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 ./