comments for clarity in parser
This commit is contained in:
parent
d0be871e8f
commit
92719b6b33
@ -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);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user