1
0
Fork 0
mirror of https://github.com/Atmosphere-NX/Atmosphere.git synced 2024-12-22 10:22:08 +00:00

kern: tweak optimization settings for hot paths

This commit is contained in:
Michael Scire 2020-12-02 03:39:07 -08:00 committed by SciresM
parent 390bdc7b6b
commit 726d7b6e4d
9 changed files with 9 additions and 6 deletions

View file

@ -59,6 +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 ("omit-frame-pointer")
AMS_SVC_FOREACH_KERN_DEFINITION(DECLARE_SVC_STRUCT, _)

View file

@ -3055,7 +3055,7 @@ namespace ams::kern {
}
#pragma GCC push_options
#pragma GCC optimize ("-O2")
#pragma GCC optimize ("-O3")
Result KPageTableBase::SetupForIpcClient(PageLinkedList *page_list, size_t *out_blocks_needed, KProcessAddress address, size_t size, KMemoryPermission test_perm, KMemoryState dst_state) {
/* Validate pre-conditions. */

View file

@ -18,7 +18,7 @@
namespace ams::kern {
#pragma GCC push_options
#pragma GCC optimize ("-O2")
#pragma GCC optimize ("-O3")
namespace ipc {

View file

@ -18,7 +18,7 @@
namespace ams::kern::svc {
#pragma GCC push_options
#pragma GCC optimize ("-O2")
#pragma GCC optimize ("-O3")
/* ============================= Common ============================= */

View file

@ -528,6 +528,7 @@ namespace ams::svc::codegen::impl {
/* Set omit-frame-pointer to prevent GCC from emitting MOV X29, SP instructions. */
#pragma GCC push_options
#pragma GCC optimize ("-O2")
#pragma GCC optimize ("omit-frame-pointer")
static ALWAYS_INLINE ReturnType WrapSvcFunction() {

View file

@ -29,6 +29,7 @@ namespace ams::svc::codegen {
public:
/* Set omit-frame-pointer to prevent GCC from emitting MOV X29, SP instructions. */
#pragma GCC push_options
#pragma GCC optimize ("-O2")
#pragma GCC optimize ("omit-frame-pointer")
static ALWAYS_INLINE void Call64() {

View file

@ -20,7 +20,7 @@
namespace ams::svc::ipc {
#pragma GCC push_options
#pragma GCC optimize ("-O2")
#pragma GCC optimize ("-O3")
ALWAYS_INLINE u32 *GetMessageBuffer() {
return GetThreadLocalRegion()->message_buffer;

View file

@ -22,7 +22,7 @@
namespace ams::util {
#pragma GCC push_options
#pragma GCC optimize ("-O2")
#pragma GCC optimize ("-O3")
/* Forward declare implementation class for Node. */
namespace impl {

View file

@ -23,7 +23,7 @@
namespace ams::util {
#pragma GCC push_options
#pragma GCC optimize ("-O2")
#pragma GCC optimize ("-O3")
namespace impl {