assembler_zihintntl_tests.cpp
1 #include <catch/catch.hpp> 2 3 #include <biscuit/assembler.hpp> 4 5 #include "assembler_test_utils.hpp" 6 7 using namespace biscuit; 8 9 TEST_CASE("C.NTL.ALL", "[Zihintntl]") { 10 uint32_t value = 0; 11 auto as = MakeAssembler64(value); 12 13 as.C_NTL_ALL(); 14 REQUIRE(value == 0x9016); 15 } 16 17 TEST_CASE("C.NTL.S1", "[Zihintntl]") { 18 uint32_t value = 0; 19 auto as = MakeAssembler64(value); 20 21 as.C_NTL_S1(); 22 REQUIRE(value == 0x9012); 23 } 24 25 TEST_CASE("C.NTL.P1", "[Zihintntl]") { 26 uint32_t value = 0; 27 auto as = MakeAssembler64(value); 28 29 as.C_NTL_P1(); 30 REQUIRE(value == 0x900A); 31 } 32 33 TEST_CASE("C.NTL.PALL", "[Zihintntl]") { 34 uint32_t value = 0; 35 auto as = MakeAssembler64(value); 36 37 as.C_NTL_PALL(); 38 REQUIRE(value == 0x900E); 39 } 40 41 TEST_CASE("NTL.ALL", "[Zihintntl]") { 42 uint32_t value = 0; 43 auto as = MakeAssembler64(value); 44 45 as.NTL_ALL(); 46 REQUIRE(value == 0x00500033); 47 } 48 49 TEST_CASE("NTL.S1", "[Zihintntl]") { 50 uint32_t value = 0; 51 auto as = MakeAssembler64(value); 52 53 as.NTL_S1(); 54 REQUIRE(value == 0x00400033); 55 } 56 57 TEST_CASE("NTL.P1", "[Zihintntl]") { 58 uint32_t value = 0; 59 auto as = MakeAssembler64(value); 60 61 as.NTL_P1(); 62 REQUIRE(value == 0x00200033); 63 } 64 65 TEST_CASE("NTL.PALL", "[Zihintntl]") { 66 uint32_t value = 0; 67 auto as = MakeAssembler64(value); 68 69 as.NTL_PALL(); 70 REQUIRE(value == 0x00300033); 71 }