/* */
/* Description: Initialize memory blocks and areas with zero */
/* */
BRS_GLOBAL (brsStartupZeroInitLoop)
BRS_LABEL (brsStartupZeroInitLoop)
/* read ID of actual running Core into Register 16 */
BRS_READ_COREID (r16)
/* Initialize memory sections with zeros */
#if defined (VLINKGEN_ZERO_INIT_BLOCK_COUNT_STARTUP)
# if (VLINKGEN_ZERO_INIT_BLOCK_COUNT_STARTUP > 1uL )
__as1 (mov _vLinkGen_ZeroInitBlocksArrayStartup , r11)
BRS_LABEL (_startup_block_zero_init_start)
__as1 (mov r11 , r12)
__as2 (addi 12 , r11, r11)
__as1 (ld.w 0 [r12], r13) /* get start address */
__as1 (ld.w 4 [r12], r14) /* get end address */
__as1 (ld.w 8 [r12], r15) /* get core ID */
__as1 (cmp r13 , r14) /* check end of table */
___asm (be _startup_block_zero_init_end )
__as1 (cmp r15 , r16) /* compare core ID */
___asm (bne _startup_block_zero_init_start )
BRS_LABEL (_startup_block_zero_init_loop_start)
__as1 (st.w r0 , 0 [r13])
__as2 (addi 4 , r13, r13)
__as1 (cmp r13 , r14) /* compare to end address */
___asm (bh _startup_block_zero_init_loop_start )
___asm (jr _startup_block_zero_init_start )
BRS_LABEL (_startup_block_zero_init_end)
# endif /*VLINKGEN_ZERO_INIT_BLOCK_COUNT_STARTUP>1uL*/ |