fix halt command encoding
This commit is contained in:
parent
c52de918db
commit
6ddf18be96
@ -1,6 +1,6 @@
|
||||
#include "a64instruction/a64instruction.h"
|
||||
|
||||
#define OPERAND_DELIMITER ", "
|
||||
#define HALT_ASM_CMD "and x0, x0, x0"
|
||||
#define HALT_ASM_CMD "and x0, x0, x0\n"
|
||||
|
||||
a64inst_instruction *parse(char **asmLines, int lineCount);
|
||||
|
||||
@ -4,6 +4,8 @@
|
||||
#include <stdlib.h>
|
||||
#include <limits.h>
|
||||
|
||||
#define HALT_BINARY 2315255808
|
||||
|
||||
// Generates assembled code based on the two-pass assembly method
|
||||
|
||||
word assembleBranch(a64inst_instruction *instr) {
|
||||
@ -209,7 +211,7 @@ word *secondPass(a64inst_instruction instrs[], int numInstrs, st* table) {
|
||||
index++;
|
||||
break;
|
||||
case a64inst_HALT:
|
||||
arr[index] = 69U * (1 << 25);
|
||||
arr[index] = HALT_BINARY;
|
||||
index++;
|
||||
break;
|
||||
case a64inst_LABEL:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user