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

Subversion Repositories fwrisc

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

powered by: WebSVN 2.1.0

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