Fix Bug in handling zero register in aliases

This commit is contained in:
sBubshait 2024-06-14 21:22:11 +01:00
parent e5b3f19bec
commit 3501ac93aa

View File

@ -104,8 +104,10 @@ void classifyAlias(char *opcode, a64inst_instruction *instr, char *tokens[], int
char *opcode = ALIAS_TARGET_OPCODES[aliasIndex];
// To correctly encode the zero register, which is either w31 or x31.
char *start_zeroReg = tokens[1];
while (isspace(*start_zeroReg)) start_zeroReg++;
char *zeroReg = malloc(5 * sizeof(char));
*zeroReg = *tokens[1];
*zeroReg = *start_zeroReg;
strcat(zeroReg, "31");
switch(aliasIndex) {