Added ENABLE defines for individual tests

This commit is contained in:
Clifford Wolf 2015-06-27 22:31:24 +02:00
parent 7b17773bfc
commit d0100f72b5
1 changed files with 25 additions and 6 deletions

View File

@ -1,3 +1,8 @@
#define ENABLE_RVTST
#define ENABLE_SIEVE
#define ENABLE_MULTST
#define ENABLE_STATS
.section .text .section .text
.global irq .global irq
.global sieve .global sieve
@ -8,11 +13,19 @@
.global hard_mulhu .global hard_mulhu
.global stats .global stats
#ifdef ENABLE_RVTST
# define TEST(n) \ # define TEST(n) \
.global n; .global n ## _ret; \ .global n; \
addi x1, zero, 1000; \ addi x1, zero, 1000; \
custom0 0,1,0,5; /* timer zero, x1 */ \ custom0 0,1,0,5; /* timer zero, x1 */ \
jal zero,n; n ## _ret: jal zero,n; \
.global n ## _ret; \
n ## _ret:
#else
# define TEST(n) \
.global n ## _ret; \
n ## _ret:
#endif
reset_vec: reset_vec:
custom0 0,0,0,4 // waitirq zero custom0 0,0,0,4 // waitirq zero
@ -227,14 +240,20 @@ start:
/* set stack pointer */ /* set stack pointer */
lui sp,(64*1024)>>12 lui sp,(64*1024)>>12
/* jump to sieve C code */ #ifdef ENABLE_SIEVE
/* call sieve C code */
jal ra,sieve jal ra,sieve
#endif
/* jump to sieve C code */ #ifdef ENABLE_MULTST
/* call sieve C code */
jal ra,multest jal ra,multest
#endif
/* jump to stats C code */ #ifdef ENABLE_STATS
/* call stats C code */
jal ra,stats jal ra,stats
#endif
/* print "DONE\n" */ /* print "DONE\n" */
lui a0,0x10000000>>12 lui a0,0x10000000>>12