Fix #ifdef hell
With more supported architectures and optional features that are controlled by ifdef preprocessor directives, it is already apparent that the code will soon become difficult to maintain.
Therefore, #ifdef
directives and similar need to be moved or removed from the main code path to maintain a high code quality.
There are several options:
- Move optional features and processor architectures to dedicated files. This could be good idea for other architectures but may not be useful for optional features that are more intricate and woven into the main code path and multiple points.
- For optional features, a runtime option may be preferred, accepting a performance hit due to the additional jmp instructions when testing for a feature. This needs to be evaluated.
Please add other ideas in this issue