aboutsummaryrefslogtreecommitdiff
path: root/isa
diff options
context:
space:
mode:
authorJoakim Andersson <joerchan@gmail.com>2015-04-13 22:57:04 +0200
committerJoakim Andersson <joerchan@gmail.com>2015-04-13 22:57:04 +0200
commit075745d1ee9c0437dcc2400630faf10168aecd10 (patch)
treec0b4a73fcb523e0336313435d3686325a4cef636 /isa
parent75f9bc244d43359750bf53660b6a7a36ee11e4ed (diff)
downloadriscv-tests-075745d1ee9c0437dcc2400630faf10168aecd10.zip
riscv-tests-075745d1ee9c0437dcc2400630faf10168aecd10.tar.gz
riscv-tests-075745d1ee9c0437dcc2400630faf10168aecd10.tar.bz2
Correct expected high value of multiplication
Diffstat (limited to 'isa')
-rw-r--r--isa/rv32ui/mulh.S9
-rw-r--r--isa/rv32ui/mulhsu.S6
2 files changed, 7 insertions, 8 deletions
diff --git a/isa/rv32ui/mulh.S b/isa/rv32ui/mulh.S
index 3b34b6a..e583f5f 100644
--- a/isa/rv32ui/mulh.S
+++ b/isa/rv32ui/mulh.S
@@ -25,16 +25,15 @@ RVTEST_CODE_BEGIN
TEST_RR_OP( 6, mulh, 0x00000000, 0x80000000, 0x00000000 );
TEST_RR_OP( 7, mulh, 0x00000000, 0x80000000, 0x00000000 );
- TEST_RR_OP(30, mulh, 0xfffe0101, 0xaaaaaaab, 0x0002fe7d );
- TEST_RR_OP(31, mulh, 0xfffe0101, 0x0002fe7d, 0xaaaaaaab );
+ TEST_RR_OP(30, mulh, 0xffff0081, 0xaaaaaaab, 0x0002fe7d );
+ TEST_RR_OP(31, mulh, 0xffff0081, 0x0002fe7d, 0xaaaaaaab );
- TEST_RR_OP(32, mulh, 0xfe010000, 0xff000000, 0xff000000 );
+ TEST_RR_OP(32, mulh, 0x00010000, 0xff000000, 0xff000000 );
- TEST_RR_OP(33, mulh, 0xfffffffe, 0xffffffff, 0xffffffff );
+ TEST_RR_OP(33, mulh, 0x00000000, 0xffffffff, 0xffffffff );
TEST_RR_OP(34, mulh, 0xffffffff, 0xffffffff, 0x00000001 );
TEST_RR_OP(35, mulh, 0xffffffff, 0x00000001, 0xffffffff );
-
#-------------------------------------------------------------
# Source/Destination tests
#-------------------------------------------------------------
diff --git a/isa/rv32ui/mulhsu.S b/isa/rv32ui/mulhsu.S
index 93e698c..28b3690 100644
--- a/isa/rv32ui/mulhsu.S
+++ b/isa/rv32ui/mulhsu.S
@@ -25,12 +25,12 @@ RVTEST_CODE_BEGIN
TEST_RR_OP( 6, mulhsu, 0x00000000, 0x80000000, 0x00000000 );
TEST_RR_OP( 7, mulhsu, 0x80004000, 0x80000000, 0xffff8000 );
- TEST_RR_OP(30, mulhsu, 0xfffe0101, 0xaaaaaaab, 0x0002fe7d );
+ TEST_RR_OP(30, mulhsu, 0xffff0081, 0xaaaaaaab, 0x0002fe7d );
TEST_RR_OP(31, mulhsu, 0x0001fefe, 0x0002fe7d, 0xaaaaaaab );
- TEST_RR_OP(32, mulhsu, 0x01ff0000, 0xff000000, 0xff000000 );
+ TEST_RR_OP(32, mulhsu, 0xff010000, 0xff000000, 0xff000000 );
- TEST_RR_OP(33, mulhsu, 0x00000001, 0xffffffff, 0xffffffff );
+ TEST_RR_OP(33, mulhsu, 0xffffffff, 0xffffffff, 0xffffffff );
TEST_RR_OP(34, mulhsu, 0xffffffff, 0xffffffff, 0x00000001 );
TEST_RR_OP(35, mulhsu, 0x00000000, 0x00000001, 0xffffffff );