adjust operand counts for calculating address format
This commit is contained in:
parent
f1ac860d6a
commit
5413d27026
10
src/parser.c
10
src/parser.c
@ -16,14 +16,14 @@
|
||||
|
||||
//calculate offsets from string
|
||||
void calcluateAddressFormat(a64inst_instruction *instr, char *operandList[]){
|
||||
|
||||
if(strcmp(operandList[1][strlen(operandList[1])-1], "!")==0){
|
||||
|
||||
if(strcmp(operandList[2][strlen(operandList[1])-1], "!")==0){
|
||||
instr->data.processOpData.addressingMode = a64inst_PRE_INDEXED;
|
||||
} else if(strcmp(operandList[0][strlen(operandList[0])-1], "]") == 0) {
|
||||
} else if(strcmp(operandList[1][strlen(operandList[0])-1], "]") == 0) {
|
||||
//post-indexed
|
||||
instr->data.processOpData.addressingMode = a64inst_POST_INDEXED;
|
||||
} else if( (strcmp(operandList[1][strlen(operandList[1])-1], "x") == 0)
|
||||
|| (strcmp(operandList[1][strlen(operandList[1])-1], "w") == 0)){
|
||||
} else if( (strcmp(operandList[2][strlen(operandList[1])-1], "x") == 0)
|
||||
|| (strcmp(operandList[2][strlen(operandList[1])-1], "w") == 0)){
|
||||
//register
|
||||
instr->data.processOpData.addressingMode = a64inst_REGISTER_OFFSET;
|
||||
} else {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user