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

Subversion Repositories fwrisc

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

powered by: WebSVN 2.1.0

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