mirror of
https://github.com/Atmosphere-NX/Atmosphere
synced 2024-12-23 04:41:12 +00:00
kern: tweak optimization settings for hot paths
This commit is contained in:
parent
390bdc7b6b
commit
726d7b6e4d
9 changed files with 9 additions and 6 deletions
|
@ -59,6 +59,7 @@ namespace ams::kern::svc {
|
||||||
|
|
||||||
/* Set omit-frame-pointer to prevent GCC from emitting MOV X29, SP instructions. */
|
/* Set omit-frame-pointer to prevent GCC from emitting MOV X29, SP instructions. */
|
||||||
#pragma GCC push_options
|
#pragma GCC push_options
|
||||||
|
#pragma GCC optimize ("-O2")
|
||||||
#pragma GCC optimize ("omit-frame-pointer")
|
#pragma GCC optimize ("omit-frame-pointer")
|
||||||
|
|
||||||
AMS_SVC_FOREACH_KERN_DEFINITION(DECLARE_SVC_STRUCT, _)
|
AMS_SVC_FOREACH_KERN_DEFINITION(DECLARE_SVC_STRUCT, _)
|
||||||
|
|
|
@ -3055,7 +3055,7 @@ namespace ams::kern {
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma GCC push_options
|
#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) {
|
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. */
|
/* Validate pre-conditions. */
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
namespace ams::kern {
|
namespace ams::kern {
|
||||||
|
|
||||||
#pragma GCC push_options
|
#pragma GCC push_options
|
||||||
#pragma GCC optimize ("-O2")
|
#pragma GCC optimize ("-O3")
|
||||||
|
|
||||||
namespace ipc {
|
namespace ipc {
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
namespace ams::kern::svc {
|
namespace ams::kern::svc {
|
||||||
|
|
||||||
#pragma GCC push_options
|
#pragma GCC push_options
|
||||||
#pragma GCC optimize ("-O2")
|
#pragma GCC optimize ("-O3")
|
||||||
|
|
||||||
/* ============================= Common ============================= */
|
/* ============================= Common ============================= */
|
||||||
|
|
||||||
|
|
|
@ -528,6 +528,7 @@ namespace ams::svc::codegen::impl {
|
||||||
|
|
||||||
/* Set omit-frame-pointer to prevent GCC from emitting MOV X29, SP instructions. */
|
/* Set omit-frame-pointer to prevent GCC from emitting MOV X29, SP instructions. */
|
||||||
#pragma GCC push_options
|
#pragma GCC push_options
|
||||||
|
#pragma GCC optimize ("-O2")
|
||||||
#pragma GCC optimize ("omit-frame-pointer")
|
#pragma GCC optimize ("omit-frame-pointer")
|
||||||
|
|
||||||
static ALWAYS_INLINE ReturnType WrapSvcFunction() {
|
static ALWAYS_INLINE ReturnType WrapSvcFunction() {
|
||||||
|
|
|
@ -29,6 +29,7 @@ namespace ams::svc::codegen {
|
||||||
public:
|
public:
|
||||||
/* Set omit-frame-pointer to prevent GCC from emitting MOV X29, SP instructions. */
|
/* Set omit-frame-pointer to prevent GCC from emitting MOV X29, SP instructions. */
|
||||||
#pragma GCC push_options
|
#pragma GCC push_options
|
||||||
|
#pragma GCC optimize ("-O2")
|
||||||
#pragma GCC optimize ("omit-frame-pointer")
|
#pragma GCC optimize ("omit-frame-pointer")
|
||||||
|
|
||||||
static ALWAYS_INLINE void Call64() {
|
static ALWAYS_INLINE void Call64() {
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
namespace ams::svc::ipc {
|
namespace ams::svc::ipc {
|
||||||
|
|
||||||
#pragma GCC push_options
|
#pragma GCC push_options
|
||||||
#pragma GCC optimize ("-O2")
|
#pragma GCC optimize ("-O3")
|
||||||
|
|
||||||
ALWAYS_INLINE u32 *GetMessageBuffer() {
|
ALWAYS_INLINE u32 *GetMessageBuffer() {
|
||||||
return GetThreadLocalRegion()->message_buffer;
|
return GetThreadLocalRegion()->message_buffer;
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
namespace ams::util {
|
namespace ams::util {
|
||||||
|
|
||||||
#pragma GCC push_options
|
#pragma GCC push_options
|
||||||
#pragma GCC optimize ("-O2")
|
#pragma GCC optimize ("-O3")
|
||||||
|
|
||||||
/* Forward declare implementation class for Node. */
|
/* Forward declare implementation class for Node. */
|
||||||
namespace impl {
|
namespace impl {
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
namespace ams::util {
|
namespace ams::util {
|
||||||
|
|
||||||
#pragma GCC push_options
|
#pragma GCC push_options
|
||||||
#pragma GCC optimize ("-O2")
|
#pragma GCC optimize ("-O3")
|
||||||
|
|
||||||
namespace impl {
|
namespace impl {
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue