lib: simplify pragma macros
This commit is contained in:
1 parent
edf80192d9
commit
18168d54c3
6 files changed
+9
-14
No files matched your search
@@ -20,8 +20,7 @@
|
||||
#define AMS_PRAGMA(X) \
|
||||
_Pragma(#X)
|
||||
|
||||
#define AMS_PRAGMA_BEGIN_OPTIMIZE_O3()
|
||||
#define AMS_PRAGMA_BEGIN_OPTIMIZE_OS()
|
||||
#define AMS_PRAGMA_BEGIN_OPTIMIZE(X)
|
||||
#define AMS_PRAGMA_END_OPTIMIZE()
|
||||
|
||||
#define AMS_PRAGMA_BEGIN_PACK(n) \
|
||||
|
||||
@@ -20,16 +20,12 @@
|
||||
#define AMS_PRAGMA(X) \
|
||||
_Pragma(#X)
|
||||
|
||||
#define AMS_PRAGMA_BEGIN_OPTIMIZE_O3() \
|
||||
_Pragma("GCC push_options") \
|
||||
_Pragma("GCC optimize (\"-O3\")")
|
||||
|
||||
#define AMS_PRAGMA_BEGIN_OPTIMIZE_OS() \
|
||||
_Pragma("GCC push_options") \
|
||||
_Pragma("GCC optimize (\"-Os\")")
|
||||
#define AMS_PRAGMA_BEGIN_OPTIMIZE(X) \
|
||||
AMS_PRAGMA(GCC push_options) \
|
||||
AMS_PRAGMA(GCC optimize(X))
|
||||
|
||||
#define AMS_PRAGMA_END_OPTIMIZE() \
|
||||
_Pragma("GCC pop_options")
|
||||
AMS_PRAGMA(GCC pop_options)
|
||||
|
||||
#define AMS_PRAGMA_BEGIN_PACK(n) \
|
||||
AMS_PRAGMA(pack(push, n))
|
||||
|
||||
Reference in new issue
Block a user