Commit 6b8f92be authored by Evgeniy Paltsev's avatar Evgeniy Paltsev Committed by Maureen Helm
Browse files

app_memdomain: ARC: adjust asembler directives for MWDT toolchain



ARC MWDT assembler has slightly different directives names:
.pushsect instead of .pushsection
.popsect instead of .popsection

Signed-off-by: default avatarEugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
parent cc897a51
Loading
Loading
Loading
Loading
+13 −2
Original line number Diff line number Diff line
@@ -86,13 +86,24 @@ struct z_app_region {
#define Z_PROGBITS_SYM "@"
#endif

#if defined(CONFIG_ARC) && defined(__CCAC__)
/* ARC MWDT assembler has slightly different pushsection/popsection directives
 * names.
 */
#define Z_PUSHSECTION_DIRECTIV		".pushsect"
#define Z_POPSECTION_DIRECTIVE		".popsect"
#else
#define Z_PUSHSECTION_DIRECTIV		".pushsection"
#define Z_POPSECTION_DIRECTIVE		".popsection"
#endif

#define Z_APPMEM_PLACEHOLDER(name) \
	__asm__ ( \
		".pushsection " STRINGIFY(K_APP_DMEM_SECTION(name)) \
		Z_PUSHSECTION_DIRECTIV " " STRINGIFY(K_APP_DMEM_SECTION(name)) \
			",\"aw\"," Z_PROGBITS_SYM "progbits\n\t" \
		".global " STRINGIFY(name) "_placeholder\n\t" \
		STRINGIFY(name) "_placeholder:\n\t" \
		".popsection\n\t")
		Z_POPSECTION_DIRECTIVE "\n\t")

/**
 * @brief Define an application memory partition with linker support