OpenCores
URL https://opencores.org/ocsvn/fwrisc/fwrisc/trunk

Subversion Repositories fwrisc

[/] [fwrisc/] [trunk/] [ve/] [fwrisc/] [tests/] [riscv-compliance/] [riscv-test-suite/] [rv32mi/] [src/] [shamt.S] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 mballance
# See LICENSE for license details.
2
 
3
#*****************************************************************************
4
# csr.S
5
#-----------------------------------------------------------------------------
6
#
7
# Test CSRRx and CSRRxI instructions.
8
#
9
 
10
#include "riscv_test.h"
11
#include "compliance_test.h"
12
#include "compliance_io.h"
13
#include "aw_test_macros.h"
14
 
15
RVTEST_RV32M
16
RVTEST_CODE_BEGIN
17
 
18
  # Make sure slli with shamt[4] set is legal.
19
  TEST_CASE( 2, a0, 65536, li a0, 1; slli a0, a0, 16);
20
 
21
  # Make sure slli with shamt[5] set is not legal.
22
  TEST_CASE( 3, x0, 1, .word 0x02051513); # slli a0, a0, 32
23
 
24
  TEST_PASSFAIL
25
 
26
.global mtvec_handler
27
mtvec_handler:
28
  # Trapping on test 3 is good.
29
  # Note that since the test didn't complete, TESTNUM is smaller by 1.
30
  li t0, 2
31
  bne TESTNUM, t0, fail
32
 
33
  # Make sure CAUSE indicates an illegal instructino.
34
  csrr t0, mcause
35
  li t1, CAUSE_ILLEGAL_INSTRUCTION
36
  bne t0, t1, fail
37
  j pass
38
 
39
RVTEST_CODE_END
40
 
41
  .data
42
RV_COMPLIANCE_DATA_BEGIN
43
test_res:
44
    .fill 8, 4, -1
45
RV_COMPLIANCE_DATA_END
46
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.