Fix Bug in handling zero register in aliases
This commit is contained in:
parent
e5b3f19bec
commit
3501ac93aa
@ -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) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user