diff --git a/src/parser.c b/src/parser.c index 31b5ffc..97eef8d 100644 --- a/src/parser.c +++ b/src/parser.c @@ -18,6 +18,14 @@ // - ASK ABOUT OFFSET CALCULATION // - CREATE FUNC TO TIDY UP OPERANDS IN DP +int getOperandNumber(char *operand){ + char *operandCpy = strcpy(operandCpy, operand); + operandCpy++; + char **endptr; + int number = strtol(operandCpy, endptr, 10); + return number; +} + int isOperandRegister(char *operand){ return((strcmp(&(operand[0]), "x")==0) || (strcmp(&(operand[0]), "w")==0)); } @@ -161,6 +169,7 @@ void classifyOpcode(char* opcode, a64inst_instruction *instr, char *operandList[ //offset is literal, use symbol table and calculate difference } } + generateLoadStoreOperands(instr, opcode, operandList, numOperands); } else { if(classifyDPInst(operandList)){