Skip to content
Snippets Groups Projects
Commit 0ea725ef authored by ryuzakighost's avatar ryuzakighost
Browse files

tweak

parent e6f7f6ac
No related branches found
No related tags found
No related merge requests found
...@@ -30,9 +30,7 @@ public class Fuzzer { ...@@ -30,9 +30,7 @@ public class Fuzzer {
/*pw.println("MOV R1 65535"); /*pw.println("MOV R1 65535");
pw.println("LDR R0 R1 0");*/ pw.println("LDR R0 R1 0");*/
pw.println("MOV R1 1"); pw.println("RET R-1");
pw.println("LDR R0 R1 65535");
pw.println("RET R0");
/*pw.print("RET R0"); /*pw.print("RET R0");
......
...@@ -40,7 +40,7 @@ const char INSTRUCTION_JZ[] = "jz"; ...@@ -40,7 +40,7 @@ const char INSTRUCTION_JZ[] = "jz";
#define NUM_REGS 32 #define NUM_REGS 32
#define MAX_REG (NUM_REGS-1) #define MAX_REG (NUM_REGS-1)
#define MEMORY_SIZE 65536 /* 4 x as much memory as a 64 */ #define MEMORY_SIZE 65536 /* 4 x as much memory as a 64 */
#define MAX_ADDR (MEMORY_SIZE) #define MAX_ADDR (MEMORY_SIZE-1)
/* we force building with -fwrapv to ensure that signed overflow is defined /* we force building with -fwrapv to ensure that signed overflow is defined
...@@ -126,7 +126,7 @@ static void do_move(unsigned int rd, int32_t val){ ...@@ -126,7 +126,7 @@ static void do_move(unsigned int rd, int32_t val){
regs[rd] = val; regs[rd] = val;
} }
#define valid_reg(reg) (reg >= 0 && reg <= MAX_REG) #define valid_reg(reg) (reg <= MAX_REG)
/* returns 0 on success, nonzero on failure. puts register number into /* returns 0 on success, nonzero on failure. puts register number into
......
pw.println("MOV R1 1");
pw.println("LDR R0 R1 65535");
pw.println("RET R0");
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment