| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 | #include "sys.h"#include "picorv32.h"#define GP_IS_ZERO 1	// The code in this file is sensitive to alignment, so	// don't use compressed instructions (there are very few anyway)	.option norvc	// The linker ensures that section .init is first	.section ".init.reset","ax"	.globl _reset_reset:	rdtime s0		// Record timer at reset	li sp,STACK_TOP		// Cheaper than using la sp,___stack_top	j __start	.type _reset, @function	.size _reset, . - _reset	.section ".init","ax"	.globl __start__start:	not t0,zero	maskirq zero,t0,zero#if !GP_IS_ZERO	.option push	.option norelax		// Can't make gp references to set up gp...	la gp, __global_pointer$	.option pop#else	// Zero gp (linker will usually replace with the zero reg)	li gp,0#endif	addqxi gp,gp,0		// Set gp for interrupt code too	// Clear bss	la a0,__BSS_START__	la a1,__BSS_END__.L_clear_bss_loop:	sw zero,(a0)	sw zero,4(a0)	sw zero,8(a0)	sw zero,12(a0)	sw zero,16(a0)	sw zero,20(a0)	sw zero,24(a0)	sw zero,28(a0)	addi a0,a0,32	bltu a0,a1,.L_clear_bss_loop	sw s0, time_zero, t0	j main	.type __start, @function	.size __start, . - __start	.pushsection ".sbss","a"	.balign 4	.globl time_zerotime_zero:	.space 4	.type time_zero, @object	.size time_zero, . - time_zero	.popsection	.section ".stack","aw",@nobits	.balign 4	.globl ___stack_bottom___stack:	.space STACK_SIZE	.type ___stack, @object	.size ___stack, STACK_SIZE	.globl ___stack_top___stack_top:
 |