dingusdev
3b3634bf5f
Continued cleanup for bcl
2024-03-08 19:28:51 -07:00
dingusdev
daeecbe99e
Clean-up bc and bcl
...
Using templating to make the code a touch more readable
2024-03-08 19:22:25 -07:00
dingusdev
eb07a3c2f1
Templating bclr to match with bcctr
2024-03-07 20:44:36 -07:00
joevt
e1d43b8eb2
ppcopcodes: Cleanup branch instructions.
2024-03-07 06:56:37 -07:00
joevt
67bd47f11f
ppcopcodes: Fixes for bcctr(l)?.
...
Add MPC601 variants. Variants that decrement and test the ctr are invalid bon't don't appear to trigger an exception. The manual says MPC601 can decrement the counter. Other CPUs do not decrement the counter but will branch based on the value.
2024-03-07 06:55:54 -07:00
dingusdev
c9aed600b6
More opcode clean-up
2024-03-02 07:57:15 -07:00
dingusdev
2b3cf58b8a
Continued clean-up
2024-03-01 19:40:46 -07:00
dingusdev
ebac8b92ba
Clean-up for loading instructions
...
Expanding the scope of the clean-up from lscbx to other loading/storing instructions.
2024-03-01 07:57:46 -07:00
joevt
fe05b1de12
Fix compiler warnings.
...
Xcode build has compiler warnings involving loss of precision. Remove them by adding type casts. Check results in some cases for overflow.
2024-02-29 18:49:14 -07:00
dingusdev
8e9123bdce
Slightly less clumsy check for compiler
2024-02-21 07:14:21 -07:00
joevt
2ea80b0aab
ppcopcodes: Cleanup.
2024-02-20 01:59:54 +01:00
joevt
5bbf5ee3af
ppcopcodes: Fix divw overflow result.
2024-02-20 01:59:40 +01:00
joevt
748e9c5d86
ppcopcodes: Write protect XER zero bits.
2024-02-20 01:59:01 +01:00
joevt
8764beba39
ppcopcodes: Fix lswx.
...
- Remove invalid form check unless you know for sure it's supposed to cause an exception.
- Add register skip for 601 CPU. This needs testing.
2024-02-20 01:57:00 +01:00
joevt
cf4ce01ddd
ppcopcodes: set DSISR for alignment exception.
2024-02-20 01:22:55 +01:00
dingusdev
29f3ffd474
Continued clean-up, part 2
2024-02-18 07:06:27 -07:00
dingusdev
b160e38f8f
Continued code clean-up
2024-02-16 06:55:13 -07:00
dingusdev
38d94e509f
Further code cleanup
2024-02-14 22:19:08 -07:00
dingusdev
ec23a532f6
Minor clean-up for branching instructions
2024-02-12 20:59:04 -07:00
joevt
d0b0b8070c
ppcopcodes: Fix l*ux? invalid form check.
...
Invalid form is (reg_a == reg_d) || reg_a == 0.
Therefore, valid form is (reg_a != reg_d) && reg_a != 0
!(a || b) == !a && !b
2024-02-11 07:41:13 -07:00
joevt
ff895aa8a4
ppcfpopcodes: Remove some globals.
...
ppc_result64_d and ppc_dblresult64_d don't need to be globals. The rest are unused.
2024-02-10 13:56:07 -07:00
joevt
6c49b87a06
ppcopcodes: Fix rlwnm when shift > 31.
2024-02-10 12:54:41 -07:00
joevt
29e5bbdcc0
ppcopcodes: Fix divw.
2024-02-10 12:54:12 -07:00
dingusdev
52dfc0cf93
Slightly faster typecasting
2024-01-31 08:06:33 -07:00
joevt
bf425884fb
ppcopcodes: Add ppc_grab_dab.
...
For instructions that don't use the general purpose registers.
2024-01-19 12:09:24 +01:00
joevt
4430fd89a9
ppcopcodes: Fix subfic.
2024-01-19 12:00:55 +01:00
dingusdev
a0b1d6394a
Another revert
...
This affects Virtus VR - With the lmw checks, the opening sign doesn't display and the intro crashes sooner
2024-01-07 17:45:05 -07:00
dingusdev
c6af1e31fe
Partial revert of previous commit
2024-01-07 17:21:11 -07:00
dingusdev
a5ce6a806f
CPU clean-up
2024-01-07 17:04:51 -07:00
dingusdev
a59475af1c
Further lha(*) fixes
2024-01-05 19:10:05 -07:00
dingusdev
1cc1ac2e68
Fixing lha(*) opcodes
2024-01-05 17:19:03 -07:00
dingusdev
f3a759c80d
CPU code clean-up
2024-01-05 15:11:37 -07:00
Maxim Poliakovski
cb85d358d1
Remove unused globals.
2024-01-02 17:51:12 +01:00
Maxim Poliakovski
5b114c2412
ppcopcodes: refactor mtcrf emulation.
2024-01-02 17:44:35 +01:00
Maxim Poliakovski
593508df22
Refactor subfze.
2024-01-02 13:44:56 +01:00
joevt
1f3505f371
ppcopcodes: Fix subfze.
2024-01-02 13:44:13 +01:00
Maxim Poliakovski
fef5bde0c7
Refactor recent subfme fix.
2023-12-24 02:56:47 +01:00
joevt
dc00879419
ppcopcodes: Fix subfme.
2023-12-24 02:36:34 +01:00
joevt
0a8c1df968
ppcopcodes: Fix sraw.
2023-12-19 16:30:02 +01:00
joevt
4c49558120
ppcopcodes: Fix subfe.
2023-12-19 14:57:41 +01:00
joevt
7f229b0fe8
ppcfpopcodes: Fix fcmpo/fcmpu.
...
It was always changing CR1 (starting at CR bit 4) instead of the CR selected by crfD.
Also, it was clearing all but the FL,FG,FE,FU bits of FPRF of FPSCR.
2023-12-19 13:15:10 +01:00
Mihai Parparita
e9bc8926ab
Avoid some undefined behavior
...
The `SubOpcode31Grabber[1024] = { ppc_illegalop }` initializer only
populates the first entry with ppc_illegalop (at least on some compilers),
switch to explicitly initializing the entire array with std::fill_n.
Also fix a couple of sign and overflow issues flagged by the Xcode
undefined behavior sanitizer.
2023-12-07 23:59:49 -08:00
dingusdev
dd454689e0
Fixes for condition reg move instructions
2023-11-28 07:06:04 -07:00
dingusdev
7835aec034
Further CPU cleanup
2023-11-21 08:06:50 -07:00
dingusdev
f4f035682c
Fixed cfloat include
2023-11-19 20:34:40 -07:00
dingusdev
d1f9b5631a
Added missing include for cfloat
2023-11-19 20:07:00 -07:00
Mihai Parparita
35c86ad6bf
Clean up #includes
...
Result of running IWYU (https://include-what-you-use.org/ ) and
applying most of the suggestions about unncessary includes and
forward declarations.
Was motivated by observing that <thread> was being included in
ppcopcodes.cpp even though it was unused (found while researching
the use of threads), but seems generally good to help with build
times and correctness.
2023-11-03 00:33:47 -07:00
dingusdev
6ffc2b2f10
Optimize string word instructions
...
Partially unrolled the loop. Boots 7.1.2 Disk Tools slightly faster.
2023-10-29 17:23:31 -07:00
Maxim Poliakovski
6cfde29f00
heathrow: implement native interrupt mode.
2023-09-25 12:22:17 +02:00
Maxim Poliakovski
278799795c
Disable decrementer exceptions for MPC601.
2023-09-18 21:20:59 +02:00