toolchain/arch: Remove section garbage collection ifdef guards
Section garbage collection is to be always enabled. Note that this does not have any impact on performance measurements of any existing sample project as they all use the default section garbage collection value (enabled). Change-Id: I57baa55dd52d45b633d8ca319e799ef483a5246b Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
This commit is contained in:
parent
743ff6a74e
commit
c2929b4f38
3 changed files with 1 additions and 53 deletions
|
@ -36,16 +36,10 @@
|
|||
#if !defined(_ASMLANGUAGE)
|
||||
#define __section_stringify(x) #x
|
||||
|
||||
#ifdef CONFIG_SECTION_GARBAGE_COLLECTION
|
||||
#define __section(seg, hash, line) \
|
||||
__attribute__((section ("." __section_stringify(seg) \
|
||||
"." __section_stringify(hash) \
|
||||
"." __section_stringify(line))))
|
||||
#else /* !CONFIG_SECTION_GARBAGE_COLLECTION */
|
||||
#define __section(seg, hash, line) \
|
||||
__attribute__((section ("." __section_stringify(seg))))
|
||||
#endif /* !CONFIG_SECTION_GARBAGE_COLLECTION */
|
||||
|
||||
|
||||
#define __noinit __section(NOINIT, _FILE_PATH_HASH, __COUNTER__)
|
||||
|
||||
|
|
|
@ -107,11 +107,7 @@ Macros to abstract compiler capabilities (common to all toolchains).
|
|||
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SECTION_GARBAGE_COLLECTION
|
||||
#define GC_SECTION(sym) SECTION .text.FUNC(sym), "ax"
|
||||
#else
|
||||
#define GC_SECTION(sym) .text
|
||||
#endif
|
||||
#define GC_SECTION(sym) SECTION .text.FUNC(sym), "ax"
|
||||
|
||||
#define BRANCH_LABEL(sym) FUNC(sym):
|
||||
#define VAR(sym) FUNC(sym)
|
||||
|
|
|
@ -194,15 +194,12 @@ A##a:
|
|||
* These macros specify the section in which a given function or variable
|
||||
* resides.
|
||||
*
|
||||
* When garbage collection is enabled:
|
||||
* - SECTION_FUNC allows only one function to reside in a sub-section
|
||||
* - SECTION_SUBSEC_FUNC allows multiple functions to reside in a sub-section
|
||||
* This ensures that garbage collection only discards the section
|
||||
* if all functions in the sub-section are not referenced.
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_SECTION_GARBAGE_COLLECTION
|
||||
|
||||
#if defined(VXMICRO_ARCH_arc)
|
||||
/*
|
||||
* Need to use assembly macros because ';' is interpreted as the start of
|
||||
|
@ -248,45 +245,6 @@ A##a:
|
|||
|
||||
#endif /* VXMICRO_ARCH_arc */
|
||||
|
||||
#else /* !CONFIG_SECTION_GARBAGE_COLLECTION */
|
||||
|
||||
#if defined(VXMICRO_ARCH_arc)
|
||||
/*
|
||||
* Need to use assembly macros because ';' is interpreted as the start of
|
||||
* a single line comment in the ARC assembler.
|
||||
*/
|
||||
|
||||
.macro section_var section, symbol
|
||||
.section .\section
|
||||
FUNC(\symbol):
|
||||
.endm
|
||||
|
||||
.macro section_func section, symbol
|
||||
.section .\section
|
||||
FUNC_CODE()
|
||||
PERFOPT_ALIGN
|
||||
FUNC(\symbol):
|
||||
FUNC_INSTR(\symbol)
|
||||
.endm
|
||||
|
||||
#define SECTION_VAR(sect, sym) section_var sect, sym
|
||||
#define SECTION_FUNC(sect, sym) section_func sect, sym
|
||||
#define SECTION_SUBSEC_FUNC(sect, subsec, sym) section_func sect, sym
|
||||
|
||||
#else /* !VXMICRO_ARCH_arc */
|
||||
|
||||
#define SECTION_VAR(sect, sym) .section .sect; FUNC(sym):
|
||||
#define SECTION_FUNC(sect, sym) \
|
||||
.section .sect; \
|
||||
FUNC_CODE() \
|
||||
PERFOPT_ALIGN; FUNC(sym): \
|
||||
FUNC_INSTR(sym)
|
||||
#define SECTION_SUBSEC_FUNC(sect, subsec, sym) SECTION_FUNC(sect, sym)
|
||||
|
||||
#endif /* VXMICRO_ARCH_arc */
|
||||
|
||||
#endif /* CONFIG_SECTION_GARBAGE_COLLECTION */
|
||||
|
||||
#endif /* _ASMLANGUAGE && !_LINKER */
|
||||
|
||||
#if defined(CONFIG_ARM) && defined(_ASMLANGUAGE)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue