Skip to content

Commit

Permalink
update PSEMU/CPURegisters.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
Cherrytree56567 committed Oct 8, 2023
1 parent 271021e commit f709d31
Showing 1 changed file with 1 addition and 26 deletions.
27 changes: 1 addition & 26 deletions PSEMU/CPURegisters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,4 @@
PSEMU © 2023 by Ronit D'silva is licensed under Attribution-NonCommercial-ShareAlike 4.0 International
*/
#include "CPURegisters.h"

void CPURegisters::setC0Register(Coprocessor0::C0Register rega, uint32_t value) {
// Set the value of the specified c0 register
switch (rega) {
case Coprocessor0::STATUS:
reg[rega] = value;
break;
case Coprocessor0::CAUSE:
reg[rega] = value;
break;
case Coprocessor0::BAD_ADDRESS:
reg[rega] = value;
break;
case Coprocessor0::EPC:
reg[rega] = value;
break;
default:
break;
}
}

uint32_t CPURegisters::getC0Register(Coprocessor0::C0Register rega) {
// Returns the value of the specified c0 register
return reg[rega];
}
#include "CPURegisters.h"

0 comments on commit f709d31

Please sign in to comment.