fix load and store

This commit is contained in:
2024-12-10 18:06:23 +01:00
parent 99a7e32269
commit ade88faa0b
2 changed files with 6 additions and 6 deletions

View File

@@ -91,8 +91,8 @@ std::uint32_t Assembleur::ParseJump(Instruction a_Instruction) {
return IToInt(a_Instruction); return IToInt(a_Instruction);
} }
std::uint32_t Assembleur::ParseIO(Instruction a_Instruction, std::uint32_t a_R1, std::uint32_t a_R2, std::uint32_t a_R3) { std::uint32_t Assembleur::ParseIO(Instruction a_Instruction, std::uint32_t a_R1, std::uint32_t a_R2) {
return IToInt(a_Instruction) | a_R1 << 23 | a_R2 << 20 | a_R3 << 17; return IToInt(a_Instruction) | a_R1 << 23 | a_R2 << 20;
} }
@@ -146,9 +146,9 @@ std::uint32_t Assembleur::ParseInstruction(const std::string& a_Str, std::uint32
} }
case Memoire: { case Memoire: {
std::string R1, R2, R3; std::string R1, R2;
ss >> R1 >> R2 >> R3; ss >> R1 >> R2;
return ParseIO(instruction, ParseRegistry(R1), ParseRegistry(R2), ParseRegistry(R3)); return ParseIO(instruction, ParseRegistry(R1), ParseRegistry(R2));
} }
case SautControle: { case SautControle: {

View File

@@ -39,5 +39,5 @@ class Assembleur {
std::uint32_t ParseJump(Instruction a_Instruction); std::uint32_t ParseJump(Instruction a_Instruction);
std::uint32_t ParseIO(Instruction a_Instruction, std::uint32_t a_R1, std::uint32_t a_R2, std::uint32_t a_R3); std::uint32_t ParseIO(Instruction a_Instruction, std::uint32_t a_R1, std::uint32_t a_R2);
}; };