mirror of
https://github.com/supleed2/ELEC40006-P1-CW.git
synced 2024-12-22 21:45:49 +00:00
Added STR and LDR to the cpp generator
This commit is contained in:
parent
20f2adc4a1
commit
6839781fa0
|
@ -254,6 +254,12 @@ string getInstructionHex(string instruction){
|
||||||
binary+="101001";
|
binary+="101001";
|
||||||
rs1="R0";
|
rs1="R0";
|
||||||
rs2="R0";
|
rs2="R0";
|
||||||
|
}else if(opcode=="LDR"){
|
||||||
|
binary+="101010";
|
||||||
|
rs2="R0";
|
||||||
|
}else if(opcode=="STR"){
|
||||||
|
binary+="101011";
|
||||||
|
rs2="R0";
|
||||||
}else if(opcode=="NOP"){
|
}else if(opcode=="NOP"){
|
||||||
binary+="111110";
|
binary+="111110";
|
||||||
rd="R0";
|
rd="R0";
|
||||||
|
|
Loading…
Reference in a new issue