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

Subversion Repositories fwrisc

[/] [fwrisc/] [trunk/] [ve/] [fwrisc/] [tests/] [riscv-compliance/] [riscv-test-suite/] [rv32ui/] [rv64ui/] [bgeu.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
# bgeu.S
5
#-----------------------------------------------------------------------------
6
#
7
# Test bgeu 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
RVTEST_RV64U
17
RVTEST_CODE_BEGIN
18
 
19
  #-------------------------------------------------------------
20
  # Branch tests
21
  #-------------------------------------------------------------
22
 
23
  # Each test checks both forward and backward branches
24
 
25
  TEST_BR2_OP_TAKEN( 2, bgeu, 0x00000000, 0x00000000 );
26
  TEST_BR2_OP_TAKEN( 3, bgeu, 0x00000001, 0x00000001 );
27
  TEST_BR2_OP_TAKEN( 4, bgeu, 0xffffffff, 0xffffffff );
28
  TEST_BR2_OP_TAKEN( 5, bgeu, 0x00000001, 0x00000000 );
29
  TEST_BR2_OP_TAKEN( 6, bgeu, 0xffffffff, 0xfffffffe );
30
  TEST_BR2_OP_TAKEN( 7, bgeu, 0xffffffff, 0x00000000 );
31
 
32
  TEST_BR2_OP_NOTTAKEN(  8, bgeu, 0x00000000, 0x00000001 );
33
  TEST_BR2_OP_NOTTAKEN(  9, bgeu, 0xfffffffe, 0xffffffff );
34
  TEST_BR2_OP_NOTTAKEN( 10, bgeu, 0x00000000, 0xffffffff );
35
  TEST_BR2_OP_NOTTAKEN( 11, bgeu, 0x7fffffff, 0x80000000 );
36
 
37
  #-------------------------------------------------------------
38
  # Bypassing tests
39
  #-------------------------------------------------------------
40
 
41
  TEST_BR2_SRC12_BYPASS( 12, 0, 0, bgeu, 0xefffffff, 0xf0000000 );
42
  TEST_BR2_SRC12_BYPASS( 13, 0, 1, bgeu, 0xefffffff, 0xf0000000 );
43
  TEST_BR2_SRC12_BYPASS( 14, 0, 2, bgeu, 0xefffffff, 0xf0000000 );
44
  TEST_BR2_SRC12_BYPASS( 15, 1, 0, bgeu, 0xefffffff, 0xf0000000 );
45
  TEST_BR2_SRC12_BYPASS( 16, 1, 1, bgeu, 0xefffffff, 0xf0000000 );
46
  TEST_BR2_SRC12_BYPASS( 17, 2, 0, bgeu, 0xefffffff, 0xf0000000 );
47
 
48
  TEST_BR2_SRC12_BYPASS( 18, 0, 0, bgeu, 0xefffffff, 0xf0000000 );
49
  TEST_BR2_SRC12_BYPASS( 19, 0, 1, bgeu, 0xefffffff, 0xf0000000 );
50
  TEST_BR2_SRC12_BYPASS( 20, 0, 2, bgeu, 0xefffffff, 0xf0000000 );
51
  TEST_BR2_SRC12_BYPASS( 21, 1, 0, bgeu, 0xefffffff, 0xf0000000 );
52
  TEST_BR2_SRC12_BYPASS( 22, 1, 1, bgeu, 0xefffffff, 0xf0000000 );
53
  TEST_BR2_SRC12_BYPASS( 23, 2, 0, bgeu, 0xefffffff, 0xf0000000 );
54
 
55
  #-------------------------------------------------------------
56
  # Test delay slot instructions not executed nor bypassed
57
  #-------------------------------------------------------------
58
 
59
  TEST_CASE( 24, x1, 3, \
60
    li  x1, 1; \
61
    bgeu x1, x0, 1f; \
62
    addi x1, x1, 1; \
63
    addi x1, x1, 1; \
64
    addi x1, x1, 1; \
65
    addi x1, x1, 1; \
66
1:  addi x1, x1, 1; \
67
    addi x1, x1, 1; \
68
  )
69
 
70
  TEST_PASSFAIL
71
 
72
RVTEST_CODE_END
73
 
74
  .data
75
RV_COMPLIANCE_DATA_BEGIN
76
test_res:
77
    .fill 30, 4, -1
78
RV_COMPLIANCE_DATA_END
79
 
80
 

powered by: WebSVN 2.1.0

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