Merge branch 'assembler' into 'Assembler-G'
Assembler See merge request lab2324_summer/armv8_43!11
This commit is contained in:
commit
f1270144fa
@ -18,6 +18,14 @@
|
|||||||
// - ASK ABOUT OFFSET CALCULATION
|
// - ASK ABOUT OFFSET CALCULATION
|
||||||
// - CREATE FUNC TO TIDY UP OPERANDS IN DP
|
// - CREATE FUNC TO TIDY UP OPERANDS IN DP
|
||||||
|
|
||||||
|
int getOperandNumber(char *operand){
|
||||||
|
char *operandCpy = strcpy(operandCpy, operand);
|
||||||
|
operandCpy++;
|
||||||
|
char **endptr;
|
||||||
|
int number = strtol(operandCpy, endptr, 10);
|
||||||
|
return number;
|
||||||
|
}
|
||||||
|
|
||||||
int isOperandRegister(char *operand){
|
int isOperandRegister(char *operand){
|
||||||
return((strcmp(&(operand[0]), "x")==0) || (strcmp(&(operand[0]), "w")==0));
|
return((strcmp(&(operand[0]), "x")==0) || (strcmp(&(operand[0]), "w")==0));
|
||||||
}
|
}
|
||||||
@ -161,6 +169,7 @@ void classifyOpcode(char* opcode, a64inst_instruction *instr, char *operandList[
|
|||||||
//offset is literal, use symbol table and calculate difference
|
//offset is literal, use symbol table and calculate difference
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
generateLoadStoreOperands(instr, opcode, operandList, numOperands);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if(classifyDPInst(operandList)){
|
if(classifyDPInst(operandList)){
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user