RPCS3 / rpcs3

PlayStation 3 emulator and debugger
https://rpcs3.net/
GNU General Public License v2.0
15.33k stars 1.91k forks source link

[Regression] Unsupported instruction BEXTR for AMD FX CPUs #13912

Open Augusto7743 opened 1 year ago

Augusto7743 commented 1 year ago

Quick summary

Hello. Snakeball NPUA80072 run only if using PPU Interpreter. Uploaded 2 logs for PPU interpreter and PPU Recompilter LLVM. With PPU Recompiller LLVM happen an error

F {PPU[0x1000000] Thread (main_thread) [liblv2: 0x00402ac4]} SIG: Thread terminated due to fatal error: Segfault reading location 00000003e004322c at 00007faeac00a58d. Emu Thread Name: 'PPU[0x1000000] main_thread'.

That game not need an powerful cpu. PPU interpreter run with good speed in AMD FX.

Have an nice week.

Details

No response

Attach a log file

log.zip

Attach capture files for visual issues

No response

System configuration

Ubuntu 20.04.6 AMD FX-6300 4 GB DDR3 GT 640

Other details

No response

Nekotekina commented 1 year ago
·E 0:00:10.740877 {PPU[0x1000000] Thread (main_thread) [liblv2: 0x00402ac4]} SIG: Invalid or unsupported instruction (op=0, reg=24, d_size=0, a_size=0x0, i_size=0)
·E 0:00:10.740882 {PPU[0x1000000] Thread (main_thread) [liblv2: 0x00402ac4]} SIG: decode_x64_reg_op(00007faeac00a58d): unsupported opcode: 0x8f6a78103403180100004585f64c8975
Nekotekina commented 1 year ago

Possible workaround in RPCS3 config:

Core:
  Use LLVM CPU: "ivybridge"
AniLeo commented 1 year ago

Can you confirm it's a regression from #13534? I added the Regression tag but we don't have the PR that introduced it yet

Augusto7743 commented 1 year ago

That bug happen before of LLVM update https://github.com/RPCS3/rpcs3/pull/13534

Unhappily in moment not possible for me to test which was the version with regression. uploaded logs using 0.0.21-13534 and 0.0.22-13536 in both windows and linux versions.

Have an nice next week.

logs.zip

AniLeo commented 1 year ago

Probably similar to the root cause of #13807 where a LLVM CPU instruction that we don't support is emitted, if it's not from the recent LLVM update then likely from the previous one

Augusto7743 commented 1 year ago

I need an long free time to figure the build doing that problem. When possible I will post the reply with the version breaking Snakeball =)

Augusto7743 commented 1 year ago

Tested several builds ... 0.0.27-14845 is the last build running correctly Snakeball using PPU LLVM.

0.0.27-14846 Update to LLVM 16 have an bug not being possible run any game in AMD FX (my machine) and was fixed in PR 13738 0.0.27-14922 SPU LLVM: fix bug for AMD FX processors. 0.0.27-14922 happen the bug. Thus here not is possible test between the 2 builds =(

I have noticed an strange behavior in some tests and so was created some logs in zip file. If PPU modules was created using version 0.0.27-14922 and after starting 0.0.27-14922 only creating Snakeball PPU modules the game run correctly. 0.0.27-14922 creating the PPU modules and Snakeball PPU modules the game not load.

Problem related in firmware modules ?

Thus in the zip file have 2 folders "Firmware 4.83' and Firmware 4.90" and in each folder logs with each test task done.

Thanks very much AniLeo and Nekotekina for analyzing the bug. Have an nice next week.

logs.zip

Augusto7743 commented 1 year ago

Tested 0.0.29-15615 not happening that bug ... Snakeball load and start correctly. In my test was as anything related with firmware modules ... well now fixed.

log is 0.0.29-15615

Thanks very much.

RPCS3.zip

elad335 commented 1 year ago

I actually don't think this issue should be closed because I think #14137 fixes it but it is not intended to, it just hides the problem. (not the pr purpose)

Augusto7743 commented 1 year ago

You are correct ... tested 14140 happen the bug and 14137 the game load correctly. You need logs ?

Nekotekina commented 1 year ago

I'd suggest trying workaround with "ivybridge" CPU (mentioned earlier), although I'm not sure it's compatible.