super.generateFlatNode(fm, lb, current_node, output);
if (current_node.kind()!=FKind.FlatReturnNode) {
//output.println(" flushAll();");
- output.println("#ifdef RAW");
+ output.println("#ifdef RAWCACHEFLUSH");
output.println("raw_user_interrupts_off();");
output.println("#ifdef RAWDEBUG");
output.println("raw_test_pass(0xec00);");
output.println("return "+generateTemp(fm, frn.getReturnTemp(), lb)+";");
} else {
if(fm.getTask() != null) {
- output.println("#ifdef RAW");
+ output.println("#ifdef RAWCACHEFLUSH");
output.println("raw_user_interrupts_off();");
output.println("#ifdef RAWDEBUG");
output.println("raw_test_pass(0xec00);");
if(grount == 1) {
int k = 0;
// flush the object
+#ifdef RAWCACHEFLUSH
raw_invalidate_cache_range((int)obj, classsize[((struct ___Object___ *)obj)->type]);
- /*if(RuntimeHashcontainskey(objRedirectLockTbl, (int)obj)) {
- int redirectlock = 0;
- RuntimeHashget(objRedirectLockTbl, (int)obj, &redirectlock);
- ((struct ___Object___ *)obj)->lock = redirectlock;
- raw_flush_cache_range((int)obj, classsize[((struct ___Object___ *)obj)->type]);
- RuntimeHashremovekey(objRedirectLockTbl, (int)obj);
- }*/
+#endif
// enqueue the object
for(k = 0; k < objInfo->length; ++k) {
int taskindex = objInfo->queues[2 * k];
/* Set initialized flag for startup object */
flagorandinit(startupobject,1,0xFFFFFFFF);
enqueueObject(startupobject, NULL, 0);
-#ifdef RAW
+#ifdef RAWCACHEFLUSH
raw_flush_entire_cache();
#endif
}
#endif
// flush the object
+#ifdef RAWCACHEFLUSH
{
raw_invalidate_cache_range((int)parameter, classsize[((struct ___Object___ *)parameter)->type]);
}
#ifdef INTERRUPT
raw_user_interrupts_on();
#endif
+#endif
#endif
tmpparam = (struct ___Object___ *)parameter;
#ifdef THREADSIMULATE
echo -multicore generate multi-core version binary
echo "-numcore set the number of cores (should be used together with -multicore), defaultly set as 1"
echo "-raw generate raw version binary (should be used together with -multicore)"
+echo "-rawcacheflush enable cache flush in raw version binary (should be used togethere with -raw)"
echo "-interrupt generate raw version binary with interruption (should be used togethere with -raw)"
echo "-rawconfig config raw simulator as 4xn (should be used together with -raw)"
echo "-rawpath print out execute path information for raw version (should be used together with -raw)"
MULTICOREFLAG=false
TRANSSTATSFLAG=false
RAWFLAG=false
+RAWCACHEFLUSHFLAG=false
RAWCONFIG=''
RAWDEBUGFLAG=false
RAWPATHFLAG=false
then
RAWFLAG=true
JAVAOPTS="$JAVAOPTS -raw"
+elif [[ $1 = '-rawcacheflush' ]]
+then
+RAWCACHEFLUSHFLAG=true
elif [[ $1 = '-rawconfig' ]]
then
RAWCONFIG="$2"
export RAWRGCCFLAGS="-DTASK -DMULTICORE -DRAW"
+if $RAWCACHEFLUSHFLAG
+then # print path
+RAWRGCCFLAGS="${RAWRGCCFLAGS} -DRAWCACHEFLUSH"
+fi
+
if $RAWPATHFLAG
then # print path
RAWRGCCFLAGS="${RAWRGCCFLAGS} -DRAWPATH"