Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
U
urv-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
2
Merge Requests
2
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
urv-core
Commits
1fba58ce
Commit
1fba58ce
authored
Mar 07, 2018
by
Tristan Gingold
Committed by
Dimitris Lampridis
Mar 19, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
testsuite/isa: fix build.
parent
8efd2565
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
18 additions
and
38 deletions
+18
-38
irq.S
sw/common/irq.S
+1
-1
test-common.c
sw/common/test-common.c
+2
-1
uart.c
sw/common/uart.c
+1
-10
Makefile
sw/testsuite/isa/Makefile
+5
-5
div.S
sw/testsuite/isa/rv32ui/div.S
+3
-3
rem.S
sw/testsuite/isa/rv32ui/rem.S
+3
-3
remu.S
sw/testsuite/isa/rv32ui/remu.S
+3
-3
sb.S
sw/testsuite/isa/rv32ui/sb.S
+0
-6
sh.S
sw/testsuite/isa/rv32ui/sh.S
+0
-6
No files found.
sw/common/irq.S
View file @
1fba58ce
...
...
@@ -113,7 +113,7 @@ jump_table_return:
lw t5,120(a0)
lw t6,124(a0)
lw a0,40(a0)
e
ret
m
ret
.weak undefined_handler
undefined_handler:
...
...
sw/common/test-common.c
View file @
1fba58ce
#include <stdint.h>
#include "pp-printf.h"
void
rv_test_pass
(
int
num
)
{
...
...
@@ -8,4 +9,4 @@ void rv_test_pass(int num)
void
rv_test_fail
(
int
num
)
{
pp_printf
(
"Test %d failed
\n
"
,
num
);
}
\ No newline at end of file
}
sw/common/uart.c
View file @
1fba58ce
...
...
@@ -46,18 +46,10 @@ void uart_init_hw()
}
volatile
int
*
TX_REG
=
0x100000
;
void
putc
(
char
c
)
{
*
TX_REG
=
c
;
}
void
uart_write_byte
(
int
b
)
{
#ifdef SIM
putc
(
b
)
;
*
(
volatile
int
*
)
0x100000
=
b
;
#else
if
(
b
==
'\n'
)
uart_write_byte
(
'\r'
);
...
...
@@ -85,4 +77,3 @@ int puts(const char *s)
while
(
c
=*
s
++
)
uart_write_byte
(
c
);
}
sw/testsuite/isa/Makefile
View file @
1fba58ce
...
...
@@ -20,14 +20,14 @@ default: all
# Build rules
#--------------------------------------------------------------------
RISCV_PREFIX
=
riscv
64-unknown
-elf-
RISCV_PREFIX
=
riscv
32
-elf-
RISCV_GCC
=
$(RISCV_PREFIX)
gcc
ENTROPY
=
-DENTROPY
=
$(
shell
echo
$$$$)
RISCV_GCC_OPTS
=
$(ENTROPY)
-mcmodel
=
medany
-nostartfiles
-fvisibility
=
hidden
-Wa
,-march
=
RV32IM
-DSIM
-I
../../common
RISCV_GCC_OPTS
=
$(ENTROPY)
-mcmodel
=
medany
-nostartfiles
-fvisibility
=
hidden
-Wa
,-march
=
rv32im
-DSIM
-I
../../common
RISCV_OBJDUMP
=
$(RISCV_PREFIX)
objdump
--disassemble-all
--disassemble-zeroes
--section
=
.text
--section
=
.text.startup
--section
=
.text.init
--section
=
.data
RISCV_SIM
=
spike
--extension
=
hwacha
COMMON_SRCS
=
../../common/crt0.S ../../common/irq.S ../../common/
_emulate.o
../../common/test-common.c ../../common/printf.c ../../common/uart.c ../../common/vsprintf-xint.c
COMMON_SRCS
=
../../common/crt0.S ../../common/irq.S ../../common/
emulate.c
../../common/test-common.c ../../common/printf.c ../../common/uart.c ../../common/vsprintf-xint.c
vpath
%.S
$(isa_src_dir)
...
...
@@ -35,7 +35,7 @@ vpath %.S $(isa_src_dir)
# Build assembly tests
%.ram
:
%
riscv64-unknown-elf-
objcopy
-O
binary
$<
tmp.bin
$(RISCV_PREFIX)
objcopy
-O
binary
$<
tmp.bin
../../genraminit tmp.bin 16384
>
$@
%.dump
:
%
...
...
@@ -64,7 +64,7 @@ tests += $$($(1)_tests)
endef
$(eval
$(call
compile_template,rv32ui,
-m32
))
$(eval
$(call
compile_template,rv32ui,))
tests_dump
=
$
(
addsuffix .dump,
$(tests)
)
tests_ram
=
$
(
addsuffix .ram,
$(tests)
)
...
...
sw/testsuite/isa/rv32ui/div.S
View file @
1fba58ce
...
...
@@ -22,10 +22,10 @@ RVTEST_CODE_BEGIN
TEST_RR_OP( 4, div, -3, 20, -6 );
TEST_RR_OP( 5, div, 3, -20, -6 );
TEST_RR_OP( 6, div, -1<<
63, -1<<63
, 1 );
TEST_RR_OP( 7, div, -1<<
63, -1<<63
, -1 );
TEST_RR_OP( 6, div, -1<<
31, -1<<31
, 1 );
TEST_RR_OP( 7, div, -1<<
31, -1<<31
, -1 );
TEST_RR_OP( 8, div, -1, -1<<
63
, 0 );
TEST_RR_OP( 8, div, -1, -1<<
31
, 0 );
TEST_RR_OP( 9, div, -1, 1, 0 );
TEST_RR_OP(10, div, -1, 0, 0 );
...
...
sw/testsuite/isa/rv32ui/rem.S
View file @
1fba58ce
...
...
@@ -22,10 +22,10 @@ RVTEST_CODE_BEGIN
TEST_RR_OP( 4, rem, 2, 20, -6 );
TEST_RR_OP( 5, rem, -2, -20, -6 );
TEST_RR_OP( 6, rem, 0, -1<<
63
, 1 );
TEST_RR_OP( 7, rem, 0, -1<<
63
, -1 );
TEST_RR_OP( 6, rem, 0, -1<<
31
, 1 );
TEST_RR_OP( 7, rem, 0, -1<<
31
, -1 );
TEST_RR_OP( 8, rem, -1<<
63, -1<<63
, 0 );
TEST_RR_OP( 8, rem, -1<<
31, -1<<31
, 0 );
TEST_RR_OP( 9, rem, 1, 1, 0 );
TEST_RR_OP(10, rem, 0, 0, 0 );
...
...
sw/testsuite/isa/rv32ui/remu.S
View file @
1fba58ce
...
...
@@ -22,10 +22,10 @@ RVTEST_CODE_BEGIN
TEST_RR_OP( 4, remu, 20, 20, -6 );
TEST_RR_OP( 5, remu, -20, -20, -6 );
TEST_RR_OP( 6, remu, 0, -1<<
63
, 1 );
TEST_RR_OP( 7, remu, -1<<
63, -1<<63
, -1 );
TEST_RR_OP( 6, remu, 0, -1<<
31
, 1 );
TEST_RR_OP( 7, remu, -1<<
31, -1<<31
, -1 );
TEST_RR_OP( 8, remu, -1<<
63, -1<<63
, 0 );
TEST_RR_OP( 8, remu, -1<<
31, -1<<31
, 0 );
TEST_RR_OP( 9, remu, 1, 1, 0 );
TEST_RR_OP(10, remu, 0, 0, 0 );
...
...
sw/testsuite/isa/rv32ui/sb.S
View file @
1fba58ce
...
...
@@ -19,13 +19,7 @@ RVTEST_CODE_BEGIN
TEST_ST_OP( 2, lb, sb, 0xffffffaa, 0, tdat );
TEST_ST_OP( 3, lb, sb, 0x00000000, 1, tdat );
#ifdef __RISCVEL
TEST_ST_OP( 4, lh, sb, 0xffffefa0, 2, tdat );
#elif defined(__RISCVEB)
#else
TEST_ST_OP( 4, lh, sb, 0xffffa0ef, 2, tdat );
#error unknown endianness!
#endif
TEST_ST_OP( 5, lb, sb, 0x0000000a, 3, tdat );
# Test with negative offset
...
...
sw/testsuite/isa/rv32ui/sh.S
View file @
1fba58ce
...
...
@@ -19,13 +19,7 @@ RVTEST_CODE_BEGIN
TEST_ST_OP( 2, lh, sh, 0x000000aa, 0, tdat );
TEST_ST_OP( 3, lh, sh, 0xffffaa00, 2, tdat );
#ifdef __RISCVEL
TEST_ST_OP( 4, lw, sh, 0xbeef0aa0, 4, tdat );
#elif defined(__RISCVEB)
#else
TEST_ST_OP( 4, lw, sh, 0x0aa0beef, 4, tdat );
#error unknown endianness!
#endif
TEST_ST_OP( 5, lh, sh, 0xffffa00a, 6, tdat );
# Test with negative offset
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment