Adding 1024-alignment to the cpu run function to prevent it from being split among different pages or L1i lines

This commit is contained in:
Sergio Martin 2024-01-14 09:01:14 +01:00
parent a0062b7002
commit dee398c8f7
2 changed files with 7 additions and 2 deletions

View File

@ -41,7 +41,7 @@ quickerNESCoreSrc = [
# quickerNES Core Configuration
quickerNESCoreDependency = declare_dependency(
compile_args : [ '-Wfatal-errors', '-Wall', '-Werror', '-Wno-multichar', '-D_NES_MAPPER_002' ],
compile_args : [ '-Wfatal-errors', '-Wall', '-Werror', '-Wno-multichar' ],
include_directories : include_directories(['source', 'source/core', 'extern']),
sources : [ quickerNESCoreSrc, 'extern/metrohash128/metrohash128.cpp' ]
)

View File

@ -231,7 +231,11 @@ constexpr uint8_t clock_table [256] = {
3,5,2,8,4,4,6,6,2,4,2,7,4,4,7,7 // F
};
Nes_Cpu::result_t Nes_Cpu::run( nes_time_t end )
#pragma GCC push_options
#pragma GCC optimize ("align-functions=1024")
Nes_Cpu::result_t Nes_Cpu::run ( nes_time_t end )
{
set_end_time_( end );
clock_count = 0;
@ -1177,3 +1181,4 @@ end:
return result;
}
#pragma GCC pop_options