aboutsummaryrefslogtreecommitdiffhomepage
path: root/externals/biscuit/tests/src/assembler_zihintntl_tests.cpp
blob: 5e81fb8c5c3cf0c4ff51e54ca2752e5ee8d257ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#include <catch/catch.hpp>

#include <biscuit/assembler.hpp>

#include "assembler_test_utils.hpp"

using namespace biscuit;

TEST_CASE("C.NTL.ALL", "[Zihintntl]") {
    uint32_t value = 0;
    auto as = MakeAssembler64(value);

    as.C_NTL_ALL();
    REQUIRE(value == 0x9016);
}

TEST_CASE("C.NTL.S1", "[Zihintntl]") {
    uint32_t value = 0;
    auto as = MakeAssembler64(value);

    as.C_NTL_S1();
    REQUIRE(value == 0x9012);
}

TEST_CASE("C.NTL.P1", "[Zihintntl]") {
    uint32_t value = 0;
    auto as = MakeAssembler64(value);

    as.C_NTL_P1();
    REQUIRE(value == 0x900A);
}

TEST_CASE("C.NTL.PALL", "[Zihintntl]") {
    uint32_t value = 0;
    auto as = MakeAssembler64(value);

    as.C_NTL_PALL();
    REQUIRE(value == 0x900E);
}

TEST_CASE("NTL.ALL", "[Zihintntl]") {
    uint32_t value = 0;
    auto as = MakeAssembler64(value);

    as.NTL_ALL();
    REQUIRE(value == 0x00500033);
}

TEST_CASE("NTL.S1", "[Zihintntl]") {
    uint32_t value = 0;
    auto as = MakeAssembler64(value);

    as.NTL_S1();
    REQUIRE(value == 0x00400033);
}

TEST_CASE("NTL.P1", "[Zihintntl]") {
    uint32_t value = 0;
    auto as = MakeAssembler64(value);

    as.NTL_P1();
    REQUIRE(value == 0x00200033);
}

TEST_CASE("NTL.PALL", "[Zihintntl]") {
    uint32_t value = 0;
    auto as = MakeAssembler64(value);

    as.NTL_PALL();
    REQUIRE(value == 0x00300033);
}