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

Subversion Repositories fwrisc

[/] [fwrisc/] [trunk/] [ve/] [fwrisc/] [tests/] [riscv-compliance/] [riscv-test-suite/] [rv32ua/] [rv64ua/] [amoor_w.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
# amoor.w.S
5
#-----------------------------------------------------------------------------
6
#
7
# Test amoor.w instruction.
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_RV64U
16
RVTEST_CODE_BEGIN
17
 
18
  TEST_CASE(2, a4, 0xffffffff80000000, \
19
    li a0, 0xffffffff80000000; \
20
    li a1, 0xfffffffffffff800; \
21
    la a3, amo_operand; \
22
    sw a0, 0(a3); \
23
    amoor.w     a4, a1, 0(a3); \
24
  )
25
 
26
  TEST_CASE(3, a5, 0xfffffffffffff800, lw a5, 0(a3))
27
 
28
  # try again after a cache miss
29
  TEST_CASE(4, a4, 0xfffffffffffff800, \
30
    li  a1, 1; \
31
    amoor.w a4, a1, 0(a3); \
32
  )
33
 
34
  TEST_CASE(5, a5, 0xfffffffffffff801, lw a5, 0(a3))
35
 
36
  TEST_PASSFAIL
37
 
38
RVTEST_CODE_END
39
 
40
 
41
  .bss
42
  .align 3
43
amo_operand:
44
  .dword 0
45
 
46
  .data
47
RV_COMPLIANCE_DATA_BEGIN
48
test_res:
49
    .fill 40, 4, -1
50
RV_COMPLIANCE_DATA_END
51
 

powered by: WebSVN 2.1.0

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