picorv32/dhrystone/start.S

52 lines
738 B
ArmAsm
Raw Normal View History

2015-06-06 08:01:37 -04:00
.section .text
.global start
.global main
start:
/* print "START\n" */
lui a0,0x10000000>>12
addi a1,zero,'S'
addi a2,zero,'T'
addi a3,zero,'A'
addi a4,zero,'R'
addi a5,zero,'\n'
sw a1,0(a0)
sw a2,0(a0)
sw a3,0(a0)
sw a4,0(a0)
sw a2,0(a0)
sw a5,0(a0)
2015-06-07 02:28:10 -04:00
/* execute some insns for "make timing" */
lui a0,0
auipc a0,0
slli a0,a0,0
slli a0,a0,31
addi a1,zero,0
sll a0,a0,a1
addi a1,zero,31
sll a0,a0,a1
2015-06-06 08:01:37 -04:00
/* set stack pointer */
lui sp,(64*1024)>>12
/* jump to main C code */
jal ra,main
/* print "DONE\n" */
lui a0,0x10000000>>12
addi a1,zero,'D'
addi a2,zero,'O'
addi a3,zero,'N'
addi a4,zero,'E'
addi a5,zero,'\n'
sw a1,0(a0)
sw a2,0(a0)
sw a3,0(a0)
sw a4,0(a0)
sw a5,0(a0)
/* trap */
ebreak
2015-06-06 08:01:37 -04:00