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

Subversion Repositories fwrisc

[/] [fwrisc/] [trunk/] [ve/] [fwrisc/] [tests/] [riscv-compliance/] [riscv-test-suite/] [rv32si/] [rv64si/] [sbreak.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
# scall.S
5
#-----------------------------------------------------------------------------
6
#
7
# Test syscall trap.
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
 
16
RVTEST_RV64S
17
RVTEST_CODE_BEGIN
18
 
19
#ifdef __MACHINE_MODE
20
  #define sscratch mscratch
21
  #define sstatus mstatus
22
  #define scause mcause
23
  #define sepc mepc
24
  #define sret mret
25
  #define stvec_handler mtvec_handler
26
#endif
27
 
28
  li TESTNUM, 2
29
  SWSIG(2, TESTNUM)
30
 
31
do_break:
32
  sbreak
33
  j fail
34
 
35
  TEST_PASSFAIL
36
 
37
  .align 2
38
  .global stvec_handler
39
stvec_handler:
40
  li t1, CAUSE_BREAKPOINT
41
  csrr t0, scause
42
  bne t0, t1, fail
43
  la t1, do_break
44
  csrr t0, sepc
45
  bne t0, t1, fail
46
  j pass
47
 
48
RVTEST_CODE_END
49
 
50
  .data
51
RV_COMPLIANCE_DATA_BEGIN
52
test_res:
53
    .fill 40, 4, -1
54
RV_COMPLIANCE_DATA_END
55
 

powered by: WebSVN 2.1.0

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