From 9d5e652fbd1c2c173bb72b402d6e39a9960dc606 Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Tue, 16 Nov 2021 11:25:57 -0800 Subject: [PATCH] kern: be a little more consistent about pragma GCC location --- .../source/arch/arm64/svc/kern_svc_tables.cpp | 2 +- libraries/libmesosphere/source/kern_k_scheduler.cpp | 10 +++++----- .../libmesosphere/source/kern_k_server_session.cpp | 10 +++++----- libraries/libmesosphere/source/svc/kern_svc_ipc.cpp | 10 +++++----- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/libraries/libmesosphere/source/arch/arm64/svc/kern_svc_tables.cpp b/libraries/libmesosphere/source/arch/arm64/svc/kern_svc_tables.cpp index 4f817f7f4..aec27c4ba 100644 --- a/libraries/libmesosphere/source/arch/arm64/svc/kern_svc_tables.cpp +++ b/libraries/libmesosphere/source/arch/arm64/svc/kern_svc_tables.cpp @@ -59,7 +59,7 @@ namespace ams::kern::svc { /* Set omit-frame-pointer to prevent GCC from emitting MOV X29, SP instructions. */ #pragma GCC push_options - #pragma GCC optimize ("-O2") + #pragma GCC optimize ("-O3") #pragma GCC optimize ("omit-frame-pointer") AMS_SVC_FOREACH_KERN_DEFINITION(DECLARE_SVC_STRUCT, _) diff --git a/libraries/libmesosphere/source/kern_k_scheduler.cpp b/libraries/libmesosphere/source/kern_k_scheduler.cpp index e8e228b1c..df9ec681f 100644 --- a/libraries/libmesosphere/source/kern_k_scheduler.cpp +++ b/libraries/libmesosphere/source/kern_k_scheduler.cpp @@ -15,10 +15,10 @@ */ #include -namespace ams::kern { +#pragma GCC push_options +#pragma GCC optimize ("-O3") - #pragma GCC push_options - #pragma GCC optimize ("-O3") +namespace ams::kern { bool KScheduler::s_scheduler_update_needed; KScheduler::LockType KScheduler::s_scheduler_lock; @@ -598,6 +598,6 @@ namespace ams::kern { } } - #pragma GCC pop_options - } + +#pragma GCC pop_options diff --git a/libraries/libmesosphere/source/kern_k_server_session.cpp b/libraries/libmesosphere/source/kern_k_server_session.cpp index ceb0b3a12..20ffd03f8 100644 --- a/libraries/libmesosphere/source/kern_k_server_session.cpp +++ b/libraries/libmesosphere/source/kern_k_server_session.cpp @@ -15,10 +15,10 @@ */ #include -namespace ams::kern { +#pragma GCC push_options +#pragma GCC optimize ("-O3") - #pragma GCC push_options - #pragma GCC optimize ("-O3") +namespace ams::kern { namespace ipc { @@ -1385,8 +1385,6 @@ namespace ams::kern { this->NotifyAvailable(svc::ResultSessionClosed()); } - #pragma GCC pop_options - void KServerSession::Dump() { MESOSPHERE_ASSERT_THIS(); @@ -1420,3 +1418,5 @@ namespace ams::kern { } } + +#pragma GCC pop_options diff --git a/libraries/libmesosphere/source/svc/kern_svc_ipc.cpp b/libraries/libmesosphere/source/svc/kern_svc_ipc.cpp index b7b86f9cd..3a7af46ae 100644 --- a/libraries/libmesosphere/source/svc/kern_svc_ipc.cpp +++ b/libraries/libmesosphere/source/svc/kern_svc_ipc.cpp @@ -15,10 +15,10 @@ */ #include -namespace ams::kern::svc { +#pragma GCC push_options +#pragma GCC optimize ("-O3") - #pragma GCC push_options - #pragma GCC optimize ("-O3") +namespace ams::kern::svc { /* ============================= Common ============================= */ @@ -315,6 +315,6 @@ namespace ams::kern::svc { return ReplyAndReceiveWithUserBuffer(out_index, message_buffer, message_buffer_size, handles, num_handles, reply_target, timeout_ns); } - #pragma GCC pop_options - } + +#pragma GCC pop_options