[RFC,03/19] riscv: Add ENTRY_ALIGN() macro
Checks
Context |
Check |
Description |
dj/TryBot-apply_patch |
success
|
Patch applied to master at the time it was sent
|
Commit Message
From: Christoph Müllner <christoph.muellner@vrull.eu>
This patch adds an ENTRY_ALIGN() macro to generate
aligned function symbols in assembly files.
Since the LEAF() macro is a special-case of that,
we change LEAF() to be reflect this.
Signed-off-by: Christoph Müllner <christoph.muellner@vrull.eu>
---
sysdeps/riscv/sys/asm.h | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
@@ -46,14 +46,18 @@
# endif
#endif
-/* Declare leaf routine. */
-#define LEAF(symbol) \
- .globl symbol; \
- .align 2; \
- .type symbol,@function; \
+/* Define an entry point visible from C with custom p2-alignment. */
+#define ENTRY_ALIGN(symbol, align) \
+ .globl symbol; \
+ .p2align align; \
+ .type symbol,@function; \
C_LABEL(symbol) \
cfi_startproc;
+/* Declare leaf routine. */
+#define LEAF(symbol) \
+ ENTRY_ALIGN (symbol, 1)
+
/* Mark end of function. */
#undef END
#define END(function) \