xenia-project/xenia

DIV_I32 and others don't handle INT_MIN / -1

Aperta

#1085 aperta il 12 feb 2018

 (2 commenti) (5 reazioni) (0 assegnatari)C++ (1077 fork)batch import
cpugood first issue

Metriche repository

Star
 (7418 stelle)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

https://github.com/benvanik/xenia/blob/190108dab6732d9db5c8595e1358b7b034cb5a14/src/xenia/cpu/backend/x64/x64_sequences.cc#L4332

It was pointed out to me that x86 will raise an exception when dividing INT_MIN by -1. I haven't encountered any games doing this yet - but it could potentially be an issue.

According to PowerPC docs, the output is undefined if this condition occurs.

Could be worth investigating if you're a new contributor.

Guida contributor