From 92719b6b33159a328624e95d341bc83ada815719 Mon Sep 17 00:00:00 2001 From: EDiasAlberto Date: Sun, 9 Jun 2024 23:10:39 +0100 Subject: [PATCH] comments for clarity in parser --- src/parser.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/parser.c b/src/parser.c index 9a1ac25..c0a3caa 100644 --- a/src/parser.c +++ b/src/parser.c @@ -136,7 +136,6 @@ void classifyOpcode(char* opcode, a64inst_instruction *instr, char *operandList[ instr->data.BranchData.BranchType = a64inst_REGISTER; } else { instr->data.BranchData.BranchType = a64inst_CONDITIONAL; - //instr->data.branchData.processOpData.cond = {remove first two chars of opcode} } generateBranchOperands(instr, opcode, operandList); } else if(isLoad == 0 || isStore == 0){ @@ -224,8 +223,11 @@ a64inst_instruction *parser(char asmLine[]){ //type is instruction int operandCount = 0; const char *operandList[4]; + //generate list of operands tokeniseOperands(operands, &operandCount, operandList, &numOperands); + //categorise instruction type from opcode and operands classifyOpcode(opcode, instr, operandList, operandCount); + //define struct values according to operands and type switch(instr->type){ case a64inst_BRANCH: generateBranchOperands(instr, opcode, operandList);