Skip to content
Snippets Groups Projects
Commit 5c64e66f authored by Zhaolin Deng's avatar Zhaolin Deng
Browse files

update fuzzer

parent f38009f0
Branches
No related tags found
No related merge requests found
......@@ -31,7 +31,7 @@ public class Fuzzer {
pw.println("ADD R"+(x+1)+" R"+x +" R"+x);
};
pw.println("RET R31");*/
pw.println("JZ R0 -2");
//pw.println("JZ R0 -2");
pw.println("RET R0");
}catch (Exception e){
......
......@@ -57,7 +57,7 @@ unsigned int count = 0; /* counts number of instructions executed so far */
static void machine_init(void){
memory = malloc(sizeof(int32_t)*MEMORY_SIZE);
regs = malloc(sizeof(int32_t)*NUM_REGS);
//memset(memory,0,sizeof(int32_t)*MEMORY_SIZE);
//Zmemset(memory,0,sizeof(int32_t)*MEMORY_SIZE);
//memset(regs,0,sizeof(int32_t)*NUM_REGS);
count = 0;
}
......@@ -385,7 +385,7 @@ int execute(const unsigned int progLength, const int cycles, int32_t * res){
/* this should never overflow given constraints on both pc and offs */
pc = pc + offs;
count++;
// continue; /* avoid default increment of pc below */
continue; /* avoid default increment of pc below */
}else{
return -1;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment