Skip to content

Commit

Permalink
Mabe fixed?
Browse files Browse the repository at this point in the history
  • Loading branch information
Cherrytree56567 committed Oct 20, 2023
1 parent 0c9eea6 commit 93b8ae6
Show file tree
Hide file tree
Showing 11 changed files with 4 additions and 11 deletions.
11 changes: 3 additions & 8 deletions PSEMU/CPU.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -564,16 +564,11 @@ void CPU::op_mtc0(Instruction instruction) {
}

void CPU::branch(uint32_t offset) {
// Offset immediates are always shifted two places to the
// right since `PC` addresses have to be aligned on 32bits at
// all times.
uint32_t offseta = offset << 2;
offset <<= 2;

pc = pc + offseta;
next_pc = pc + offset;

// We need to compensate for the hardcoded
// `pc.wrapping_add(4)` in `run_next_instruction`
pc = pc - 4;
brancha = true;
}

void CPU::op_bne(Instruction instruction) {
Expand Down
Binary file modified PSEMU/x64/Debug/CPU.obj
Binary file not shown.
Binary file modified PSEMU/x64/Debug/PSEMU.ilk
Binary file not shown.
4 changes: 1 addition & 3 deletions PSEMU/x64/Debug/PSEMU.log
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
 CPU.cpp
C:\Users\ronit\Desktop\PSEMU\PSEMU\CPU.cpp(836,55): warning C4554: '&': check operator precedence for possible error; use parentheses to clarify precedence
PSEMU.cpp
Generating Code...
C:\Users\ronit\Desktop\PSEMU\PSEMU\CPU.cpp(831,55): warning C4554: '&': check operator precedence for possible error; use parentheses to clarify precedence
PSEMU.vcxproj -> C:\Users\ronit\Desktop\PSEMU\x64\Debug\PSEMU.exe
Binary file modified PSEMU/x64/Debug/PSEMU.tlog/CL.command.1.tlog
Binary file not shown.
Binary file modified PSEMU/x64/Debug/PSEMU.tlog/CL.read.1.tlog
Binary file not shown.
Binary file modified PSEMU/x64/Debug/PSEMU.tlog/CL.write.1.tlog
Binary file not shown.
Binary file modified PSEMU/x64/Debug/vc143.idb
Binary file not shown.
Binary file modified PSEMU/x64/Debug/vc143.pdb
Binary file not shown.
Binary file modified x64/Debug/PSEMU.exe
Binary file not shown.
Binary file modified x64/Debug/PSEMU.pdb
Binary file not shown.

0 comments on commit 93b8ae6

Please sign in to comment.