diff --git a/src/parser.c b/src/parser.c index c775646..e358cb8 100644 --- a/src/parser.c +++ b/src/parser.c @@ -287,10 +287,15 @@ void parseDPImmediate(a64inst_instruction *inst, char *tokens[], int tokensCount if (isStringIn(tokens[0], WIDE_MOV_OPCODES, 3)) { data->DPIOpType = a64inst_DPI_WIDEMOV; - data->processOp = indexStringIn(tokens[0], WIDE_MOV_OPCODES, 3); + data->processOp = indexStringIn(tokens[0], WIDE_MOV_OPCODES, 4); data->processOpData.wideMovData.immediate = getOperandNumber(tokens[2]); if (tokensCount >= 4) { - data->processOpData.wideMovData.shiftScalar = getOperandNumber(tokens[3]); + int numTokens = 0; + char **shiftOperands = tokenise(tokens[3], &numTokens); + int shiftAmount = getOperandNumber(shiftOperands[1]); + if (shiftAmount > 0) { + data->processOpData.wideMovData.shiftScalar = 12; + } } } else {