small update, sync helper function

This commit is contained in:
GDBWNV 2024-06-12 16:31:09 +01:00
parent f1270144fa
commit 28b38f4a80

View File

@ -176,6 +176,25 @@ void classifyOpcode(char* opcode, a64inst_instruction *instr, char *operandList[
instr->type = a64inst_DPREGISTER;
} else {
instr->type = a64inst_DPIMMEDIATE;
a64inst_DPImmediateData data = instr->data.DPImmediateData;
char t = operandList[0][0];
char *immOffset = NULL;
immOffset = strcpy(immOffset, operandList[0]);
immOffset++;
char *endptr = NULL;
int reg = strtol(immOffset, &endptr, 10);
data.dest=reg;
if (t == 'w') {
data.regType=0;
}
else {
data.regType=1;
}
// add
if (opcode[1] == 'd') {
data.DPIOpType = 0;
}
}
}