-
Notifications
You must be signed in to change notification settings - Fork 46
Description
Is there a compiler configuration option I don't know about for PAE kernels? I'm running GSplus on a 32-bit Debian kernel, specifically 5.10.0-35-686-pae which is part of the Raspberry Pi Desktop. Note, the machine is not an actual Pi, just an i686 netbook. After compiling the 0.14 source as-is, I got a strange runtime error at the terminal when attempting to start:
CHECK: eptr->fcycles is 0x4, but ENGINE_FCYCLES is 0x8
Apparently this constant is from the src/defcomm.h header file, particularly the block concerning "PA RISC asm" constants. Changing the ENGINE_FCYCLES to 0x4 fixed that error, but advanced to a similar runtime error after recompiling. As I replaced the constants with the error-reported values, it became apparent lines 56-66 were not the values my system wanted. Long story short, I replaced the block with the following values, recompiled, and GSplus finally started properly:
#define ENGINE_FPLUS_PTR 0x00
#define ENGINE_FCYCLES 0x04
#define ENGINE_REG_KPC 0xc
#define ENGINE_REG_ACC 0x10
#define ENGINE_REG_XREG 0x14
#define ENGINE_REG_YREG 0x18
#define ENGINE_REG_STACK 0x1c
#define ENGINE_REG_DBANK 0x20
#define ENGINE_REG_DIRECT 0x24
#define ENGINE_REG_PSR 0x28
#define ENGINE_FLAGS 0x2c
Out of curiosity, I tested this on a VirtualBox 32-bit machine, same kernel, with the same problems and changing the values in defcomm.h also resolved the issue. Not that too many folks out there are using 32-bit systems anymore, so maybe it's not a big issue for the great lot of us, but still.
Other than hacking the code like this, is there a way to "educate" the compiler about the correct values?