diff options
author | Clifford Wolf <clifford@clifford.at> | 2019-09-12 10:48:14 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2019-09-12 10:50:45 +0200 |
commit | 392ee1dd91fc637b48b6fc778fc838ec11633ec7 (patch) | |
tree | a611f6ba0d7767395d55032c06fd2c354d4441b2 /firmware/start.S | |
parent | 3bb692a9545eddfb3538fda32ac8d3f7b4f4f544 (diff) | |
download | picorv32-392ee1dd91fc637b48b6fc778fc838ec11633ec7.tar.gz picorv32-392ee1dd91fc637b48b6fc778fc838ec11633ec7.zip |
Improve test firmware, increase testbench memory size to 128kB
Signed-off-by: Clifford Wolf <clifford@clifford.at>
Diffstat (limited to 'firmware/start.S')
-rw-r--r-- | firmware/start.S | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/firmware/start.S b/firmware/start.S index 06d4744..d95f04c 100644 --- a/firmware/start.S +++ b/firmware/start.S @@ -6,6 +6,7 @@ // means. #define ENABLE_QREGS +#define ENABLE_HELLO #define ENABLE_RVTST #define ENABLE_SIEVE #define ENABLE_MULTST @@ -24,12 +25,17 @@ .section .text .global irq + .global hello .global sieve .global multest .global hard_mul .global hard_mulh .global hard_mulhsu .global hard_mulhu + .global hard_div + .global hard_divu + .global hard_rem + .global hard_remu .global stats reset_vec: @@ -372,6 +378,14 @@ start: addi x30, zero, 0 addi x31, zero, 0 +#ifdef ENABLE_HELLO + /* set stack pointer */ + lui sp,(128*1024)>>12 + + /* call hello C code */ + jal ra,hello +#endif + /* running tests from riscv-tests */ #ifdef ENABLE_RVTST @@ -443,7 +457,7 @@ start: TEST(simple) /* set stack pointer */ - lui sp,(64*1024)>>12 + lui sp,(128*1024)>>12 /* set gp and tp */ lui gp, %hi(0xdeadbeef) @@ -505,3 +519,19 @@ hard_mulhu: mulhu a0, a0, a1 ret +hard_div: + div a0, a0, a1 + ret + +hard_divu: + divu a0, a0, a1 + ret + +hard_rem: + rem a0, a0, a1 + ret + +hard_remu: + remu a0, a0, a1 + ret + |