Removing flag for alignment -- fixed at 1024 now

This commit is contained in:
SergioMartin86 2024-02-24 06:49:33 +00:00
parent 129e5e130b
commit 557ef1224b
3 changed files with 5 additions and 14 deletions

View File

@ -26,11 +26,3 @@ option('onlyOpenSource',
yield: true
)
option('CPUFunctionAlignment',
type : 'integer',
min : 1,
value : 1024,
description : '''Indicates the alignment for the main emulator CPU function.
This is a large function that may cross page boundaries, which impacts performance.
This requires the GNU compiler to work.'''
)

View File

@ -222,8 +222,10 @@ uint8_t clock_table [256] = {
3,5,2,8,4,4,6,6,2,4,2,7,4,4,7,7 // F
};
__attribute__((optimize("align-functions=" _QUICKERNES_CPU_FUNCTION_ALIGNMENT)))
// This optimization is only possible on linux systems -- MSVC does not allow function alignment
#ifdef __linux__
__attribute__((optimize("align-functions=1024")))
#endif
Cpu::result_t Cpu::run ( nes_time_t end )
{
set_end_time_( end );

View File

@ -28,13 +28,10 @@ quickerNESSrc = quickerNESAPUSrc + quickerNESPPUSrc + [
'core/cpu.cpp'
]
# Getting page alignment option
CPUFunctionAlignment = get_option('CPUFunctionAlignment')
# quickerNES Core Configuration
quickerNESDependency = declare_dependency(
compile_args : [ '-D_QUICKERNES_CPU_FUNCTION_ALIGNMENT="' + CPUFunctionAlignment.to_string() + '"'],
compile_args : [ ],
include_directories : include_directories(['.']),
sources : [ quickerNESSrc ]
)