AmigaPorts / ACE

Amiga C Engine
Mozilla Public License 2.0
156 stars 26 forks source link

VBR code is dangerous on CPU with data cache #175

Closed rveilleux closed 1 year ago

rveilleux commented 1 year ago

Hi,

The code to fetch the VBR in system.c is crashing on any CPU with data cache enabled: UWORD pGetVbrCode[] = {0x4e7a, 0x0801, 0x4e73}; This is attempting to execute code which is stored as data. To fix it, add static const, so the compiler will place those constant into code section: static const UWORD pGetVbrCode[] = {0x4e7a, 0x0801, 0x4e73};

(I confirmed it works on WinUAE with data cache emulation, not on a real hardware yet).

tehKaiN commented 1 year ago

nice find! I'll fix this soon