diff --git a/src/parser.c b/src/parser.c index 53b8e0c..dd7a761 100644 --- a/src/parser.c +++ b/src/parser.c @@ -44,7 +44,12 @@ void classifyOpcode(char* opcode, a64inst_instruction *instr, char *operandList[ } } else { - //data processing + int numOperands = sizeof(operandList) / sizeof(operandList[0]) + if(numOperands==3){ + instr->type = a64inst_DPREGISTER; + } else { + instr->type = a64inst_DPIMMEDIATE; + } } } @@ -97,10 +102,11 @@ a64inst_instruction *parser(char asmLine[]){ int operandCount = 0; const char *operandList[4]; tokeniseOperands(operands, &operandCount, operandList); + renameAliases(&opcode, &operandList); } - return(a64inst_instruction); + return(instr); }