From 142b92b883b3d7bb3712634fa9c6c004c179c8ff Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Tue, 9 May 2017 15:48:36 -0400 Subject: [PATCH] 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 --- src/command.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/command.h b/src/command.h index c6d8a69c..180031e5 100644 --- a/src/command.h +++ b/src/command.h @@ -73,7 +73,7 @@ extern const uint32_t command_identify_size; #define _DECL_REQUEST_ID(REQUEST, ID_SECTION) ({ \ static char __PASTE(_DECLS_, __LINE__)[] \ __section(".compile_time_request") = REQUEST; \ - asm volatile("" : : "m"(__PASTE(_DECLS_, __LINE__))); \ + asm volatile("" : : "i"(__PASTE(_DECLS_, __LINE__))); \ static char __PASTE(_DECLI_, __LINE__) \ __section(".compile_time_request." ID_SECTION); \ (size_t)&__PASTE(_DECLI_, __LINE__); })