command: Use "i" instead of "m" constraint in _DECL_REQUEST_ID

On some architectures, gcc will allocate a register for inline
assembler with an "m" constraint.  Use "i" to avoid that.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2017-05-09 15:48:36 -04:00
parent c292006421
commit 142b92b883
1 changed files with 1 additions and 1 deletions

View File

@ -73,7 +73,7 @@ extern const uint32_t command_identify_size;
#define _DECL_REQUEST_ID(REQUEST, ID_SECTION) ({ \ #define _DECL_REQUEST_ID(REQUEST, ID_SECTION) ({ \
static char __PASTE(_DECLS_, __LINE__)[] \ static char __PASTE(_DECLS_, __LINE__)[] \
__section(".compile_time_request") = REQUEST; \ __section(".compile_time_request") = REQUEST; \
asm volatile("" : : "m"(__PASTE(_DECLS_, __LINE__))); \ asm volatile("" : : "i"(__PASTE(_DECLS_, __LINE__))); \
static char __PASTE(_DECLI_, __LINE__) \ static char __PASTE(_DECLI_, __LINE__) \
__section(".compile_time_request." ID_SECTION); \ __section(".compile_time_request." ID_SECTION); \
(size_t)&__PASTE(_DECLI_, __LINE__); }) (size_t)&__PASTE(_DECLI_, __LINE__); })