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

Subversion Repositories potato

[/] [potato/] [trunk/] [riscv-tests/] [sbreak.S] - Blame information for rev 58

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 51 skordal
# See LICENSE for license details.
2
 
3
#*****************************************************************************
4
# scall.S
5
#-----------------------------------------------------------------------------
6
#
7
# Test syscall trap.
8
#
9
 
10
#include "riscv_test.h"
11
#include "test_macros.h"
12
 
13
RVTEST_RV32M
14
RVTEST_CODE_BEGIN
15
 
16
#define sscratch mscratch
17
#define sstatus mstatus
18
#define scause mcause
19
#define sepc mepc
20
#define stvec_handler mtvec_handler
21
 
22
  li TESTNUM, 2
23
  sbreak
24
  j fail
25
 
26
  j pass
27
 
28
  TEST_PASSFAIL
29
 
30
stvec_handler:
31
  li t1, CAUSE_BREAKPOINT
32
  csrr t0, scause
33
  bne t0, t1, fail
34
  csrr t0, sepc
35
  addi t0, t0, 8
36
  csrw sepc, t0
37
  sret
38
 
39
RVTEST_CODE_END
40
 
41
  .data
42
RVTEST_DATA_BEGIN
43
 
44
  TEST_DATA
45
 
46
RVTEST_DATA_END

powered by: WebSVN 2.1.0

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