1
0
mirror of https://github.com/XProger/OpenLara.git synced 2025-04-21 03:21:51 +02:00

32x fixes (#488)

* 32x: fix reset by adjusting slave irq mask to not block VRES

Otherwise the reset sequence can't complete because always has all irqs
masked.

* 32x: fix a deadlock on some versions of gcc

gcc doesn't know that gFrameIndex can change from irq and some gcc
versions overoptimize to not re-read gFrameIndex.

Alternative is to mark gFrameIndex volatile but that produces
redundant read instructions.
This commit is contained in:
notaz 2024-05-14 00:18:35 +03:00 committed by GitHub
parent 05361d3d37
commit 28ee7ac923
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -776,7 +776,7 @@ sec_start:
mov.l _sec_adapter,r1
mov #0x00,r0
mov.b r0,@(1,r1) /* set int enables (different from primary despite same address!) */
mov #0x0F,r0
mov #0x0D,r0
shll2 r0
shll2 r0
ldc r0,sr /* disallow ints */

View File

@ -204,7 +204,7 @@ int main()
while (1)
{
int32 frame = gFrameIndex;
int32 frame = *(volatile int32 *)&gFrameIndex;
if (frame - fpsFrame >= vsyncRate)
{