Ares does not build on Linux and possibly other systems
To Reproduce
Pull the latest commits, run make:
In file included from ../ares/n64/cpu/cpu.cpp:13:
../ares/n64/cpu/interpreter.cpp: In member function ‘void ares::Nintendo64::CPU::decoderEXECUTE(u32)’:
../ares/n64/cpu/interpreter.cpp:6:81: error: expected primary-expression before ‘)’ token
6 | #define jp(id, name, ...) case id: return decoder##name(instruction, __VA_ARGS__)
| ^
../ares/n64/cpu/interpreter.cpp:23:3: note: in expansion of macro ‘jp’
23 | jp(0x00, SPECIAL);
| ^~
../ares/n64/cpu/interpreter.cpp:6:81: error: expected primary-expression before ‘)’ token
6 | #define jp(id, name, ...) case id: return decoder##name(instruction, __VA_ARGS__)
| ^
../ares/n64/cpu/interpreter.cpp:24:3: note: in expansion of macro ‘jp’
24 | jp(0x01, REGIMM);
| ^~
../ares/n64/cpu/interpreter.cpp:6:81: error: expected primary-expression before ‘)’ token
6 | #define jp(id, name, ...) case id: return decoder##name(instruction, __VA_ARGS__)
| ^
../ares/n64/cpu/interpreter.cpp:39:3: note: in expansion of macro ‘jp’
39 | jp(0x10, SCC);
| ^~
../ares/n64/cpu/interpreter.cpp:6:81: error: expected primary-expression before ‘)’ token
6 | #define jp(id, name, ...) case id: return decoder##name(instruction, __VA_ARGS__)
| ^
../ares/n64/cpu/interpreter.cpp:40:3: note: in expansion of macro ‘jp’
40 | jp(0x11, FPU);
| ^~
../ares/n64/cpu/interpreter.cpp:6:81: error: expected primary-expression before ‘)’ token
6 | #define jp(id, name, ...) case id: return decoder##name(instruction, __VA_ARGS__)
| ^
../ares/n64/cpu/interpreter.cpp:41:3: note: in expansion of macro ‘jp’
41 | jp(0x12, COP2);
| ^~
../ares/n64/cpu/interpreter.cpp:6:81: error: expected primary-expression before ‘)’ token
6 | #define jp(id, name, ...) case id: return decoder##name(instruction, __VA_ARGS__)
| ^
../ares/n64/cpu/interpreter.cpp:73:3: note: in expansion of macro ‘jp’
73 | jp(0x32, COP2); //LWC2
| ^~
../ares/n64/cpu/interpreter.cpp:6:81: error: expected primary-expression before ‘)’ token
6 | #define jp(id, name, ...) case id: return decoder##name(instruction, __VA_ARGS__)
| ^
../ares/n64/cpu/interpreter.cpp:77:3: note: in expansion of macro ‘jp’
77 | jp(0x36, COP2); //LDC2
| ^~
../ares/n64/cpu/interpreter.cpp:6:81: error: expected primary-expression before ‘)’ token
6 | #define jp(id, name, ...) case id: return decoder##name(instruction, __VA_ARGS__)
| ^
../ares/n64/cpu/interpreter.cpp:81:3: note: in expansion of macro ‘jp’
81 | jp(0x3a, COP2); //SWC2
| ^~
../ares/n64/cpu/interpreter.cpp:6:81: error: expected primary-expression before ‘)’ token
6 | #define jp(id, name, ...) case id: return decoder##name(instruction, __VA_ARGS__)
| ^
../ares/n64/cpu/interpreter.cpp:85:3: note: in expansion of macro ‘jp’
85 | jp(0x3e, COP2); //SDC2
| ^~
make[1]: *** [../nall/GNUmakefile:378: obj/ares-n64-cpu.o] Error 1
make[1]: Leaving directory '/usr/local/src/ares/desktop-ui'
make: *** [GNUmakefile:4: all] Error 2
Expected behavior
Ares should build.
Additional context
I ran a git bisect and the results are as follows:
12f0d04709d8e7b811c75739d113ef9fbd111bc6 is the first bad commit
commit 12f0d04709d8e7b811c75739d113ef9fbd111bc6
Author: invertego <invertego@users.noreply.github.com>
Date: Thu Aug 22 00:25:04 2024 -0700
n64: remove branch state machine from epilogue (#1598)
This will bloat generated code in the short term, but some of that can
be elided with future optimizations.
Passes [n64-systemtest](https://github.com/lemmy-64/n64-systemtest) with
both the interpreter and recompiler.
---------
Co-authored-by: Giovanni Bajo <rasky@develer.com>
ares/n64/cpu/cpu.cpp | 30 ++++--------
ares/n64/cpu/cpu.hpp | 77 ++++++++++++++-----------------
ares/n64/cpu/debugger.cpp | 4 +-
ares/n64/cpu/exceptions.cpp | 8 ++--
ares/n64/cpu/interpreter-fpu.cpp | 6 +--
ares/n64/cpu/interpreter-ipu.cpp | 91 ++++++++++++++++++-------------------
ares/n64/cpu/interpreter-scc.cpp | 6 +--
ares/n64/cpu/interpreter.cpp | 16 +++----
ares/n64/cpu/recompiler.cpp | 21 +++++++--
ares/n64/cpu/serialization.cpp | 9 ++--
ares/n64/system/system.cpp | 4 +-
ares/n64/system/system.hpp | 2 +-
nall/intrinsics.hpp | 2 +
nall/recompiler/generic/generic.hpp | 4 +-
14 files changed, 132 insertions(+), 148 deletions(-)
Describe the bug
Ares does not build on Linux and possibly other systems
To Reproduce
Pull the latest commits, run make:
Expected behavior
Ares should build.
Additional context
I ran a git bisect and the results are as follows: